Add various missing undocumented functions (#4554)

Mostly addresses #2149
This commit is contained in:
Sebastian Rittau
2020-09-20 07:59:35 +02:00
committed by GitHub
parent 4876b55382
commit 9a6b500909
5 changed files with 24 additions and 7 deletions

View File

@@ -1,6 +1,5 @@
# Stubs for pkgutil
import sys
from _typeshed import SupportsRead
from typing import IO, Any, Callable, Iterable, Iterator, NamedTuple, Optional, Tuple, Union
if sys.version_info >= (3,):
@@ -32,6 +31,7 @@ def get_importer(path_item: str) -> Optional[PathEntryFinder]: ...
def get_loader(module_or_name: str) -> Loader: ...
def iter_importers(fullname: str = ...) -> Iterator[Union[MetaPathFinder, PathEntryFinder]]: ...
def iter_modules(path: Optional[Iterable[str]] = ..., prefix: str = ...) -> Iterator[_ModuleInfoLike]: ...
def read_code(stream: SupportsRead[bytes]) -> Any: ... # undocumented
def walk_packages(
path: Optional[Iterable[str]] = ..., prefix: str = ..., onerror: Optional[Callable[[str], None]] = ...
) -> Iterator[_ModuleInfoLike]: ...