ast.NodeVisitor: Add visit_* methods for ast nodes new in 3.8-3.10 (#9413)

This commit is contained in:
Alex Waygood
2022-12-27 04:27:44 +00:00
committed by GitHub
parent 59b1a78d5f
commit 154452ffc2

View File

@@ -89,6 +89,7 @@ class NodeVisitor:
def visit_Constant(self, node: Constant) -> Any: ...
if sys.version_info >= (3, 8):
def visit_NamedExpr(self, node: NamedExpr) -> Any: ...
def visit_TypeIgnore(self, node: TypeIgnore) -> Any: ...
def visit_Attribute(self, node: Attribute) -> Any: ...
def visit_Subscript(self, node: Subscript) -> Any: ...
@@ -135,6 +136,16 @@ class NodeVisitor:
def visit_keyword(self, node: keyword) -> Any: ...
def visit_alias(self, node: alias) -> Any: ...
def visit_withitem(self, node: withitem) -> Any: ...
if sys.version_info >= (3, 10):
def visit_Match(self, node: Match) -> Any: ...
def visit_MatchValue(self, node: MatchValue) -> Any: ...
def visit_MatchSequence(self, node: MatchSequence) -> Any: ...
def visit_MatchStar(self, node: MatchStar) -> Any: ...
def visit_MatchMapping(self, node: MatchMapping) -> Any: ...
def visit_MatchClass(self, node: MatchClass) -> Any: ...
def visit_MatchAs(self, node: MatchAs) -> Any: ...
def visit_MatchOr(self, node: MatchOr) -> Any: ...
# visit methods for deprecated nodes
def visit_ExtSlice(self, node: ExtSlice) -> Any: ...
def visit_Index(self, node: Index) -> Any: ...