mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-23 17:28:38 +08:00
Document visit method return type (#13831)
This commit is contained in:
@@ -1893,8 +1893,12 @@ if sys.version_info >= (3, 14):
|
||||
def compare(left: AST, right: AST, /, *, compare_attributes: bool = False) -> bool: ...
|
||||
|
||||
class NodeVisitor:
|
||||
# All visit methods below can be overwritten by subclasses and return an
|
||||
# arbitrary value, which is passed to the caller.
|
||||
def visit(self, node: AST) -> Any: ...
|
||||
def generic_visit(self, node: AST) -> Any: ...
|
||||
# The following visit methods are not defined on NodeVisitor, but can
|
||||
# be implemented by subclasses and are called during a visit if defined.
|
||||
def visit_Module(self, node: Module) -> Any: ...
|
||||
def visit_Interactive(self, node: Interactive) -> Any: ...
|
||||
def visit_Expression(self, node: Expression) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user