ancestor = ancestor._parent_parser
self._validate(args, kwargs)
dest = kwargs.get("dest") or self._select_dest(args)
kwargs["dest"] = dest
if "recursive" in kwargs:
if self._scope_info.category == ScopeInfo.SUBSYSTEM:
raise ParseError("Option {} in scope {} registered as recursive, but subsystem options "
"may not set recursive=True.".format(args[0], self.scope))
After Change
if existing_scope is not None:
raise RegistrationError("Option {} in scope {} already registered in {}".format(
args[0], self.scope, _scope_str(existing_scope)))
self._known_args.update(args)
def _argparse_register(self, args, kwargs):
Do the deferred argparse registration.
// This check prevents repeat registration of the same option, e.g., during bootstrapping,