mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
114 lines
3.6 KiB
Python
114 lines
3.6 KiB
Python
"""Stubs for the 'sys' module."""
|
|
|
|
from typing import (
|
|
List, Sequence, Any, Dict, Tuple, BinaryIO, overload
|
|
)
|
|
|
|
class _flags:
|
|
bytes_warning = ... # type: int
|
|
debug = ... # type: int
|
|
division_new = ... # type: int
|
|
division_warning = ... # type: int
|
|
dont_write_bytecode = ... # type: int
|
|
hash_randomization = ... # type: int
|
|
ignore_environment = ... # type: int
|
|
inspect = ... # type: int
|
|
interactive = ... # type: int
|
|
no_site = ... # type: int
|
|
no_user_site = ... # type: int
|
|
optimize = ... # type: int
|
|
py3k_warning = ... # type: int
|
|
tabcheck = ... # type: int
|
|
unicode = ... # type: int
|
|
verbose = ... # type: int
|
|
|
|
class _float_info:
|
|
max = ... # type: float
|
|
max_exp = ... # type: int
|
|
max_10_exp = ... # type: int
|
|
min = ... # type: float
|
|
min_exp = ... # type: int
|
|
min_10_exp = ... # type: int
|
|
dig = ... # type: int
|
|
mant_dig = ... # type: int
|
|
epsilon = ... # type: float
|
|
radix = ... # type: int
|
|
rounds = ... # type: int
|
|
|
|
class _version_info(Tuple[int, int, int, str, int]):
|
|
major = 0
|
|
minor = 0
|
|
micro = 0
|
|
releaselevel = ''
|
|
serial = 0
|
|
|
|
_mercurial = ... # type: tuple
|
|
api_version = ... # type: int
|
|
argv = ... # type: List[str]
|
|
builtin_module_names = ... # type: List[str]
|
|
byteorder = ... # type: str
|
|
copyright = ... # type: str
|
|
dont_write_bytecode = ... # type: bool
|
|
exec_prefix = ... # type: str
|
|
executable = ... # type: str
|
|
flags = ... # type: _flags
|
|
float_repr_style = ... # type: str
|
|
hexversion = ... # type: int
|
|
long_info = ... # type: object
|
|
maxint = ... # type: int
|
|
maxsize = ... # type: int
|
|
maxunicode = ... # type: int
|
|
modules = ... # type: Dict[str, module]
|
|
path = ... # type: List[str]
|
|
platform = ... # type: str
|
|
prefix = ... # type: str
|
|
py3kwarning = ... # type: bool
|
|
stderr = ... # type: file
|
|
stdin = ... # type: file
|
|
stdout = ... # type: file
|
|
subversion = ... # type: tuple
|
|
version = ... # type: str
|
|
version_info = ... # type: Tuple[int]
|
|
warnoptions = ... # type: object
|
|
float_info = ... # type: _float_info
|
|
version_info = ... # type: _version_info
|
|
|
|
class _WindowsVersionType:
|
|
major = ... # type: Any
|
|
minor = ... # type: Any
|
|
build = ... # type: Any
|
|
platform = ... # type: Any
|
|
service_pack = ... # type: Any
|
|
service_pack_major = ... # type: Any
|
|
service_pack_minor = ... # type: Any
|
|
suite_mask = ... # type: Any
|
|
product_type = ... # type: Any
|
|
|
|
def getwindowsversion() -> _WindowsVersionType: ... # TODO return type
|
|
|
|
def _clear_type_cache() -> None: ...
|
|
def _current_frames() -> Dict[int, Any]: ...
|
|
def _getframe(depth: int = ...) -> Any: ... # TODO: Return FrameObject
|
|
def call_tracing(fn: Any, args: Any) -> Any: ...
|
|
def displayhook(value: int) -> None: ... # value might be None
|
|
def excepthook(type_: type, value: BaseException, traceback: Any) -> None: ... # TODO traceback type
|
|
def exc_clear() -> None:
|
|
raise DeprecationWarning()
|
|
def exc_info() -> Tuple[type, Any, Any]: ... # TODO traceback type
|
|
def exit(arg: int = ...) -> None:
|
|
raise SystemExit()
|
|
def getcheckinterval() -> int: ... # deprecated
|
|
def getdefaultencoding() -> str: ...
|
|
def getdlopenflags() -> int: ...
|
|
def getfilesystemencoding() -> Union[str, None]: ...
|
|
def getrefcount(object) -> int: ...
|
|
def getrecursionlimit() -> int: ...
|
|
def getsizeof(obj: object, default: int = ...) -> int: ...
|
|
def getprofile() -> None: ...
|
|
def gettrace() -> None: ...
|
|
def setcheckinterval(interval: int) -> None: ... # deprecated
|
|
def setdlopenflags(n: int) -> None: ...
|
|
def setprofile(profilefunc: Any) -> None: ... # TODO type
|
|
def setrecursionlimit(limit: int) -> None: ...
|
|
def settrace(tracefunc: Any) -> None: ... # TODO type
|