From 34f604bf81bf369bab63c0d5180fa5d55017da88 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Thu, 15 Apr 2021 12:08:57 -0700 Subject: [PATCH 1/2] [pkgutil] returns a List[str] usually Yes, technically it returns whatever its first argument is if it isn't a list. Doing this because https://github.com/python/mypy/pull/9454#issuecomment-820661189 --- stdlib/pkgutil.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/pkgutil.pyi b/stdlib/pkgutil.pyi index ae042b73de60..b30021b35a26 100644 --- a/stdlib/pkgutil.pyi +++ b/stdlib/pkgutil.pyi @@ -18,7 +18,7 @@ if sys.version_info >= (3, 6): else: _ModuleInfoLike = Tuple[Union[MetaPathFinder, PathEntryFinder], str, bool] -def extend_path(path: Iterable[str], name: str) -> Iterable[str]: ... +def extend_path(path: List[str], name: str) -> List[str]: ... class ImpImporter: def __init__(self, dirname: Optional[str] = ...) -> None: ... From 8d6a52d78234286fd6c2dacf5fbe5e422977bedd Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 15 Apr 2021 12:17:03 -0700 Subject: [PATCH 2/2] add missing import --- stdlib/pkgutil.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/pkgutil.pyi b/stdlib/pkgutil.pyi index b30021b35a26..ec036b4ec7f2 100644 --- a/stdlib/pkgutil.pyi +++ b/stdlib/pkgutil.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import SupportsRead -from typing import IO, Any, Callable, Iterable, Iterator, NamedTuple, Optional, Tuple, Union +from typing import IO, Any, Callable, Iterable, Iterator, List, NamedTuple, Optional, Tuple, Union if sys.version_info >= (3,): from importlib.abc import Loader, MetaPathFinder, PathEntryFinder