This commit is contained in:
Jelle Zijlstra 2026-05-02 10:14:11 -07:00
parent 9219c83ec4
commit 367c441a8e

View file

@ -1177,8 +1177,9 @@ def iter_ast_classes():
def do(cls):
if cls.__module__ != 'ast':
return
if cls is ast.Index:
return
with warnings.catch_warnings(action="ignore", category=DeprecationWarning):
if cls is ast.Index:
return
# Don't attempt to create instances of abstract AST nodes
if _ast._is_abstract(cls):
return