Prepared annotations
CLI flags have no effect in the UI. Great for CLI so that the user writes less.
mininterface.tag.flag.Blank
When left blank, this flag produces True. Return boolean for True|False. Return None if the flag is omitted. Else returns T created from the input value.
Note that you can not use 'True' or 'False' for values, as the parameter becomes a bool.
Warning
Experimental.
mininterface.tag.flag.BlankTrue = Annotated[list[str] | None, PrimitiveConstructorSpec(nargs='*', metavar='blank=True|BOOL', instance_from_str=_assure_blank_or_bool, is_instance=lambda instance: True, str_from_instance=lambda instance: [instance])]
When left blank, this flag produces True.
Returns:
Name | Type | Description |
---|---|---|
bool |
for |
|
True |
When parameter is left blank. |
Raises:
Type | Description |
---|---|
ValueError
|
Raised on an unknown parameter. |
Warning
Experimental.