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

Function cmd_parse

Tools/c-analyzer/c_parser/__main__.py:169–186  ·  view source on GitHub ↗
(filenames, *,
              fmt='summary',
              showfwd=None,
              iter_filenames=None,
              relroot=None,
              **kwargs
              )

Source from the content-addressed store, hash-verified

167
168
169def cmd_parse(filenames, *,
170 fmt='summary',
171 showfwd=None,
172 iter_filenames=None,
173 relroot=None,
174 **kwargs
175 ):
176 if 'get_file_preprocessor' not in kwargs:
177 kwargs['get_file_preprocessor'] = _get_preprocessor()
178 try:
179 do_fmt = FORMATS[fmt]
180 except KeyError:
181 raise ValueError(f'unsupported fmt {fmt!r}')
182 for filename, relfile in main_for_filenames(filenames, iter_filenames, relroot):
183 for item in _iter_parsed(filename, **kwargs):
184 item = item.fix_filename(relroot, fixroot=False, normalize=False)
185 for line in do_fmt(relfile, item, showfwd=showfwd):
186 print(line)
187
188
189def _cli_data(parser):

Callers

nothing calls this directly

Calls 3

main_for_filenamesFunction · 0.90
_get_preprocessorFunction · 0.70
fix_filenameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…