diff --git a/commands/parsing.py b/commands/parsing.py index a13a5ce5..9885d905 100644 --- a/commands/parsing.py +++ b/commands/parsing.py @@ -4,29 +4,6 @@ ###################################################################### # Parsing Helpers -class EditAction(ArgAction): - """ - argparse action that stores a value and also flags args._editing - """ - def __call__(self, parser, namespace, values, option_string=None): - setattr(namespace, "_editing", True) - setattr(namespace, self.dest, values or self.default) - - -class EditActionStoreTrue(ArgAction): - """ - argparse action that stores True but also flags args._editing - """ - def __init__(self, option_strings, dest, nargs=None, **kwargs): - if nargs is not None: - raise ValueError("nargs not allowed") - super(EditActionStoreTrue, self).__init__(option_strings, dest, nargs=0, **kwargs) - - def __call__(self, parser, namespace, values, option_string=None): - setattr(namespace, "_editing", True) - setattr(namespace, self.dest, True) - - class ParseArgument(object): """ Provides argument forwarding so that 'makeSubParser' can take function-like arguments.