--version, resolving the build identity only when the flag is given.
More...
Public Member Functions | |
| __init__ (self, option_strings, dest=argparse.SUPPRESS, default=argparse.SUPPRESS, help=None) | |
| Register a flag that takes no value. | |
| __call__ (self, parser, namespace, values, option_string=None) | |
Print picurv <version> and exit. | |
--version, resolving the build identity only when the flag is given.
argparse's own version action formats its string while the parser is built, which would run git for every command; this one defers it to the flag.
| picurv_cli.cli._LazyVersionAction.__init__ | ( | self, | |
| option_strings, | |||
dest = argparse.SUPPRESS, |
|||
default = argparse.SUPPRESS, |
|||
help = None |
|||
| ) |
Register a flag that takes no value.
| [in] | option_strings | Flag spellings. |
| [in] | dest | Unused destination. |
| [in] | default | Unused default. |
| [in] | help | Help text. |
Definition at line 214 of file cli.py.
| picurv_cli.cli._LazyVersionAction.__call__ | ( | self, | |
| parser, | |||
| namespace, | |||
| values, | |||
option_string = None |
|||
| ) |
Print picurv <version> and exit.
| [in] | parser | Parser being run. |
| [in] | namespace | Unused namespace. |
| [in] | values | Unused values. |
| [in] | option_string | Flag used. |
Definition at line 225 of file cli.py.