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

Method parent

mypy/fastparse.py:1936–1940  ·  view source on GitHub ↗

Return the AST node above the one we are processing

(self)

Source from the content-addressed store, hash-verified

1934 self.node_stack.pop()
1935
1936 def parent(self) -> AST | None:
1937 """Return the AST node above the one we are processing"""
1938 if len(self.node_stack) < 2:
1939 return None
1940 return self.node_stack[-2]
1941
1942 def fail(self, msg: ErrorMessage, line: int, column: int) -> None:
1943 if self.errors:

Callers 1

visit_CallMethod · 0.95

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected