Module relax :: Class RelaxParser
[hide private]
[frames] | no frames]

type RelaxParser

source code


A custom ArgumentParser class.

Instance Methods [hide private]
 
error(self, message)
Replace ArgumentParser.error() with a custom function, enabling the use of RelaxErrors.
source code

Inherited from argparse.ArgumentParser: __init__, add_subparsers, convert_arg_line_to_args, exit, format_help, format_usage, format_version, parse_args, parse_known_args, print_help, print_usage, print_version

Inherited from argparse.ArgumentParser (private): _add_action, _check_value, _get_formatter, _get_kwargs, _get_nargs_pattern, _get_option_tuples, _get_optional_actions, _get_positional_actions, _get_value, _get_values, _match_argument, _match_arguments_partial, _parse_known_args, _parse_optional, _print_message, _read_args_from_files

Inherited from argparse._AttributeHolder: __repr__

Inherited from argparse._AttributeHolder (private): _get_args

Inherited from argparse._ActionsContainer: add_argument, add_argument_group, add_mutually_exclusive_group, get_default, register, set_defaults

Inherited from argparse._ActionsContainer (private): _add_container_actions, _check_conflict, _get_handler, _get_optional_kwargs, _get_positional_kwargs, _handle_conflict_error, _handle_conflict_resolve, _pop_action_class, _registry_get, _remove_action

Method Details [hide private]

error(self, message)

source code 

Replace ArgumentParser.error() with a custom function, enabling the use of RelaxErrors.

Parameters:
  • message (str) - The error message to output.
Overrides: argparse.ArgumentParser.error