Remove compatibility aliases (#5464)

* Remove compatibility aliases

Remove a few instances of Text

Use aliases from _typeshed

* Remove unused imports
This commit is contained in:
Sebastian Rittau
2021-05-15 19:49:20 +02:00
committed by GitHub
parent 056981b957
commit 841a365284
26 changed files with 483 additions and 585 deletions

View File

@@ -8,8 +8,6 @@ class ModuleInfo(NamedTuple):
name: str
ispkg: bool
_ModuleInfoLike = ModuleInfo
def extend_path(path: List[str], name: str) -> List[str]: ...
class ImpImporter:
@@ -22,11 +20,11 @@ def find_loader(fullname: str) -> Optional[Loader]: ...
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 iter_modules(path: Optional[Iterable[str]] = ..., prefix: str = ...) -> Iterator[ModuleInfo]: ...
def read_code(stream: SupportsRead[bytes]) -> Any: ... # undocumented
def walk_packages(
path: Optional[Iterable[str]] = ..., prefix: str = ..., onerror: Optional[Callable[[str], None]] = ...
) -> Iterator[_ModuleInfoLike]: ...
) -> Iterator[ModuleInfo]: ...
def get_data(package: str, resource: str) -> Optional[bytes]: ...
if sys.version_info >= (3, 9):