mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
ast.NodeVisitor: Add visit_* methods for ast nodes new in 3.8-3.10 (#9413)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user