Apply fixes, remove duplicates.

Apply fixes to _random, cStringIO, errno, operator, sys, zlib, etc.; also,
remove duplicate 2.7/math.pyi, 2.7/marshal.pyi.
This commit is contained in:
Matthias Kramm
2015-09-30 12:04:57 -07:00
parent fc2ddb852c
commit 56dcc02e25
19 changed files with 734 additions and 605 deletions

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: ...