MCPcopy
hub / github.com/python/mypy / node_type

Method node_type

mypyc/irbuild/builder.py:1477–1484  ·  view source on GitHub ↗
(self, node: Expression)

Source from the content-addressed store, hash-verified

1475 return self.mapper.type_to_rtype(typ)
1476
1477 def node_type(self, node: Expression) -> RType:
1478 if isinstance(node, IntExpr):
1479 # TODO: Don't special case IntExpr
1480 return int_rprimitive
1481 if node not in self.types:
1482 return object_rprimitive
1483 mypy_type = self.types[node]
1484 return self.type_to_rtype(mypy_type)
1485
1486 def add_var_to_env_class(
1487 self,

Callers 15

acceptMethod · 0.95
init_final_staticMethod · 0.95
get_assignment_targetMethod · 0.95
shortcircuit_exprMethod · 0.95
is_native_attr_refMethod · 0.95
make_for_loop_generatorFunction · 0.80
get_expr_lengthFunction · 0.80
get_expr_length_valueFunction · 0.80

Calls 2

type_to_rtypeMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected