mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
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]')])"
```
This commit is contained in:
@@ -388,3 +388,4 @@ class withitem(AST):
|
||||
|
||||
class TypeIgnore(AST):
|
||||
lineno: int
|
||||
tag: str
|
||||
|
||||
Reference in New Issue
Block a user