MCPcopy Index your code
hub / github.com/python/mypy / worker

Function worker

mypy/moduleinspect.py:93–103  ·  view source on GitHub ↗

The main loop of a worker introspection process.

(tasks: Queue[str], results: Queue[str | ModuleProperties], sys_path: list[str])

Source from the content-addressed store, hash-verified

91
92
93def worker(tasks: Queue[str], results: Queue[str | ModuleProperties], sys_path: list[str]) -> None:
94 """The main loop of a worker introspection process."""
95 sys.path = sys_path
96 while True:
97 mod = tasks.get()
98 try:
99 prop = get_package_properties(mod)
100 except InspectError as e:
101 results.put(str(e))
102 continue
103 results.put(prop)
104
105
106class ModuleInspect:

Callers

nothing calls this directly

Calls 4

get_package_propertiesFunction · 0.85
strClass · 0.85
putMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…