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

Function _static_lookup_runtime

mypy/stubtest.py:752–762  ·  view source on GitHub ↗
(object_path: list[str])

Source from the content-addressed store, hash-verified

750
751
752def _static_lookup_runtime(object_path: list[str]) -> MaybeMissing[Any]:
753 static_runtime = importlib.import_module(object_path[0])
754 for entry in object_path[1:]:
755 try:
756 static_runtime = inspect.getattr_static(static_runtime, entry)
757 except AttributeError:
758 # This can happen with mangled names, ignore for now.
759 # TODO: pass more information about ancestors of nodes/objects to verify, so we don't
760 # have to do this hacky lookup. Would be useful in several places.
761 return MISSING
762 return static_runtime
763
764
765def _verify_static_class_methods(

Callers 2

verify_funcitemFunction · 0.85
verify_overloadedfuncdefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…