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 uses convert_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

name

the descriptive name of this type

Methods

Attributes

AngleType.name: str = 'angle'

the descriptive name of this type