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

Method record_precise_if_checked_scope

mypy/stats.py:348–355  ·  view source on GitHub ↗
(self, node: Node)

Source from the content-addressed store, hash-verified

346 self.type(self.typemap.get(node))
347
348 def record_precise_if_checked_scope(self, node: Node) -> None:
349 if isinstance(node, Expression) and self.typemap and node not in self.typemap:
350 kind = TYPE_UNANALYZED
351 elif self.is_checked_scope():
352 kind = TYPE_PRECISE
353 else:
354 kind = TYPE_ANY
355 self.record_line(node.line, kind)
356
357 def type(self, t: Type | None) -> None:
358 t = get_proper_type(t)

Callers 10

visit_pass_stmtMethod · 0.95
visit_break_stmtMethod · 0.95
visit_continue_stmtMethod · 0.95
visit_name_exprMethod · 0.95
visit_str_exprMethod · 0.95
visit_bytes_exprMethod · 0.95
visit_int_exprMethod · 0.95
visit_float_exprMethod · 0.95
visit_complex_exprMethod · 0.95
visit_ellipsisMethod · 0.95

Calls 3

is_checked_scopeMethod · 0.95
record_lineMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected