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

Method visit_Attribute

mypy/fastparse.py:2151–2157  ·  view source on GitHub ↗
(self, n: Attribute)

Source from the content-addressed store, hash-verified

2149
2150 # Attribute(expr value, identifier attr, expr_context ctx)
2151 def visit_Attribute(self, n: Attribute) -> Type:
2152 before_dot = self.visit(n.value)
2153
2154 if isinstance(before_dot, UnboundType) and not before_dot.args:
2155 return UnboundType(f"{before_dot.name}.{n.attr}", line=self.line, column=n.col_offset)
2156 else:
2157 return self.invalid_type(n)
2158
2159 # Used for Callable[[X *Ys, Z], R] etc.
2160 def visit_Starred(self, n: ast3.Starred) -> Type:

Callers

nothing calls this directly

Calls 4

visitMethod · 0.95
invalid_typeMethod · 0.95
UnboundTypeClass · 0.90
isinstanceFunction · 0.85

Tested by

no test coverage detected