mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-14 15:57:07 +08:00
Merge pull request #141 from bdarnell/updates
Various updates to stdlib modules
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
class _Feature: ...
|
||||
from sys import _version_info
|
||||
|
||||
class _Feature:
|
||||
def getOptionalRelease(self) -> _version_info: ...
|
||||
def getMandatoryRelease(self) -> _version_info: ...
|
||||
|
||||
absolute_import = ... # type: _Feature
|
||||
division = ... # type: _Feature
|
||||
|
||||
20
stdlib/3/_compression.pyi
Normal file
20
stdlib/3/_compression.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
# Stubs for _compression (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
import io
|
||||
|
||||
BUFFER_SIZE = ... # type: Any
|
||||
|
||||
class BaseStream(io.BufferedIOBase): ...
|
||||
|
||||
class DecompressReader(io.RawIOBase):
|
||||
def readable(self): ...
|
||||
def __init__(self, fp, decomp_factory, trailing_error=..., **decomp_args): ...
|
||||
def close(self): ...
|
||||
def seekable(self): ...
|
||||
def readinto(self, b): ...
|
||||
def read(self, size=-1): ...
|
||||
def seek(self, offset, whence=...): ...
|
||||
def tell(self): ...
|
||||
295
stdlib/3/_curses.pyi
Normal file
295
stdlib/3/_curses.pyi
Normal file
@@ -0,0 +1,295 @@
|
||||
# Stubs for _curses (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
ALL_MOUSE_EVENTS = ... # type: int
|
||||
A_ALTCHARSET = ... # type: int
|
||||
A_ATTRIBUTES = ... # type: int
|
||||
A_BLINK = ... # type: int
|
||||
A_BOLD = ... # type: int
|
||||
A_CHARTEXT = ... # type: int
|
||||
A_COLOR = ... # type: int
|
||||
A_DIM = ... # type: int
|
||||
A_HORIZONTAL = ... # type: int
|
||||
A_INVIS = ... # type: int
|
||||
A_LEFT = ... # type: int
|
||||
A_LOW = ... # type: int
|
||||
A_NORMAL = ... # type: int
|
||||
A_PROTECT = ... # type: int
|
||||
A_REVERSE = ... # type: int
|
||||
A_RIGHT = ... # type: int
|
||||
A_STANDOUT = ... # type: int
|
||||
A_TOP = ... # type: int
|
||||
A_UNDERLINE = ... # type: int
|
||||
A_VERTICAL = ... # type: int
|
||||
BUTTON1_CLICKED = ... # type: int
|
||||
BUTTON1_DOUBLE_CLICKED = ... # type: int
|
||||
BUTTON1_PRESSED = ... # type: int
|
||||
BUTTON1_RELEASED = ... # type: int
|
||||
BUTTON1_TRIPLE_CLICKED = ... # type: int
|
||||
BUTTON2_CLICKED = ... # type: int
|
||||
BUTTON2_DOUBLE_CLICKED = ... # type: int
|
||||
BUTTON2_PRESSED = ... # type: int
|
||||
BUTTON2_RELEASED = ... # type: int
|
||||
BUTTON2_TRIPLE_CLICKED = ... # type: int
|
||||
BUTTON3_CLICKED = ... # type: int
|
||||
BUTTON3_DOUBLE_CLICKED = ... # type: int
|
||||
BUTTON3_PRESSED = ... # type: int
|
||||
BUTTON3_RELEASED = ... # type: int
|
||||
BUTTON3_TRIPLE_CLICKED = ... # type: int
|
||||
BUTTON4_CLICKED = ... # type: int
|
||||
BUTTON4_DOUBLE_CLICKED = ... # type: int
|
||||
BUTTON4_PRESSED = ... # type: int
|
||||
BUTTON4_RELEASED = ... # type: int
|
||||
BUTTON4_TRIPLE_CLICKED = ... # type: int
|
||||
BUTTON_ALT = ... # type: int
|
||||
BUTTON_CTRL = ... # type: int
|
||||
BUTTON_SHIFT = ... # type: int
|
||||
COLOR_BLACK = ... # type: int
|
||||
COLOR_BLUE = ... # type: int
|
||||
COLOR_CYAN = ... # type: int
|
||||
COLOR_GREEN = ... # type: int
|
||||
COLOR_MAGENTA = ... # type: int
|
||||
COLOR_RED = ... # type: int
|
||||
COLOR_WHITE = ... # type: int
|
||||
COLOR_YELLOW = ... # type: int
|
||||
ERR = ... # type: int
|
||||
KEY_A1 = ... # type: int
|
||||
KEY_A3 = ... # type: int
|
||||
KEY_B2 = ... # type: int
|
||||
KEY_BACKSPACE = ... # type: int
|
||||
KEY_BEG = ... # type: int
|
||||
KEY_BREAK = ... # type: int
|
||||
KEY_BTAB = ... # type: int
|
||||
KEY_C1 = ... # type: int
|
||||
KEY_C3 = ... # type: int
|
||||
KEY_CANCEL = ... # type: int
|
||||
KEY_CATAB = ... # type: int
|
||||
KEY_CLEAR = ... # type: int
|
||||
KEY_CLOSE = ... # type: int
|
||||
KEY_COMMAND = ... # type: int
|
||||
KEY_COPY = ... # type: int
|
||||
KEY_CREATE = ... # type: int
|
||||
KEY_CTAB = ... # type: int
|
||||
KEY_DC = ... # type: int
|
||||
KEY_DL = ... # type: int
|
||||
KEY_DOWN = ... # type: int
|
||||
KEY_EIC = ... # type: int
|
||||
KEY_END = ... # type: int
|
||||
KEY_ENTER = ... # type: int
|
||||
KEY_EOL = ... # type: int
|
||||
KEY_EOS = ... # type: int
|
||||
KEY_EXIT = ... # type: int
|
||||
KEY_F0 = ... # type: int
|
||||
KEY_F1 = ... # type: int
|
||||
KEY_F10 = ... # type: int
|
||||
KEY_F11 = ... # type: int
|
||||
KEY_F12 = ... # type: int
|
||||
KEY_F13 = ... # type: int
|
||||
KEY_F14 = ... # type: int
|
||||
KEY_F15 = ... # type: int
|
||||
KEY_F16 = ... # type: int
|
||||
KEY_F17 = ... # type: int
|
||||
KEY_F18 = ... # type: int
|
||||
KEY_F19 = ... # type: int
|
||||
KEY_F2 = ... # type: int
|
||||
KEY_F20 = ... # type: int
|
||||
KEY_F21 = ... # type: int
|
||||
KEY_F22 = ... # type: int
|
||||
KEY_F23 = ... # type: int
|
||||
KEY_F24 = ... # type: int
|
||||
KEY_F25 = ... # type: int
|
||||
KEY_F26 = ... # type: int
|
||||
KEY_F27 = ... # type: int
|
||||
KEY_F28 = ... # type: int
|
||||
KEY_F29 = ... # type: int
|
||||
KEY_F3 = ... # type: int
|
||||
KEY_F30 = ... # type: int
|
||||
KEY_F31 = ... # type: int
|
||||
KEY_F32 = ... # type: int
|
||||
KEY_F33 = ... # type: int
|
||||
KEY_F34 = ... # type: int
|
||||
KEY_F35 = ... # type: int
|
||||
KEY_F36 = ... # type: int
|
||||
KEY_F37 = ... # type: int
|
||||
KEY_F38 = ... # type: int
|
||||
KEY_F39 = ... # type: int
|
||||
KEY_F4 = ... # type: int
|
||||
KEY_F40 = ... # type: int
|
||||
KEY_F41 = ... # type: int
|
||||
KEY_F42 = ... # type: int
|
||||
KEY_F43 = ... # type: int
|
||||
KEY_F44 = ... # type: int
|
||||
KEY_F45 = ... # type: int
|
||||
KEY_F46 = ... # type: int
|
||||
KEY_F47 = ... # type: int
|
||||
KEY_F48 = ... # type: int
|
||||
KEY_F49 = ... # type: int
|
||||
KEY_F5 = ... # type: int
|
||||
KEY_F50 = ... # type: int
|
||||
KEY_F51 = ... # type: int
|
||||
KEY_F52 = ... # type: int
|
||||
KEY_F53 = ... # type: int
|
||||
KEY_F54 = ... # type: int
|
||||
KEY_F55 = ... # type: int
|
||||
KEY_F56 = ... # type: int
|
||||
KEY_F57 = ... # type: int
|
||||
KEY_F58 = ... # type: int
|
||||
KEY_F59 = ... # type: int
|
||||
KEY_F6 = ... # type: int
|
||||
KEY_F60 = ... # type: int
|
||||
KEY_F61 = ... # type: int
|
||||
KEY_F62 = ... # type: int
|
||||
KEY_F63 = ... # type: int
|
||||
KEY_F7 = ... # type: int
|
||||
KEY_F8 = ... # type: int
|
||||
KEY_F9 = ... # type: int
|
||||
KEY_FIND = ... # type: int
|
||||
KEY_HELP = ... # type: int
|
||||
KEY_HOME = ... # type: int
|
||||
KEY_IC = ... # type: int
|
||||
KEY_IL = ... # type: int
|
||||
KEY_LEFT = ... # type: int
|
||||
KEY_LL = ... # type: int
|
||||
KEY_MARK = ... # type: int
|
||||
KEY_MAX = ... # type: int
|
||||
KEY_MESSAGE = ... # type: int
|
||||
KEY_MIN = ... # type: int
|
||||
KEY_MOUSE = ... # type: int
|
||||
KEY_MOVE = ... # type: int
|
||||
KEY_NEXT = ... # type: int
|
||||
KEY_NPAGE = ... # type: int
|
||||
KEY_OPEN = ... # type: int
|
||||
KEY_OPTIONS = ... # type: int
|
||||
KEY_PPAGE = ... # type: int
|
||||
KEY_PREVIOUS = ... # type: int
|
||||
KEY_PRINT = ... # type: int
|
||||
KEY_REDO = ... # type: int
|
||||
KEY_REFERENCE = ... # type: int
|
||||
KEY_REFRESH = ... # type: int
|
||||
KEY_REPLACE = ... # type: int
|
||||
KEY_RESET = ... # type: int
|
||||
KEY_RESIZE = ... # type: int
|
||||
KEY_RESTART = ... # type: int
|
||||
KEY_RESUME = ... # type: int
|
||||
KEY_RIGHT = ... # type: int
|
||||
KEY_SAVE = ... # type: int
|
||||
KEY_SBEG = ... # type: int
|
||||
KEY_SCANCEL = ... # type: int
|
||||
KEY_SCOMMAND = ... # type: int
|
||||
KEY_SCOPY = ... # type: int
|
||||
KEY_SCREATE = ... # type: int
|
||||
KEY_SDC = ... # type: int
|
||||
KEY_SDL = ... # type: int
|
||||
KEY_SELECT = ... # type: int
|
||||
KEY_SEND = ... # type: int
|
||||
KEY_SEOL = ... # type: int
|
||||
KEY_SEXIT = ... # type: int
|
||||
KEY_SF = ... # type: int
|
||||
KEY_SFIND = ... # type: int
|
||||
KEY_SHELP = ... # type: int
|
||||
KEY_SHOME = ... # type: int
|
||||
KEY_SIC = ... # type: int
|
||||
KEY_SLEFT = ... # type: int
|
||||
KEY_SMESSAGE = ... # type: int
|
||||
KEY_SMOVE = ... # type: int
|
||||
KEY_SNEXT = ... # type: int
|
||||
KEY_SOPTIONS = ... # type: int
|
||||
KEY_SPREVIOUS = ... # type: int
|
||||
KEY_SPRINT = ... # type: int
|
||||
KEY_SR = ... # type: int
|
||||
KEY_SREDO = ... # type: int
|
||||
KEY_SREPLACE = ... # type: int
|
||||
KEY_SRESET = ... # type: int
|
||||
KEY_SRIGHT = ... # type: int
|
||||
KEY_SRSUME = ... # type: int
|
||||
KEY_SSAVE = ... # type: int
|
||||
KEY_SSUSPEND = ... # type: int
|
||||
KEY_STAB = ... # type: int
|
||||
KEY_SUNDO = ... # type: int
|
||||
KEY_SUSPEND = ... # type: int
|
||||
KEY_UNDO = ... # type: int
|
||||
KEY_UP = ... # type: int
|
||||
OK = ... # type: int
|
||||
REPORT_MOUSE_POSITION = ... # type: int
|
||||
_C_API = ... # type: Any
|
||||
version = ... # type: bytes
|
||||
|
||||
def baudrate(*args, **kwargs): ...
|
||||
def beep(*args, **kwargs): ...
|
||||
def can_change_color(*args, **kwargs): ...
|
||||
def cbreak(*args, **kwargs): ...
|
||||
def color_content(*args, **kwargs): ...
|
||||
def color_pair(*args, **kwargs): ...
|
||||
def curs_set(*args, **kwargs): ...
|
||||
def def_prog_mode(*args, **kwargs): ...
|
||||
def def_shell_mode(*args, **kwargs): ...
|
||||
def delay_output(*args, **kwargs): ...
|
||||
def doupdate(*args, **kwargs): ...
|
||||
def echo(*args, **kwargs): ...
|
||||
def endwin(*args, **kwargs): ...
|
||||
def erasechar(*args, **kwargs): ...
|
||||
def filter(*args, **kwargs): ...
|
||||
def flash(*args, **kwargs): ...
|
||||
def flushinp(*args, **kwargs): ...
|
||||
def getmouse(*args, **kwargs): ...
|
||||
def getsyx(*args, **kwargs): ...
|
||||
def getwin(*args, **kwargs): ...
|
||||
def halfdelay(*args, **kwargs): ...
|
||||
def has_colors(*args, **kwargs): ...
|
||||
def has_ic(*args, **kwargs): ...
|
||||
def has_il(*args, **kwargs): ...
|
||||
def has_key(*args, **kwargs): ...
|
||||
def init_color(*args, **kwargs): ...
|
||||
def init_pair(*args, **kwargs): ...
|
||||
def initscr(*args, **kwargs): ...
|
||||
def intrflush(*args, **kwargs): ...
|
||||
def is_term_resized(*args, **kwargs): ...
|
||||
def isendwin(*args, **kwargs): ...
|
||||
def keyname(*args, **kwargs): ...
|
||||
def killchar(*args, **kwargs): ...
|
||||
def longname(*args, **kwargs): ...
|
||||
def meta(*args, **kwargs): ...
|
||||
def mouseinterval(*args, **kwargs): ...
|
||||
def mousemask(*args, **kwargs): ...
|
||||
def napms(*args, **kwargs): ...
|
||||
def newpad(*args, **kwargs): ...
|
||||
def newwin(*args, **kwargs): ...
|
||||
def nl(*args, **kwargs): ...
|
||||
def nocbreak(*args, **kwargs): ...
|
||||
def noecho(*args, **kwargs): ...
|
||||
def nonl(*args, **kwargs): ...
|
||||
def noqiflush(*args, **kwargs): ...
|
||||
def noraw(*args, **kwargs): ...
|
||||
def pair_content(*args, **kwargs): ...
|
||||
def pair_number(*args, **kwargs): ...
|
||||
def putp(*args, **kwargs): ...
|
||||
def qiflush(*args, **kwargs): ...
|
||||
def raw(*args, **kwargs): ...
|
||||
def reset_prog_mode(*args, **kwargs): ...
|
||||
def reset_shell_mode(*args, **kwargs): ...
|
||||
def resetty(*args, **kwargs): ...
|
||||
def resize_term(*args, **kwargs): ...
|
||||
def resizeterm(*args, **kwargs): ...
|
||||
def savetty(*args, **kwargs): ...
|
||||
def setsyx(*args, **kwargs): ...
|
||||
def setupterm(*args, **kwargs): ...
|
||||
def start_color(*args, **kwargs): ...
|
||||
def termattrs(*args, **kwargs): ...
|
||||
def termname(*args, **kwargs): ...
|
||||
def tigetflag(*args, **kwargs): ...
|
||||
def tigetnum(*args, **kwargs): ...
|
||||
def tigetstr(*args, **kwargs): ...
|
||||
def tparm(*args, **kwargs): ...
|
||||
def typeahead(*args, **kwargs): ...
|
||||
def unctrl(*args, **kwargs): ...
|
||||
def unget_wch(*args, **kwargs): ...
|
||||
def ungetch(*args, **kwargs): ...
|
||||
def ungetmouse(*args, **kwargs): ...
|
||||
def update_lines_cols(*args, **kwargs): ...
|
||||
def use_default_colors(*args, **kwargs): ...
|
||||
def use_env(*args, **kwargs): ...
|
||||
|
||||
class error(Exception): ...
|
||||
71
stdlib/3/_operator.pyi
Normal file
71
stdlib/3/_operator.pyi
Normal file
@@ -0,0 +1,71 @@
|
||||
# Stubs for _operator (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
def _compare_digest(*args, **kwargs): ...
|
||||
def abs(a): ...
|
||||
def add(a, b): ...
|
||||
def and_(a, b): ...
|
||||
def concat(a, b): ...
|
||||
def contains(a, b): ...
|
||||
def countOf(a, b): ...
|
||||
def delitem(a, b): ...
|
||||
def eq(a, b): ...
|
||||
def floordiv(a, b): ...
|
||||
def ge(a, b): ...
|
||||
def getitem(a, b): ...
|
||||
def gt(a, b): ...
|
||||
def iadd(*args, **kwargs): ...
|
||||
def iand(*args, **kwargs): ...
|
||||
def iconcat(*args, **kwargs): ...
|
||||
def ifloordiv(*args, **kwargs): ...
|
||||
def ilshift(*args, **kwargs): ...
|
||||
def imatmul(*args, **kwargs): ...
|
||||
def imod(*args, **kwargs): ...
|
||||
def imul(*args, **kwargs): ...
|
||||
def index(a): ...
|
||||
def indexOf(a, b): ...
|
||||
def inv(a): ...
|
||||
def invert(a): ...
|
||||
def ior(*args, **kwargs): ...
|
||||
def ipow(*args, **kwargs): ...
|
||||
def irshift(*args, **kwargs): ...
|
||||
def is_(a, b): ...
|
||||
def is_not(a, b): ...
|
||||
def isub(*args, **kwargs): ...
|
||||
def itruediv(*args, **kwargs): ...
|
||||
def ixor(*args, **kwargs): ...
|
||||
def le(a, b): ...
|
||||
def length_hint(obj, default=0): ...
|
||||
def lshift(a, b): ...
|
||||
def lt(a, b): ...
|
||||
def matmul(a, b): ...
|
||||
def mod(a, b): ...
|
||||
def mul(a, b): ...
|
||||
def ne(a, b): ...
|
||||
def neg(a): ...
|
||||
def not_(a): ...
|
||||
def or_(a, b): ...
|
||||
def pos(a): ...
|
||||
def pow(a, b): ...
|
||||
def rshift(a, b): ...
|
||||
def setitem(a, b, c): ...
|
||||
def sub(a, b): ...
|
||||
def truediv(a, b): ...
|
||||
def truth(a): ...
|
||||
def xor(a, b): ...
|
||||
|
||||
class attrgetter:
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def __call__(self, *args, **kwargs): ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class itemgetter:
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def __call__(self, *args, **kwargs): ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class methodcaller:
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def __call__(self, *args, **kwargs): ...
|
||||
def __reduce__(self): ...
|
||||
0
stdlib/3/concurrent/__init__.pyi
Normal file
0
stdlib/3/concurrent/__init__.pyi
Normal file
7
stdlib/3/concurrent/futures/__init__.pyi
Normal file
7
stdlib/3/concurrent/futures/__init__.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
# Stubs for concurrent.futures (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from ._base import *
|
||||
from .thread import *
|
||||
from .process import *
|
||||
81
stdlib/3/concurrent/futures/_base.pyi
Normal file
81
stdlib/3/concurrent/futures/_base.pyi
Normal file
@@ -0,0 +1,81 @@
|
||||
# Stubs for concurrent.futures._base (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from collections import namedtuple
|
||||
|
||||
FIRST_COMPLETED = ... # type: Any
|
||||
FIRST_EXCEPTION = ... # type: Any
|
||||
ALL_COMPLETED = ... # type: Any
|
||||
PENDING = ... # type: Any
|
||||
RUNNING = ... # type: Any
|
||||
CANCELLED = ... # type: Any
|
||||
CANCELLED_AND_NOTIFIED = ... # type: Any
|
||||
FINISHED = ... # type: Any
|
||||
LOGGER = ... # type: Any
|
||||
|
||||
class Error(Exception): ...
|
||||
class CancelledError(Error): ...
|
||||
class TimeoutError(Error): ...
|
||||
|
||||
class _Waiter:
|
||||
event = ... # type: Any
|
||||
finished_futures = ... # type: Any
|
||||
def __init__(self): ...
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _AsCompletedWaiter(_Waiter):
|
||||
lock = ... # type: Any
|
||||
def __init__(self): ...
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _FirstCompletedWaiter(_Waiter):
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _AllCompletedWaiter(_Waiter):
|
||||
num_pending_calls = ... # type: Any
|
||||
stop_on_exception = ... # type: Any
|
||||
lock = ... # type: Any
|
||||
def __init__(self, num_pending_calls, stop_on_exception): ...
|
||||
def add_result(self, future): ...
|
||||
def add_exception(self, future): ...
|
||||
def add_cancelled(self, future): ...
|
||||
|
||||
class _AcquireFutures:
|
||||
futures = ... # type: Any
|
||||
def __init__(self, futures): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args): ...
|
||||
|
||||
def as_completed(fs, timeout=None): ...
|
||||
|
||||
DoneAndNotDoneFutures = namedtuple('DoneAndNotDoneFutures', 'done not_done')
|
||||
|
||||
def wait(fs, timeout=None, return_when=...): ...
|
||||
|
||||
class Future:
|
||||
def __init__(self): ...
|
||||
def cancel(self): ...
|
||||
def cancelled(self): ...
|
||||
def running(self): ...
|
||||
def done(self): ...
|
||||
def add_done_callback(self, fn): ...
|
||||
def result(self, timeout=None): ...
|
||||
def exception(self, timeout=None): ...
|
||||
def set_running_or_notify_cancel(self): ...
|
||||
def set_result(self, result): ...
|
||||
def set_exception(self, exception): ...
|
||||
|
||||
class Executor:
|
||||
def submit(self, fn, *args, **kwargs): ...
|
||||
def map(self, fn, *iterables, *, timeout=None, chunksize=1): ...
|
||||
def shutdown(self, wait=True): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb): ...
|
||||
46
stdlib/3/concurrent/futures/process.pyi
Normal file
46
stdlib/3/concurrent/futures/process.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
# Stubs for concurrent.futures.process (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from . import _base
|
||||
|
||||
EXTRA_QUEUED_CALLS = ... # type: Any
|
||||
|
||||
class _RemoteTraceback(Exception):
|
||||
tb = ... # type: Any
|
||||
def __init__(self, tb): ...
|
||||
|
||||
class _ExceptionWithTraceback:
|
||||
exc = ... # type: Any
|
||||
tb = ... # type: Any
|
||||
def __init__(self, exc, tb): ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class _WorkItem:
|
||||
future = ... # type: Any
|
||||
fn = ... # type: Any
|
||||
args = ... # type: Any
|
||||
kwargs = ... # type: Any
|
||||
def __init__(self, future, fn, args, kwargs): ...
|
||||
|
||||
class _ResultItem:
|
||||
work_id = ... # type: Any
|
||||
exception = ... # type: Any
|
||||
result = ... # type: Any
|
||||
def __init__(self, work_id, exception=None, result=None): ...
|
||||
|
||||
class _CallItem:
|
||||
work_id = ... # type: Any
|
||||
fn = ... # type: Any
|
||||
args = ... # type: Any
|
||||
kwargs = ... # type: Any
|
||||
def __init__(self, work_id, fn, args, kwargs): ...
|
||||
|
||||
class BrokenProcessPool(RuntimeError): ...
|
||||
|
||||
class ProcessPoolExecutor(_base.Executor):
|
||||
def __init__(self, max_workers=None): ...
|
||||
def submit(self, fn, *args, **kwargs): ...
|
||||
def map(self, fn, *iterables, *, timeout=None, chunksize=1): ...
|
||||
def shutdown(self, wait=True): ...
|
||||
19
stdlib/3/concurrent/futures/thread.pyi
Normal file
19
stdlib/3/concurrent/futures/thread.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
# Stubs for concurrent.futures.thread (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from . import _base
|
||||
|
||||
class _WorkItem:
|
||||
future = ... # type: Any
|
||||
fn = ... # type: Any
|
||||
args = ... # type: Any
|
||||
kwargs = ... # type: Any
|
||||
def __init__(self, future, fn, args, kwargs): ...
|
||||
def run(self): ...
|
||||
|
||||
class ThreadPoolExecutor(_base.Executor):
|
||||
def __init__(self, max_workers=None): ...
|
||||
def submit(self, fn, *args, **kwargs): ...
|
||||
def shutdown(self, wait=True): ...
|
||||
12
stdlib/3/curses/__init__.pyi
Normal file
12
stdlib/3/curses/__init__.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
# Stubs for curses (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from _curses import *
|
||||
# Stubgen imports a python version of has_key only if it's not present
|
||||
#in _curses (which it is in this stub)
|
||||
# from .has_key import has_key as has_key
|
||||
|
||||
def initscr(): ...
|
||||
def start_color(): ...
|
||||
def wrapper(func, *args, **kwds): ...
|
||||
51
stdlib/3/gzip.pyi
Normal file
51
stdlib/3/gzip.pyi
Normal file
@@ -0,0 +1,51 @@
|
||||
# Stubs for gzip (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
import _compression
|
||||
|
||||
def open(filename, mode='', compresslevel=9, encoding=None, errors=None, newline=None): ...
|
||||
|
||||
class _PaddedFile:
|
||||
file = ... # type: Any
|
||||
def __init__(self, f, prepend=b''): ...
|
||||
def read(self, size): ...
|
||||
def prepend(self, prepend=b''): ...
|
||||
def seek(self, off): ...
|
||||
def seekable(self): ...
|
||||
|
||||
class GzipFile(_compression.BaseStream):
|
||||
myfileobj = ... # type: Any
|
||||
mode = ... # type: Any
|
||||
name = ... # type: Any
|
||||
compress = ... # type: Any
|
||||
fileobj = ... # type: Any
|
||||
def __init__(self, filename=None, mode=None, compresslevel=9, fileobj=None, mtime=None): ...
|
||||
@property
|
||||
def filename(self): ...
|
||||
@property
|
||||
def mtime(self): ...
|
||||
crc = ... # type: Any
|
||||
def write(self, data): ...
|
||||
def read(self, size=-1): ...
|
||||
def read1(self, size=-1): ...
|
||||
def peek(self, n): ...
|
||||
@property
|
||||
def closed(self): ...
|
||||
def close(self): ...
|
||||
def flush(self, zlib_mode=...): ...
|
||||
def fileno(self): ...
|
||||
def rewind(self): ...
|
||||
def readable(self): ...
|
||||
def writable(self): ...
|
||||
def seekable(self): ...
|
||||
def seek(self, offset, whence=...): ...
|
||||
def readline(self, size=-1): ...
|
||||
|
||||
class _GzipReader(_compression.DecompressReader):
|
||||
def __init__(self, fp): ...
|
||||
def read(self, size=-1): ...
|
||||
|
||||
def compress(data, compresslevel=9): ...
|
||||
def decompress(data): ...
|
||||
27
stdlib/3/hmac.pyi
Normal file
27
stdlib/3/hmac.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
# Stubs for hmac (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
from _operator import _compare_digest as compare_digest
|
||||
|
||||
trans_5C = ... # type: Any
|
||||
trans_36 = ... # type: Any
|
||||
digest_size = ... # type: Any
|
||||
|
||||
class HMAC:
|
||||
blocksize = ... # type: Any
|
||||
digest_cons = ... # type: Any
|
||||
outer = ... # type: Any
|
||||
inner = ... # type: Any
|
||||
digest_size = ... # type: Any
|
||||
block_size = ... # type: Any
|
||||
def __init__(self, key, msg=None, digestmod=None): ...
|
||||
@property
|
||||
def name(self): ...
|
||||
def update(self, msg): ...
|
||||
def copy(self): ...
|
||||
def digest(self): ...
|
||||
def hexdigest(self): ...
|
||||
|
||||
def new(key, msg=None, digestmod=None): ...
|
||||
46
stdlib/3/http/cookies.pyi
Normal file
46
stdlib/3/http/cookies.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
# Stubs for http.cookies (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class CookieError(Exception): ...
|
||||
|
||||
class Morsel(dict):
|
||||
def __init__(self): ...
|
||||
@property
|
||||
def key(self): ...
|
||||
@key.setter
|
||||
def key(self, key): ...
|
||||
@property
|
||||
def value(self): ...
|
||||
@value.setter
|
||||
def value(self, value): ...
|
||||
@property
|
||||
def coded_value(self): ...
|
||||
@coded_value.setter
|
||||
def coded_value(self, coded_value): ...
|
||||
def __setitem__(self, K, V): ...
|
||||
def setdefault(self, key, val=None): ...
|
||||
def __eq__(self, morsel): ...
|
||||
__ne__ = ... # type: Any
|
||||
def copy(self): ...
|
||||
def update(self, values): ...
|
||||
def isReservedKey(self, K): ...
|
||||
def set(self, key, val, coded_val, LegalChars=...): ...
|
||||
def output(self, attrs=None, header=''): ...
|
||||
def js_output(self, attrs=None): ...
|
||||
def OutputString(self, attrs=None): ...
|
||||
|
||||
class BaseCookie(dict):
|
||||
def value_decode(self, val): ...
|
||||
def value_encode(self, val): ...
|
||||
def __init__(self, input=None): ...
|
||||
def __setitem__(self, key, value): ...
|
||||
def output(self, attrs=None, header='', sep=''): ...
|
||||
def js_output(self, attrs=None): ...
|
||||
def load(self, rawdata): ...
|
||||
|
||||
class SimpleCookie(BaseCookie):
|
||||
def value_decode(self, val): ...
|
||||
def value_encode(self, val): ...
|
||||
26
stdlib/3/mimetypes.pyi
Normal file
26
stdlib/3/mimetypes.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
# Stubs for mimetypes (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class MimeTypes:
|
||||
encodings_map = ... # type: Any
|
||||
suffix_map = ... # type: Any
|
||||
types_map = ... # type: Any
|
||||
types_map_inv = ... # type: Any
|
||||
def __init__(self, filenames=..., strict=True): ...
|
||||
def add_type(self, type, ext, strict=True): ...
|
||||
def guess_type(self, url, strict=True): ...
|
||||
def guess_all_extensions(self, type, strict=True): ...
|
||||
def guess_extension(self, type, strict=True): ...
|
||||
def read(self, filename, strict=True): ...
|
||||
def readfp(self, fp, strict=True): ...
|
||||
def read_windows_registry(self, strict=True): ...
|
||||
|
||||
def guess_type(url, strict=True): ...
|
||||
def guess_all_extensions(type, strict=True): ...
|
||||
def guess_extension(type, strict=True): ...
|
||||
def add_type(type, ext, strict=True): ...
|
||||
def init(files=None): ...
|
||||
def read_mime_types(file): ...
|
||||
21
stdlib/3/runpy.pyi
Normal file
21
stdlib/3/runpy.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
# Stubs for runpy (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class _TempModule:
|
||||
mod_name = ... # type: Any
|
||||
module = ... # type: Any
|
||||
def __init__(self, mod_name): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args): ...
|
||||
|
||||
class _ModifiedArgv0:
|
||||
value = ... # type: Any
|
||||
def __init__(self, value): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, *args): ...
|
||||
|
||||
def run_module(mod_name, init_globals=None, run_name=None, alter_sys=False): ...
|
||||
def run_path(path_name, init_globals=None, run_name=None): ...
|
||||
@@ -29,7 +29,7 @@ class CalledProcessError(Exception):
|
||||
cmd = ... # type: str
|
||||
output = b'' # May be None
|
||||
|
||||
def __init__(self, returncode: int, cmd: str, output: str) -> None: ...
|
||||
def __init__(self, returncode: int, cmd: str, output: str = ...) -> None: ...
|
||||
|
||||
class Popen:
|
||||
stdin = ... # type: IO[Any]
|
||||
|
||||
@@ -9,7 +9,7 @@ def format_exception_only(etype, value): ...
|
||||
def format_exception(type: type, value: List[str], tb: TracebackType, limit: int, chain: bool) -> str: ...
|
||||
def format_tb(traceback): ...
|
||||
def print_exc(limit=..., file=..., chain=...): ...
|
||||
def format_exc(limit: int, chain: bool = ...) -> str: ...
|
||||
def format_exc(limit: int = ..., chain: bool = ...) -> str: ...
|
||||
def extract_stack(f=..., limit=...): ...
|
||||
def extract_tb(traceback, limit=...): ...
|
||||
def format_list(list): ...
|
||||
|
||||
@@ -69,3 +69,52 @@ class WeakValueDictionary(Generic[_KT, _VT]):
|
||||
|
||||
# TODO return type
|
||||
def valuerefs(self) -> Iterable[Any]: ...
|
||||
|
||||
|
||||
class WeakKeyDictionary(Generic[_KT, _VT]):
|
||||
# TODO tuple iterable argument?
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
@overload
|
||||
def __init__(self, map: Mapping[_KT, _VT]) -> None: ...
|
||||
|
||||
def __len__(self) -> int: ...
|
||||
def __getitem__(self, k: _KT) -> _VT: ...
|
||||
def __setitem__(self, k: _KT, v: _VT) -> None: ...
|
||||
def __delitem__(self, v: _KT) -> None: ...
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
def __iter__(self) -> Iterator[_KT]: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
def clear(self) -> None: ...
|
||||
def copy(self) -> Dict[_KT, _VT]: ...
|
||||
|
||||
@overload
|
||||
def get(self, k: _KT) -> _VT: ...
|
||||
@overload
|
||||
def get(self, k: _KT, default: _VT) -> _VT: ...
|
||||
|
||||
@overload
|
||||
def pop(self, k: _KT) -> _VT: ...
|
||||
@overload
|
||||
def pop(self, k: _KT, default: _VT) -> _VT: ...
|
||||
|
||||
def popitem(self) -> Tuple[_KT, _VT]: ...
|
||||
|
||||
@overload
|
||||
def setdefault(self, k: _KT) -> _VT: ...
|
||||
@overload
|
||||
def setdefault(self, k: _KT, default: _VT) -> _VT: ...
|
||||
|
||||
@overload
|
||||
def update(self, m: Mapping[_KT, _VT]) -> None: ...
|
||||
@overload
|
||||
def update(self, m: Iterable[Tuple[_KT, _VT]]) -> None: ...
|
||||
|
||||
# NOTE: incompatible with Mapping
|
||||
def keys(self) -> Iterator[_KT]: ...
|
||||
def values(self) -> Iterator[_VT]: ...
|
||||
def items(self) -> Iterator[Tuple[_KT, _VT]]: ...
|
||||
|
||||
# TODO return type
|
||||
def valuerefs(self) -> Iterable[Any]: ...
|
||||
|
||||
0
stdlib/3/wsgiref/__init__.pyi
Normal file
0
stdlib/3/wsgiref/__init__.pyi
Normal file
47
stdlib/3/wsgiref/validate.pyi
Normal file
47
stdlib/3/wsgiref/validate.pyi
Normal file
@@ -0,0 +1,47 @@
|
||||
# Stubs for wsgiref.validate (Python 3.5)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class WSGIWarning(Warning): ...
|
||||
|
||||
def validator(application): ...
|
||||
|
||||
class InputWrapper:
|
||||
input = ... # type: Any
|
||||
def __init__(self, wsgi_input): ...
|
||||
def read(self, *args): ...
|
||||
def readline(self, *args): ...
|
||||
def readlines(self, *args): ...
|
||||
def __iter__(self): ...
|
||||
def close(self): ...
|
||||
|
||||
class ErrorWrapper:
|
||||
errors = ... # type: Any
|
||||
def __init__(self, wsgi_errors): ...
|
||||
def write(self, s): ...
|
||||
def flush(self): ...
|
||||
def writelines(self, seq): ...
|
||||
def close(self): ...
|
||||
|
||||
class WriteWrapper:
|
||||
writer = ... # type: Any
|
||||
def __init__(self, wsgi_writer): ...
|
||||
def __call__(self, s): ...
|
||||
|
||||
class PartialIteratorWrapper:
|
||||
iterator = ... # type: Any
|
||||
def __init__(self, wsgi_iterator): ...
|
||||
def __iter__(self): ...
|
||||
|
||||
class IteratorWrapper:
|
||||
original_iterator = ... # type: Any
|
||||
iterator = ... # type: Any
|
||||
closed = ... # type: Any
|
||||
check_start_response = ... # type: Any
|
||||
def __init__(self, wsgi_iterator, check_start_response): ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
def close(self): ...
|
||||
def __del__(self): ...
|
||||
Reference in New Issue
Block a user