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

Method object_type

mypy/inspections.py:244–249  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

242 return self.add_prefixes(type_str, expression), True
243
244 def object_type(self) -> Instance:
245 builtins = self.fg_manager.graph["builtins"].tree
246 assert builtins is not None
247 object_node = builtins.names["object"].node
248 assert isinstance(object_node, TypeInfo)
249 return Instance(object_node, [])
250
251 def collect_attrs(self, instances: list[Instance]) -> dict[TypeInfo, list[str]]:
252 """Collect attributes from all union/typevar variants."""

Callers 1

expr_attrsMethod · 0.95

Calls 2

InstanceClass · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected