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

Method get

mypy/binder.py:273–279  ·  view source on GitHub ↗
(self, expr: Expression)

Source from the content-addressed store, hash-verified

271 self.frames[-1].suppress_unreachable_warnings = True
272
273 def get(self, expr: Expression) -> Type | None:
274 key = literal_hash(expr)
275 assert key is not None, "Internal error: binder tried to get non-literal"
276 found = self._get(key)
277 if found is None:
278 return None
279 return found.type
280
281 def is_unreachable(self) -> bool:
282 # TODO: Copy the value of unreachable into new frames to avoid

Callers 2

update_from_optionsMethod · 0.45

Calls 2

_getMethod · 0.95
literal_hashFunction · 0.90

Tested by

no test coverage detected