mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
improve zipimport module
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
"""Stub file for the 'zipimport' module."""
|
||||
# This is an autogenerated file. It serves as a starting point
|
||||
# for a more precise manual annotation of this module.
|
||||
# Feel free to edit the source below, but remove this header when you do.
|
||||
|
||||
from typing import Any, List, Tuple, Dict, Generic
|
||||
from typing import Dict
|
||||
|
||||
class ZipImportError(ImportError):
|
||||
pass
|
||||
|
||||
_zip_directory_cache = ... # type: Dict[str, dict]
|
||||
|
||||
class zipimporter(object):
|
||||
def find_module(self, a: str, *args, **kwargs) -> None: ...
|
||||
def get_code(self, a: str) -> Any: ...
|
||||
def get_data(self, a: str) -> str:
|
||||
raise IOError()
|
||||
def get_filename(self, a: str) -> str: ...
|
||||
def get_source(self, a: str) -> Any: ...
|
||||
def is_package(self, a: str) -> bool: ...
|
||||
def load_module(self, a: str) -> Any: ...
|
||||
archive = ... # type: str
|
||||
prefix = ... # type: str
|
||||
_files = ... # type: Dict[str, tuple]
|
||||
def __init__(self, path: str) -> None:
|
||||
raise ZipImportError
|
||||
def find_module(self, fullname: str, path: str = ...) -> Optional[zipimporter]: ...
|
||||
def get_code(self, fullname: str) -> code: ...
|
||||
def get_data(self, fullname: str) -> str:
|
||||
raise IOError
|
||||
def get_filename(self, fullname: str) -> str: ...
|
||||
def get_source(self, fullname: str) -> str: ...
|
||||
def is_package(self, fullname: str) -> bool: ...
|
||||
def load_module(self, fullname: str) -> module: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user