mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use @deprecated for those visit methods of class NodeVisitor that deal with classes that have already been marked with @deprecated and add type: ignore[deprecated] comments. (#12864)
This commit is contained in:
committed by
GitHub
parent
b0ac25e7bd
commit
8d02c2a6df
@@ -2023,11 +2023,19 @@ class NodeVisitor:
|
||||
def visit_AugLoad(self, node: AugLoad) -> Any: ...
|
||||
def visit_AugStore(self, node: AugStore) -> Any: ...
|
||||
def visit_Param(self, node: Param) -> Any: ...
|
||||
def visit_Num(self, node: Num) -> Any: ...
|
||||
def visit_Str(self, node: Str) -> Any: ...
|
||||
def visit_Bytes(self, node: Bytes) -> Any: ...
|
||||
def visit_NameConstant(self, node: NameConstant) -> Any: ...
|
||||
def visit_Ellipsis(self, node: Ellipsis) -> Any: ...
|
||||
|
||||
if sys.version_info < (3, 14):
|
||||
@deprecated("Replaced by visit_Constant; removed in Python 3.14")
|
||||
def visit_Num(self, node: Num) -> Any: ... # type: ignore[deprecated]
|
||||
@deprecated("Replaced by visit_Constant; removed in Python 3.14")
|
||||
def visit_Str(self, node: Str) -> Any: ... # type: ignore[deprecated]
|
||||
@deprecated("Replaced by visit_Constant; removed in Python 3.14")
|
||||
def visit_Bytes(self, node: Bytes) -> Any: ... # type: ignore[deprecated]
|
||||
@deprecated("Replaced by visit_Constant; removed in Python 3.14")
|
||||
def visit_NameConstant(self, node: NameConstant) -> Any: ... # type: ignore[deprecated]
|
||||
@deprecated("Replaced by visit_Constant; removed in Python 3.14")
|
||||
def visit_Ellipsis(self, node: Ellipsis) -> Any: ... # type: ignore[deprecated]
|
||||
|
||||
|
||||
class NodeTransformer(NodeVisitor):
|
||||
def generic_visit(self, node: AST) -> AST: ...
|
||||
|
||||
Reference in New Issue
Block a user