Skip to content

Commit 62a833c

Browse files
authored
typed_ast: Add missing field to typed_ast.ast3.TypeIgnore (#9868)
```pycon >>> import typed_ast.ast3 as ast3 >>> x = ast3.parse('def foo(): ... # type: ignore[attr-defined]') >>> ast3.dump(x) "Module(body=[FunctionDef(name='foo', args=arguments(args=[], vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, defaults=[]), body=[Expr(value=Ellipsis())], decorator_list=[], returns=None, type_comment=None)], type_ignores=[TypeIgnore(lineno=1, tag='[attr-defined]')])" ```
1 parent 8705cad commit 62a833c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stubs/typed-ast/typed_ast/ast3.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,3 +388,4 @@ class withitem(AST):
388388

389389
class TypeIgnore(AST):
390390
lineno: int
391+
tag: str

0 commit comments

Comments
 (0)