class documentation

class CapturableVersionAction(argparse.Action): (source)

View In Hierarchy

Supplement CapturableArgumentParser to handle --version. This is nearly identical to argparse._VersionAction except, like CapturableArgumentParser, it allows output to be captured. Another notable difference is that version is mandatory. This allows removing a line in __call__ that falls back to parser.version (which does not appear to exist).

Method __call__ Undocumented
Method __init__ Undocumented
Instance Variable stdout Undocumented
Instance Variable version Undocumented
def __call__(self, parser: argparse.ArgumentParser, namespace: argparse.Namespace, values: (str|Sequence[Any])|None, option_string: str|None = None) -> NoReturn: (source)

Undocumented

def __init__(self, option_strings: Sequence[str], version: str, dest: str = argparse.SUPPRESS, default: str = argparse.SUPPRESS, help: str = 'show program\'s version number and exit', stdout: IO[str]|None = None): (source)

Undocumented

Undocumented

Undocumented