AngleType¶
-
class
AngleType
¶ click.ParamType
sub-class to automatically converts a user-provided angle string (which may contain units) into a value in degrees. This class usesconvert_angle()
internally.Example:
>>> import click >>> import vpype_cli >>> import vpype >>> @vpype_cli.cli.command(group="my commands") ... @click.argument("angle", type=vpype.AngleType()) ... @vpype.generator ... def my_command(angle: float): ... pass
Methods
Attributes
Methods¶
Attributes¶
-
AngleType.
__doc__
= ':class:`click.ParamType` sub-class to automatically converts a user-provided angle\n string (which may contain units) into a value in degrees. This class uses\n :func:`convert_angle` internally.\n\n Example::\n\n >>> import click\n >>> import vpype_cli\n >>> import vpype\n >>> @vpype_cli.cli.command(group="my commands")\n ... @click.argument("angle", type=vpype.AngleType())\n ... @vpype.generator\n ... def my_command(angle: float):\n ... pass\n '¶
-
AngleType.
__module__
= 'vpype.utils'¶
-
AngleType.
name
= 'angle'¶