Skip to content

Commit 3d8bffa

Browse files
authored
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 python/mypy#9454 (comment)
1 parent ba0f2b9 commit 3d8bffa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: stdlib/pkgutil.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
from _typeshed import SupportsRead
3-
from typing import IO, Any, Callable, Iterable, Iterator, NamedTuple, Optional, Tuple, Union
3+
from typing import IO, Any, Callable, Iterable, Iterator, List, NamedTuple, Optional, Tuple, Union
44

55
if sys.version_info >= (3,):
66
from importlib.abc import Loader, MetaPathFinder, PathEntryFinder
@@ -18,7 +18,7 @@ if sys.version_info >= (3, 6):
1818
else:
1919
_ModuleInfoLike = Tuple[Union[MetaPathFinder, PathEntryFinder], str, bool]
2020

21-
def extend_path(path: Iterable[str], name: str) -> Iterable[str]: ...
21+
def extend_path(path: List[str], name: str) -> List[str]: ...
2222

2323
class ImpImporter:
2424
def __init__(self, path: Optional[str] = ...) -> None: ...

0 commit comments

Comments
 (0)