Add missing tag attribute to TypeIgnore stub (#5238)

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
This commit is contained in:
Jon Banafato
2021-04-21 21:48:45 -04:00
committed by GitHub
parent fc0775664d
commit 2686e20060

View File

@@ -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