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

Function process_levels

Tools/c-analyzer/cpython/__main__.py:266–280  ·  view source on GitHub ↗
(args, *, argv=None)

Source from the content-addressed store, hash-verified

264 parser.add_argument(f'--{level}', dest='levels',
265 action='append_const', const=level)
266 def process_levels(args, *, argv=None):
267 levels = []
268 for raw in args.levels or ():
269 for level in raw.replace(',', ' ').strip().split():
270 if level == 'public':
271 levels.append('stable')
272 levels.append('cpython')
273 elif level == 'no-public':
274 levels.append('private')
275 levels.append('internal')
276 elif level in _capi.LEVELS:
277 levels.append(level)
278 else:
279 parser.error(f'expected LEVEL to be one of {sorted(_capi.LEVELS)}, got {level!r}')
280 args.levels = set(levels)
281
282 parser.add_argument('--kinds', action='append', metavar='KIND[,...]')
283 for kind in _capi.KINDS:

Callers

nothing calls this directly

Calls 6

setFunction · 0.85
splitMethod · 0.45
stripMethod · 0.45
replaceMethod · 0.45
appendMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…