(filenames, *,
fmt='summary',
showfwd=None,
iter_filenames=None,
relroot=None,
**kwargs
)
| 167 | |
| 168 | |
| 169 | def 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 | |
| 189 | def _cli_data(parser): |
nothing calls this directly
no test coverage detected
searching dependent graphs…