From 419935228765821c88bf111498756dc46b5209ba Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Sat, 6 Jun 2020 11:04:05 -0400 Subject: [PATCH] Fix typing.ForwardRef.__eq__ stub (#4177) The return type of `__eq___` should be `bool`. Otherwise, `mypy --disallow-any-unimported --no-silence-site-packages` fails because the return type becomes `Union[bool, Any]` due to an unfollowed import. --- stdlib/3/typing.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index 7fe15b9ff..330624141 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -680,6 +680,6 @@ if sys.version_info >= (3, 7): def __init__(self, arg: str, is_argument: bool = ...) -> None: ... def _evaluate(self, globalns: Optional[Dict[str, Any]], localns: Optional[Dict[str, Any]]) -> Optional[Any]: ... - def __eq__(self, other: Any) -> Union[bool, NotImplemented]: ... + def __eq__(self, other: Any) -> bool: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ...