![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| __init__ (self, cabc.Sequence[str]|None formats=None) | |
| dict[str, t.Any] | to_info_dict (self) |
| str|None | get_metavar (self, Parameter param, Context ctx) |
| t.Any | convert (self, t.Any value, Parameter|None param, Context|None ctx) |
| str | __repr__ (self) |
Public Member Functions inherited from click.types.ParamType | |
| t.Any | __call__ (self, t.Any value, Parameter|None param=None, Context|None ctx=None) |
| str|None | get_missing_message (self, Parameter param, Context|None ctx) |
| cabc.Sequence[str] | split_envvar_value (self, str rv) |
| t.NoReturn | fail (self, str message, Parameter|None param=None, Context|None ctx=None) |
| list[CompletionItem] | shell_complete (self, Context ctx, Parameter param, str incomplete) |
Public Attributes | |
| formats | |
Public Attributes inherited from click.types.ParamType | |
| envvar_list_splitter | |
Static Public Attributes | |
| str | name = "datetime" |
Static Public Attributes inherited from click.types.ParamType | |
| t | is_composite = False |
| t | arity = 1 |
| str | name |
| t | envvar_list_splitter = None |
Protected Member Functions | |
| datetime|None | _try_to_convert_date (self, t.Any value, str format) |
The DateTime type converts date strings into `datetime` objects.
The format strings which are checked are configurable, but default to some
common (non-timezone aware) ISO 8601 formats.
When specifying *DateTime* formats, you should only pass a list or a tuple.
Other iterables, like generators, may lead to surprising results.
The format strings are processed using ``datetime.strptime``, and this
consequently defines the format strings which are allowed.
Parsing is tried using each format, in order, and the first format which
parses successfully is used.
:param formats: A list or tuple of date format strings, in the order in
which they should be tried. Defaults to
``'%Y-%m-%d'``, ``'%Y-%m-%dT%H:%M:%S'``,
``'%Y-%m-%d %H:%M:%S'``.
| t.Any click.types.DateTime.convert | ( | self, | |
| t.Any | value, | ||
| Parameter | None | param, | ||
| Context | None | ctx | ||
| ) |
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`` and ``ctx`` arguments may be ``None`` in certain
situations, such as when converting prompt input.
If the value cannot be converted, call :meth:`fail` with a
descriptive message.
:param value: The value to convert.
:param param: The parameter that is using this type to convert
its value. May be ``None``.
:param ctx: The current context that arrived at this value. May
be ``None``.
Reimplemented from click.types.ParamType.
Returns the metavar default for this param if it provides one.
Reimplemented from click.types.ParamType.
| dict[str, t.Any] click.types.DateTime.to_info_dict | ( | self | ) |
Gather information that could be useful for a tool generating user-facing documentation. Use :meth:`click.Context.to_info_dict` to traverse the entire CLI structure. .. versionadded:: 8.0
Reimplemented from click.types.ParamType.