add (overwrite with) mypy stubs, if available

This commit is contained in:
Matthias Kramm
2015-09-30 07:36:12 -07:00
parent 69e10b3aed
commit 337abed05a
432 changed files with 22360 additions and 776 deletions
+19 -19
View File
@@ -1,34 +1,34 @@
"""Stubs for the 'imp' module."""
from typing import List, Optional, Tuple, Iterable, IO, Any
import types
C_BUILTIN = ... # type: int
C_EXTENSION = ... # type: int
IMP_HOOK = ... # type: int
PKG_DIRECTORY = ... # type: int
PY_CODERESOURCE = ... # type: int
PY_COMPILED = ... # type: int
PY_FROZEN = ... # type: int
PY_RESOURCE = ... # type: int
PY_SOURCE = ... # type: int
SEARCH_ERROR = ... # type: int
def acquire_lock() -> None: ...
def find_module(name: str, path: Iterable[str] = None) -> Optional[Tuple[str, str, Tuple[str, str, int]]]: ...
def get_magic() -> str: ...
def get_suffixes() -> List[Tuple[str, str, int]]: ...
PY_SOURCE = 0
PY_COMPILED = 0
C_EXTENSION = 0
def find_module(name: str, path: Iterable[str] = None) -> Optional[Tuple[str, str, Tuple[str, str, int]]]: ...
# TODO: module object
def load_module(name: str, file: str, pathname: str, description: Tuple[str, str, int]) -> types.ModuleType: ...
def new_module(name: str) -> types.ModuleType: ...
def lock_held() -> bool: ...
def acquire_lock() -> None: ...
def release_lock() -> None: ...
PKG_DIRECTORY = 0
C_BUILTIN = 0
PY_FROZEN = 0
SEARCH_ERROR = 0
def init_builtin(name: str) -> types.ModuleType: ...
def init_frozen(name: str) -> types.ModuleType: ...
def is_builtin(name: str) -> int: ...
def is_frozen(name: str) -> bool: ...
def load_compiled(name: str, pathname: str, file: IO[Any] = None) -> types.ModuleType: ...
def load_dynamic(name: str, pathname: str, file: IO[Any] = None) -> types.ModuleType: ...
def load_module(name: str, file: str, pathname: str, description: Tuple[str, str, int]) -> types.ModuleType: ...
def load_source(name: str, pathname: str, file: IO[Any] = None) -> types.ModuleType: ...
def lock_held() -> bool: ...
def new_module(name: str) -> types.ModuleType: ...
def release_lock() -> None: ...
class NullImporter:
def __init__(self, path_string: str) -> None: ...