class documentation

Parser that integrates tool and pytype-single args.

Method __init__ Initialize a parser.
Method error Undocumented
Method get_pytype_kwargs Return a set of kwargs to pass to pytype.config.Options.
Method parse_args Parses argv.
Method process Process raw pytype args before passing to config.Options.
Method process_parsed_args Process args from a namespace.
Instance Variable pytype_single_args Undocumented
Method _ensure_valid_pytype_args Final adjustment of raw pytype args before constructing Options.
Instance Variable _overrides Undocumented
Instance Variable _parser Undocumented
def __init__(self, parser, *, pytype_single_args=None, overrides=None): (source)

Initialize a parser. Args: parser: An argparse.ArgumentParser or compatible object pytype_single_args: Args passed to pytype overrides: Pytype args that the tool overrides (will be put into the tool args, with the corresponding pytype opts getting their default values)

def error(self, msg): (source)

Undocumented

def get_pytype_kwargs(self, args: argparse.Namespace) -> _ArgDict: (source)

Return a set of kwargs to pass to pytype.config.Options. Args: args: an argparse.Namespace. Returns: A dict of kwargs with pytype_single args as keys.

def parse_args(self, argv: List[str]) -> ParsedArgs: (source)

Parses argv. Args: argv: sys.argv[1:] Returns: A ParsedArgs object

def process(self, tool_args, pytype_args): (source)

Process raw pytype args before passing to config.Options.

def process_parsed_args(self, tool_args: Namespace) -> ParsedArgs: (source)

Process args from a namespace.

pytype_single_args = (source)

Undocumented

def _ensure_valid_pytype_args(self, pytype_args: argparse.Namespace): (source)

Final adjustment of raw pytype args before constructing Options.

_overrides = (source)

Undocumented

Undocumented