From 4e16c06505ef57510fec0de5b44f6b36f7397f7d Mon Sep 17 00:00:00 2001 From: Jon Banafato Date: Wed, 21 Apr 2021 20:06:15 -0400 Subject: [PATCH] Add missing tag attribute to TypeIgnore stub This attribute was [added in 3.8]. This change lets mypy resolve the type correctly instead of failing with an attr-defined error. [added in 3.8]: https://github.com/python/cpython/pull/13479 --- stdlib/_ast.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/_ast.pyi b/stdlib/_ast.pyi index 1555652902ed..fd0bc107dfaf 100644 --- a/stdlib/_ast.pyi +++ b/stdlib/_ast.pyi @@ -25,7 +25,8 @@ class mod(AST): ... if sys.version_info >= (3, 8): class type_ignore(AST): ... - class TypeIgnore(type_ignore): ... + class TypeIgnore(type_ignore): + tag: str class FunctionType(mod): argtypes: typing.List[expr] returns: expr