File: imp.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (35 lines) | stat: -rw-r--r-- 1,461 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""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] = ...) -> Optional[Tuple[str, str, Tuple[str, str, int]]]: ...
def get_magic() -> str: ...
def get_suffixes() -> List[Tuple[str, str, int]]: ...
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] = ...) -> types.ModuleType: ...
def load_dynamic(name: str, pathname: str, file: IO[Any] = ...) -> 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] = ...) -> 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: ...
    def find_module(self, fullname: str, path: str = ...) -> None: ...