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

Method store_type

mypy/checker.py:7808–7810  ·  view source on GitHub ↗

Store the type of a node in the type map.

(self, node: Expression, typ: Type)

Source from the content-addressed store, hash-verified

7806 return self.named_type("builtins.str")
7807
7808 def store_type(self, node: Expression, typ: Type) -> None:
7809 """Store the type of a node in the type map."""
7810 self._type_maps[-1][node] = typ
7811
7812 def has_type(self, node: Expression) -> bool:
7813 return any(node in m for m in reversed(self._type_maps))

Callers 9

check_lvalueMethod · 0.95
set_inferred_typeMethod · 0.95
check_callMethod · 0.80
check_callable_callMethod · 0.80
visit_assignment_exprMethod · 0.80
acceptMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected