Skip to content

Commit

Permalink
typed_ast: Add missing field to typed_ast.ast3.TypeIgnore (#9868)
Browse files Browse the repository at this point in the history
```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]')])"
```
  • Loading branch information
AlexWaygood authored Mar 11, 2023
1 parent 8705cad commit 62a833c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stubs/typed-ast/typed_ast/ast3.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,4 @@ class withitem(AST):

class TypeIgnore(AST):
lineno: int
tag: str

0 comments on commit 62a833c

Please sign in to comment.