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

Function _cli_check

Tools/c-analyzer/c_analyzer/__main__.py:272–293  ·  view source on GitHub ↗
(parser, checks=None, **kwargs)

Source from the content-addressed store, hash-verified

270# the commands
271
272def _cli_check(parser, checks=None, **kwargs):
273 if isinstance(checks, str):
274 checks = [checks]
275 if checks is False:
276 process_checks = None
277 elif checks is None:
278 process_checks = add_checks_cli(parser)
279 elif len(checks) == 1 and type(checks) is not dict and re.match(r'^<.*>$', checks[0]):
280 check = checks[0][1:-1]
281 def process_checks(args, *, argv=None):
282 args.checks = [check]
283 else:
284 process_checks = add_checks_cli(parser, checks=checks)
285 process_progress = add_progress_cli(parser)
286 process_output = add_output_cli(parser, default=None)
287 process_files = add_files_cli(parser, **kwargs)
288 return [
289 process_checks,
290 process_progress,
291 process_output,
292 process_files,
293 ]
294
295
296def cmd_check(filenames, *,

Callers

nothing calls this directly

Calls 5

add_progress_cliFunction · 0.90
add_files_cliFunction · 0.90
add_checks_cliFunction · 0.85
add_output_cliFunction · 0.70
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…