vpype_cli._DeferredEvaluator¶
- class _DeferredEvaluator(text: str, param_name: str, *args, **kwargs)¶
Abstract base-class for deferred evaluation of command parameters.
Click parses all command arguments and options before running the corresponding command functions. In contrast, property substitution must be performed just just before a command is executed, since it depends on the current context (e.g. currently defined properties and current layer ID).
To address this issue, sub-classes of
click.ParamTypemay return some_DeferredEvaluatorinstance instead of directly converting the user input. The command decorators (e.g.generator()and friends) will detect such instances, perform the conversion, and forward the converted value to the command function.Methods
Sub-class must override this function and return the converted value of
self._textAttributes
Methods¶
Attributes¶
- _DeferredEvaluator._abc_impl = <_abc._abc_data object>¶