MCPcopy Index your code
hub / github.com/python/cpython / apply_cli_argspecs

Function apply_cli_argspecs

Tools/c-analyzer/c_common/scriptutil.py:166–175  ·  view source on GitHub ↗
(parser, specs)

Source from the content-addressed store, hash-verified

164
165
166def apply_cli_argspecs(parser, specs):
167 processors = []
168 for spec in specs:
169 if callable(spec):
170 procs = spec(parser)
171 _add_procs(processors, procs)
172 else:
173 args, kwargs = spec
174 parser.add_argument(args, kwargs)
175 return processors
176
177
178def _add_procs(flattened, procs):

Callers 1

add_commands_cliFunction · 0.85

Calls 2

_add_procsFunction · 0.85
add_argumentMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…