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

Method replay_lookup

mypy/checker.py:7185–7201  ·  view source on GitHub ↗
(new_parent_type: ProperType)

Source from the content-addressed store, hash-verified

7183 member_name = expr.name
7184
7185 def replay_lookup(new_parent_type: ProperType) -> Type | None:
7186 with self.msg.filter_errors() as w:
7187 member_type = analyze_member_access(
7188 name=member_name,
7189 typ=new_parent_type,
7190 context=parent_expr,
7191 is_lvalue=False,
7192 is_super=False,
7193 is_operator=False,
7194 original_type=new_parent_type,
7195 chk=self,
7196 in_literal_context=False,
7197 )
7198 if w.has_new_errors():
7199 return None
7200 else:
7201 return member_type
7202
7203 elif isinstance(expr, IndexExpr):
7204 parent_expr = self._propagate_walrus_assignments(expr.base, output)

Callers

nothing calls this directly

Calls 5

analyze_member_accessFunction · 0.90
make_simplified_unionFunction · 0.90
isinstanceFunction · 0.85
filter_errorsMethod · 0.80
has_new_errorsMethod · 0.80

Tested by

no test coverage detected