MCPcopy Create free account
hub / github.com/python/mypy / get_base_class_hook

Method get_base_class_hook

test-data/unit/plugins/common_api_incremental.py:17–22  ·  view source on GitHub ↗
(self, fullname: str)

Source from the content-addressed store, hash-verified

15 return None
16
17 def get_base_class_hook(self, fullname: str) -> Callable[[ClassDefContext], None] | None:
18 sym = self.lookup_fully_qualified(fullname)
19 if sym and isinstance(sym.node, TypeInfo):
20 if sym.node.metadata.get("magic"):
21 return add_magic_hook
22 return None
23
24
25def add_info_hook(ctx: DynamicClassDefContext) -> None:

Callers

nothing calls this directly

Calls 3

isinstanceFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected