From 3d8bffae80db67d04a101b5a648458d959ba1fda Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Thu, 15 Apr 2021 12:43:53 -0700 Subject: [PATCH] pkgutil: returns a List[str] usually (#5222) 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/pkgutil.pyi b/stdlib/pkgutil.pyi index 1f974619f..0935e9225 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 @@ -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, path: Optional[str] = ...) -> None: ...