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
This commit is contained in:
Shantanu
2021-04-15 12:43:53 -07:00
committed by GitHub
parent ba0f2b929b
commit 3d8bffae80

View File

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