Files
typeshed/stdlib/zipimport.pyi
Akuli 17dcea4a68 Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli)

* do the whole thing manually (srittau)

* merge changes (Akuli)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-05-15 15:33:39 +03:00

27 lines
1.1 KiB
Python

import os
import sys
from types import CodeType, ModuleType
from typing import Any, List, Optional, Tuple, Union
if sys.version_info >= (3, 7):
from importlib.abc import ResourceReader
class ZipImportError(ImportError): ...
class zipimporter(object):
archive: str
prefix: str
def __init__(self, path: Union[str, bytes, os.PathLike[Any]]) -> None: ...
def find_loader(
self, fullname: str, path: Optional[str] = ...
) -> Tuple[Optional[zipimporter], List[str]]: ... # undocumented
def find_module(self, fullname: str, path: Optional[str] = ...) -> Optional[zipimporter]: ...
def get_code(self, fullname: str) -> CodeType: ...
def get_data(self, pathname: str) -> str: ...
def get_filename(self, fullname: str) -> str: ...
if sys.version_info >= (3, 7):
def get_resource_reader(self, fullname: str) -> Optional[ResourceReader]: ... # undocumented
def get_source(self, fullname: str) -> Optional[str]: ...
def is_package(self, fullname: str) -> bool: ...
def load_module(self, fullname: str) -> ModuleType: ...