iqm.iqm_client.cli.cli.ResolvedPath#
- class iqm.iqm_client.cli.cli.ResolvedPath(*args, **kwargs)#
Bases:
Path
A click parameter type for a resolved path. Normal
click.Path(resolve_path=True)
fails under Windows running python <= 3.9. See pallets/click#2466Attributes
name
the descriptive name of this type
Methods
convert
(value, param, ctx)Convert the value to the correct type.
- convert(value: Any, param: Parameter | None, ctx: Context | None) Any #
Convert the value to the correct type. This is not called if the value is
None
(the missing value).This must accept string values from the command line, as well as values that are already the correct type. It may also convert other compatible types.
The
param
andctx
arguments may beNone
in certain situations, such as when converting prompt input.If the value cannot be converted, call
fail()
with a descriptive message.