Arg
Arg¶
- class Arg[source]¶
Bases:
object
Base class for all kinds of arguments
Attributes
Note: attributes inherited from parent classes are not shown here, if any
Help for the argument
Short option name, used in command line parsing, prefixed by a single hyphen
Long option name used in command line argument parsing
Methods
Returns a sequence of all forms of command line flags
Returns the keyword arguments for use with argparse.ArgumentParser.add_argument
Returns updated values for this argument, used during
App
constructionUpdates a config processor with the processing required by this argument
Returns a copy of this argument with some data updated from its declaration context
List of members of Arg
- short_flag_name: Optional[str]¶
Short option name, used in command line parsing, prefixed by a single hyphen
- long_flag_name: Optional[Union[str, configpile.enums.Derived]]¶
Long option name used in command line argument parsing
It is in general lowercase, prefixed with
--
and words are separated by hyphens.,If set to
- update_dict_(name, help, env_prefix)[source]¶
Returns updated values for this argument, used during
App
construction- Parameters
Returns:
- updated(name, help, env_prefix)[source]¶
Returns a copy of this argument with some data updated from its declaration context
- update_processor(pf)[source]¶
Updates a config processor with the processing required by this argument
- Parameters
pf (
ProcessorFactory
[TypeVar
(_Config
, bound=Config
)]) – Processor factory- Return type
- argparse_argument_kwargs()[source]¶
Returns the keyword arguments for use with argparse.ArgumentParser.add_argument
- __init__(help, short_flag_name, long_flag_name)¶