MCPcopy Index your code
hub / github.com/RustPython/RustPython / gen_modules

Function gen_modules

scripts/whats_left.py:281–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

279
280
281def gen_modules():
282 # check name because modules listed have side effects on import,
283 # e.g. printing something or opening a webpage
284 modules = {}
285 for mod_name in sorted(scan_modules(), key=name_sort_key):
286 if mod_name in IGNORED_MODULES:
287 continue
288 # when generating CPython list, ignore items defined by other modules
289 dir_result = dir_of_mod_or_error(mod_name, keep_other=False)
290 if isinstance(dir_result, Exception):
291 print(
292 f"!!! {mod_name} skipped because {type(dir_result).__name__}: {str(dir_result)}",
293 file=sys.stderr,
294 )
295 continue
296 modules[mod_name] = dir_result
297 return modules
298
299
300output = """\

Callers 1

whats_left.pyFile · 0.85

Calls 6

sortedFunction · 0.85
scan_modulesFunction · 0.85
dir_of_mod_or_errorFunction · 0.85
isinstanceFunction · 0.85
strFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected