MCPcopy Index your code
hub / github.com/aws/aws-cli / parse_known_args

Method parse_known_args

awscli/argparser.py:225–230  ·  view source on GitHub ↗
(self, args, namespace=None)

Source from the content-addressed store, hash-verified

223 """
224
225 def parse_known_args(self, args, namespace=None):
226 parsed_args, remaining = super().parse_known_args(args, namespace)
227 if getattr(parsed_args, 'subcommand', None) is not None:
228 new_args = self._remove_subcommand(args, parsed_args)
229 return new_args, parsed_args.subcommand
230 return None
231
232 def _remove_subcommand(self, args, parsed_args):
233 # We want to remove only the subcommand from the args list

Callers 2

Calls 2

_remove_subcommandMethod · 0.95
parse_known_argsMethod · 0.45

Tested by

no test coverage detected