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

Function stringify_name

mypy/fastparse.py:2170–2177  ·  view source on GitHub ↗
(n: AST)

Source from the content-addressed store, hash-verified

2168
2169
2170def stringify_name(n: AST) -> str | None:
2171 if isinstance(n, Name):
2172 return n.id
2173 elif isinstance(n, Attribute):
2174 sv = stringify_name(n.value)
2175 if sv is not None:
2176 return f"{sv}.{n.attr}"
2177 return None # Can't do it.
2178
2179
2180class FindAttributeAssign(TraverserVisitor):

Callers 1

visit_CallMethod · 0.85

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…