vpype_cli.AngleType#
- class AngleType(*args, **kwargs)#
click.ParamType
sub-class to automatically converts a user-provided angle.User-provided angle strings may contain units and are converted into a value in degrees. This class uses
convert_angle()
internally. Property substitution is perfomred as well.Example:
>>> import click >>> import vpype_cli >>> import vpype >>> @vpype_cli.cli.command(group="my commands") ... @click.argument("angle", type=vpype_cli.AngleType()) ... @vpype_cli.generator ... def my_command(angle: float): ... pass
Methods
Attributes
the descriptive name of this type