mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 21:12:25 +08:00
Change numerous default values to ... (#1722)
This is the convention, and some default values (e.g. strings) apparently break pytype.
This commit is contained in:
committed by
Matthias Kramm
parent
66821993f6
commit
54dd6ba27c
@@ -181,7 +181,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
|
||||
class complex(SupportsAbs[float]):
|
||||
@overload
|
||||
def __init__(self, re: float = 0.0, im: float = 0.0) -> None: ...
|
||||
def __init__(self, re: float = ..., im: float = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, s: str) -> None: ...
|
||||
|
||||
@@ -231,17 +231,17 @@ class unicode(basestring, Sequence[unicode]):
|
||||
@overload
|
||||
def __init__(self, o: str, encoding: unicode = ..., errors: unicode = ...) -> None: ...
|
||||
def capitalize(self) -> unicode: ...
|
||||
def center(self, width: int, fillchar: unicode = u' ') -> unicode: ...
|
||||
def center(self, width: int, fillchar: unicode = ...) -> unicode: ...
|
||||
def count(self, x: unicode) -> int: ...
|
||||
def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ...
|
||||
def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ...
|
||||
def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]], start: int = 0,
|
||||
def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]], start: int = ...,
|
||||
end: int = ...) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> unicode: ...
|
||||
def find(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> unicode: ...
|
||||
def find(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
|
||||
def format(self, *args: Any, **kwargs: Any) -> unicode: ...
|
||||
def format_map(self, map: Mapping[unicode, Any]) -> unicode: ...
|
||||
def index(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
|
||||
def index(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
def isdecimal(self) -> bool: ...
|
||||
@@ -254,20 +254,20 @@ class unicode(basestring, Sequence[unicode]):
|
||||
def istitle(self) -> bool: ...
|
||||
def isupper(self) -> bool: ...
|
||||
def join(self, iterable: Iterable[unicode]) -> unicode: ...
|
||||
def ljust(self, width: int, fillchar: unicode = u' ') -> unicode: ...
|
||||
def ljust(self, width: int, fillchar: unicode = ...) -> unicode: ...
|
||||
def lower(self) -> unicode: ...
|
||||
def lstrip(self, chars: unicode = ...) -> unicode: ...
|
||||
def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
|
||||
def replace(self, old: unicode, new: unicode, count: int = ...) -> unicode: ...
|
||||
def rfind(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
|
||||
def rindex(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
|
||||
def rjust(self, width: int, fillchar: unicode = u' ') -> unicode: ...
|
||||
def rfind(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
|
||||
def rindex(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: unicode = ...) -> unicode: ...
|
||||
def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
|
||||
def rsplit(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ...
|
||||
def rstrip(self, chars: unicode = ...) -> unicode: ...
|
||||
def split(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[unicode]: ...
|
||||
def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = 0,
|
||||
def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = ...,
|
||||
end: int = ...) -> bool: ...
|
||||
def strip(self, chars: unicode = ...) -> unicode: ...
|
||||
def swapcase(self) -> unicode: ...
|
||||
@@ -308,7 +308,7 @@ class str(basestring, Sequence[str]):
|
||||
def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ...
|
||||
def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ...
|
||||
def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]]) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> str: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> str: ...
|
||||
def find(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def format(self, *args: Any, **kwargs: Any) -> str: ...
|
||||
def index(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
@@ -405,9 +405,9 @@ class bytearray(MutableSequence[int]):
|
||||
def count(self, x: str) -> int: ...
|
||||
def decode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ...
|
||||
def endswith(self, suffix: Union[str, Tuple[str, ...]]) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> bytearray: ...
|
||||
def find(self, sub: str, start: int = 0, end: int = ...) -> int: ...
|
||||
def index(self, sub: str, start: int = 0, end: int = ...) -> int: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> bytearray: ...
|
||||
def find(self, sub: str, start: int = ..., end: int = ...) -> int: ...
|
||||
def index(self, sub: str, start: int = ..., end: int = ...) -> int: ...
|
||||
def insert(self, index: int, object: int) -> None: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
@@ -422,8 +422,8 @@ class bytearray(MutableSequence[int]):
|
||||
def lstrip(self, chars: str = ...) -> bytearray: ...
|
||||
def partition(self, sep: str) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
def replace(self, old: str, new: str, count: int = ...) -> bytearray: ...
|
||||
def rfind(self, sub: str, start: int = 0, end: int = ...) -> int: ...
|
||||
def rindex(self, sub: str, start: int = 0, end: int = ...) -> int: ...
|
||||
def rfind(self, sub: str, start: int = ..., end: int = ...) -> int: ...
|
||||
def rindex(self, sub: str, start: int = ..., end: int = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: str = ...) -> bytearray: ...
|
||||
def rpartition(self, sep: str) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[bytearray]: ...
|
||||
@@ -479,7 +479,7 @@ class slice(object):
|
||||
@overload
|
||||
def __init__(self, stop: Optional[int]) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = None) -> None: ...
|
||||
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ...
|
||||
def indices(self, len: int) -> Tuple[int, int, int]: ...
|
||||
|
||||
class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
@@ -514,7 +514,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def append(self, object: _T) -> None: ...
|
||||
def extend(self, iterable: Iterable[_T]) -> None: ...
|
||||
def pop(self, index: int = -1) -> _T: ...
|
||||
def index(self, object: _T, start: int = 0, stop: int = ...) -> int: ...
|
||||
def index(self, object: _T, start: int = ..., stop: int = ...) -> int: ...
|
||||
def count(self, object: _T) -> int: ...
|
||||
def insert(self, index: int, object: _T) -> None: ...
|
||||
def remove(self, object: _T) -> None: ...
|
||||
@@ -654,7 +654,7 @@ class frozenset(AbstractSet[_T], Generic[_T]):
|
||||
def __gt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
|
||||
class enumerate(Iterator[Tuple[int, _T]], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T], start: int = 0) -> None: ...
|
||||
def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ...
|
||||
def __iter__(self) -> Iterator[Tuple[int, _T]]: ...
|
||||
def next(self) -> Tuple[int, _T]: ...
|
||||
# TODO __getattribute__
|
||||
@@ -663,7 +663,7 @@ class xrange(Sized, Iterable[int], Reversible[int]):
|
||||
@overload
|
||||
def __init__(self, stop: int) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: int, stop: int, step: int = 1) -> None: ...
|
||||
def __init__(self, start: int, stop: int, step: int = ...) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
def __getitem__(self, i: int) -> int: ...
|
||||
@@ -672,11 +672,11 @@ class xrange(Sized, Iterable[int], Reversible[int]):
|
||||
class property(object):
|
||||
def __init__(self, fget: Optional[Callable[[Any], Any]] = None,
|
||||
fset: Optional[Callable[[Any, Any], None]] = None,
|
||||
fdel: Optional[Callable[[Any], None]] = None, doc: Optional[str] = None) -> None: ...
|
||||
fdel: Optional[Callable[[Any], None]] = None, doc: Optional[str] = ...) -> None: ...
|
||||
def getter(self, fget: Callable[[Any], Any]) -> property: ...
|
||||
def setter(self, fset: Callable[[Any, Any], None]) -> property: ...
|
||||
def deleter(self, fdel: Callable[[Any], None]) -> property: ...
|
||||
def __get__(self, obj: Any, type: Optional[type] = None) -> Any: ...
|
||||
def __get__(self, obj: Any, type: Optional[type] = ...) -> Any: ...
|
||||
def __set__(self, obj: Any, value: Any) -> None: ...
|
||||
def __delete__(self, obj: Any) -> None: ...
|
||||
def fget(self) -> Any: ...
|
||||
@@ -694,8 +694,8 @@ def any(i: Iterable[object]) -> bool: ...
|
||||
def bin(number: int) -> str: ...
|
||||
def callable(o: object) -> bool: ...
|
||||
def chr(code: int) -> str: ...
|
||||
def compile(source: Any, filename: unicode, mode: str, flags: int = 0,
|
||||
dont_inherit: int = 0) -> Any: ...
|
||||
def compile(source: Any, filename: unicode, mode: str, flags: int = ...,
|
||||
dont_inherit: int = ...) -> Any: ...
|
||||
def delattr(o: Any, name: unicode) -> None: ...
|
||||
def dir(o: object = ...) -> List[str]: ...
|
||||
@overload
|
||||
@@ -709,8 +709,8 @@ def filter(function: Callable[[_T], Any],
|
||||
@overload
|
||||
def filter(function: None,
|
||||
iterable: Iterable[Optional[_T]]) -> List[_T]: ...
|
||||
def format(o: object, format_spec: str = '') -> str: ... # TODO unicode
|
||||
def getattr(o: Any, name: unicode, default: Optional[Any] = None) -> Any: ...
|
||||
def format(o: object, format_spec: str = ...) -> str: ... # TODO unicode
|
||||
def getattr(o: Any, name: unicode, default: Optional[Any] = ...) -> Any: ...
|
||||
def hasattr(o: Any, name: unicode) -> bool: ...
|
||||
def hash(o: object) -> int: ...
|
||||
def hex(i: int) -> str: ... # TODO __index__
|
||||
@@ -950,15 +950,15 @@ def execfile(filename: str, globals: Optional[Dict[str, Any]] = None, locals: Op
|
||||
|
||||
class file(BinaryIO):
|
||||
@overload
|
||||
def __init__(self, file: str, mode: str = 'r', buffering: int = ...) -> None: ...
|
||||
def __init__(self, file: str, mode: str = ..., buffering: int = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, file: unicode, mode: str = 'r', buffering: int = ...) -> None: ...
|
||||
def __init__(self, file: unicode, mode: str = ..., buffering: int = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, file: int, mode: str = 'r', buffering: int = ...) -> None: ...
|
||||
def __init__(self, file: int, mode: str = ..., buffering: int = ...) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def read(self, n: int = ...) -> str: ...
|
||||
def __enter__(self) -> BinaryIO: ...
|
||||
def __exit__(self, t: Optional[type] = None, exc: Optional[BaseException] = None, tb: Optional[Any] = None) -> bool: ...
|
||||
def __exit__(self, t: Optional[type] = ..., exc: Optional[BaseException] = ..., tb: Optional[Any] = ...) -> bool: ...
|
||||
def flush(self) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
def isatty(self) -> bool: ...
|
||||
|
||||
@@ -51,7 +51,7 @@ class Underflow(Inexact, Rounded, Subnormal): ...
|
||||
|
||||
def setcontext(context: Context): ...
|
||||
def getcontext() -> Context: ...
|
||||
def localcontext(ctx: Optional[Context] = None) -> _ContextManager: ...
|
||||
def localcontext(ctx: Optional[Context] = ...) -> _ContextManager: ...
|
||||
|
||||
class Decimal(SupportsAbs[Decimal], SupportsFloat, SupportsInt):
|
||||
def __init__(cls, value: Union[_Decimal, float, str, unicode,
|
||||
@@ -72,7 +72,7 @@ class Decimal(SupportsAbs[Decimal], SupportsFloat, SupportsInt):
|
||||
def to_eng_string(self, context: Context = ...) -> str: ...
|
||||
def __neg__(self) -> Decimal: ...
|
||||
def __pos__(self) -> Decimal: ...
|
||||
def __abs__(self, round: bool = True) -> Decimal: ...
|
||||
def __abs__(self, round: bool = ...) -> Decimal: ...
|
||||
def __add__(self, other: _Decimal) -> Decimal: ...
|
||||
def __radd__(self, other: int) -> Decimal: ...
|
||||
def __sub__(self, other: _Decimal) -> Decimal: ...
|
||||
|
||||
@@ -3,7 +3,7 @@ import collections
|
||||
|
||||
|
||||
class Shelf(collections.MutableMapping):
|
||||
def __init__(self, dict: Dict[Any, Any], protocol: Optional[int] = None, writeback: bool = ..., keyencoding: str = 'utf-8') -> None: ...
|
||||
def __init__(self, dict: Dict[Any, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def keys(self) -> List[Any]: ...
|
||||
def __len__(self) -> int: ...
|
||||
@@ -20,7 +20,7 @@ class Shelf(collections.MutableMapping):
|
||||
def sync(self) -> None: ...
|
||||
|
||||
class BsdDbShelf(Shelf):
|
||||
def __init__(self, dict: Dict[Any, Any], protocol: Optional[int] = None, writeback: bool = ..., keyencoding: str = 'utf-8') -> None: ...
|
||||
def __init__(self, dict: Dict[Any, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ...
|
||||
def set_location(self, key: Any) -> Tuple[str, Any]: ...
|
||||
def next(self) -> Tuple[str, Any]: ...
|
||||
def previous(self) -> Tuple[str, Any]: ...
|
||||
@@ -28,6 +28,6 @@ class BsdDbShelf(Shelf):
|
||||
def last(self) -> Tuple[str, Any]: ...
|
||||
|
||||
class DbfilenameShelf(Shelf):
|
||||
def __init__(self, filename: str, flag: str = 'c', protocol: Optional[int] = None, writeback: bool = ...) -> None: ...
|
||||
def __init__(self, filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> None: ...
|
||||
|
||||
def open(filename: str, flag: str = 'c', protocol: Optional[int] = None, writeback: bool = ...) -> DbfilenameShelf: ...
|
||||
def open(filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> DbfilenameShelf: ...
|
||||
|
||||
@@ -113,7 +113,7 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
|
||||
def send(self, value: _T_contra) -> _T_co: ...
|
||||
|
||||
@abstractmethod
|
||||
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = None,
|
||||
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = ...,
|
||||
# TODO: tb should be TracebackType but that's defined in types
|
||||
tb: Any = None) -> _T_co: ...
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class Request(object):
|
||||
def add_header(self, key: str, val: str) -> None: ...
|
||||
def add_unredirected_header(self, key: str, val: str) -> None: ...
|
||||
def has_header(self, header_name: str) -> bool: ...
|
||||
def get_header(self, header_name: str, default: Optional[str] = None) -> str: ...
|
||||
def get_header(self, header_name: str, default: Optional[str] = ...) -> str: ...
|
||||
def header_items(self): ...
|
||||
|
||||
class OpenerDirector(object):
|
||||
|
||||
@@ -12,7 +12,7 @@ class simple_producer:
|
||||
class async_chat(asyncore.dispatcher):
|
||||
ac_in_buffer_size = ... # type: int
|
||||
ac_out_buffer_size = ... # type: int
|
||||
def __init__(self, sock: Optional[socket.socket] = None, map: Optional[asyncore._maptype] = None) -> None: ...
|
||||
def __init__(self, sock: Optional[socket.socket] = ..., map: Optional[asyncore._maptype] = ...) -> None: ...
|
||||
|
||||
@abstractmethod
|
||||
def collect_incoming_data(self, data: bytes) -> None: ...
|
||||
|
||||
@@ -25,7 +25,7 @@ def poll2(timeout: float = ..., map: _maptype = ...) -> None: ...
|
||||
|
||||
poll3 = poll2
|
||||
|
||||
def loop(timeout: float = ..., use_poll: bool = ..., map: _maptype = ..., count: Optional[int] = None) -> None: ...
|
||||
def loop(timeout: float = ..., use_poll: bool = ..., map: _maptype = ..., count: Optional[int] = ...) -> None: ...
|
||||
|
||||
|
||||
# Not really subclass of socket.socket; it's only delegation.
|
||||
@@ -39,7 +39,7 @@ class dispatcher:
|
||||
closing = ... # type: bool
|
||||
ignore_log_types = ... # type: frozenset[str]
|
||||
|
||||
def __init__(self, sock: Optional[socket.socket] = None, map: _maptype = ...) -> None: ...
|
||||
def __init__(self, sock: Optional[socket.socket] = ..., map: _maptype = ...) -> None: ...
|
||||
def add_channel(self, map: _maptype = ...) -> None: ...
|
||||
def del_channel(self, map: _maptype = ...) -> None: ...
|
||||
def create_socket(self, family: int, type: int) -> None: ...
|
||||
|
||||
@@ -6,20 +6,20 @@ def compress(data: bytes, compresslevel: int = ...) -> bytes: ...
|
||||
def decompress(data: bytes) -> bytes: ...
|
||||
|
||||
def open(filename: Union[str, bytes, IO[Any]],
|
||||
mode: str = 'rb',
|
||||
encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None,
|
||||
newline: Optional[str] = None) -> IO[Any]: ...
|
||||
mode: str = ...,
|
||||
encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ...,
|
||||
newline: Optional[str] = ...) -> IO[Any]: ...
|
||||
|
||||
class BZ2File(BinaryIO):
|
||||
def __init__(self,
|
||||
filename: Union[str, bytes, IO[Any]],
|
||||
mode: str = "r",
|
||||
buffering: Optional[Any] = None,
|
||||
compresslevel: int = 9) -> None: ...
|
||||
buffering: Optional[Any] = ...,
|
||||
compresslevel: int = ...) -> None: ...
|
||||
|
||||
class BZ2Compressor(object):
|
||||
def __init__(self, compresslevel: int = 9) -> None: ...
|
||||
def __init__(self, compresslevel: int = ...) -> None: ...
|
||||
def compress(self, data: bytes) -> bytes: ...
|
||||
def flush(self) -> bytes: ...
|
||||
|
||||
|
||||
@@ -70,12 +70,12 @@ if sys.version_info < (3, 0):
|
||||
class TimeEncoding:
|
||||
def __init__(self, locale: _LocaleType) -> None: ...
|
||||
def __enter__(self) -> _LocaleType: ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
else:
|
||||
class different_locale:
|
||||
def __init__(self, locale: _LocaleType) -> None: ...
|
||||
def __enter__(self) -> _LocaleType: ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
|
||||
class LocaleTextCalendar(TextCalendar):
|
||||
def __init__(self, firstweekday: int = ..., locale: Optional[_LocaleType] = ...) -> None: ...
|
||||
|
||||
@@ -28,19 +28,19 @@ class Fraction(Rational):
|
||||
numerator: Union[int, Rational] = 0,
|
||||
denominator: Optional[Union[int, Rational]] = 0,
|
||||
*,
|
||||
_normalize: bool = True) -> None: ...
|
||||
_normalize: bool = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, value: float, *, _normalize: bool = True) -> None: ...
|
||||
def __init__(self, value: float, *, _normalize: bool = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, value: Decimal, *, _normalize: bool = True) -> None: ...
|
||||
def __init__(self, value: Decimal, *, _normalize: bool = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, value: str, *, _normalize: bool = True) -> None: ...
|
||||
def __init__(self, value: str, *, _normalize: bool = ...) -> None: ...
|
||||
|
||||
@classmethod
|
||||
def from_float(cls, f: float) -> 'Fraction': ...
|
||||
@classmethod
|
||||
def from_decimal(cls, dec: Decimal) -> 'Fraction': ...
|
||||
def limit_denominator(self, max_denominator: int = 1000000) -> 'Fraction': ...
|
||||
def limit_denominator(self, max_denominator: int = ...) -> 'Fraction': ...
|
||||
|
||||
@property
|
||||
def numerator(self) -> int: ...
|
||||
|
||||
@@ -76,7 +76,7 @@ class IMAP4:
|
||||
def setquota(self, root: str, limits: str) -> CommandResults: ...
|
||||
def sort(self, sort_criteria: str, charset: str, *search_criteria: List[str]) -> CommandResults: ...
|
||||
if sys.version_info >= (3,):
|
||||
def starttls(self, ssl_context: Optional[Any] = None) -> CommandResults: ...
|
||||
def starttls(self, ssl_context: Optional[Any] = ...) -> CommandResults: ...
|
||||
def status(self, mailbox: str, names: str) -> CommandResults: ...
|
||||
def store(self, message_set: str, command: str, flags: List[str]) -> CommandResults: ...
|
||||
def subscribe(self, mailbox: str) -> CommandResults: ...
|
||||
|
||||
@@ -70,7 +70,7 @@ class Real(Complex, SupportsFloat):
|
||||
@abstractmethod
|
||||
def __ceil__(self) -> int: ...
|
||||
@abstractmethod
|
||||
def __round__(self, ndigits: Optional[int] = None): ...
|
||||
def __round__(self, ndigits: Optional[int] = ...): ...
|
||||
def __divmod__(self, other): ...
|
||||
def __rdivmod__(self, other): ...
|
||||
@abstractmethod
|
||||
|
||||
@@ -23,7 +23,7 @@ def runcall(*args: Any, **kwds: Any) -> Any:
|
||||
def set_trace() -> None:
|
||||
...
|
||||
|
||||
def post_mortem(t: Optional[Any] = None) -> None:
|
||||
def post_mortem(t: Optional[Any] = ...) -> None:
|
||||
...
|
||||
|
||||
def pm() -> None:
|
||||
|
||||
@@ -17,4 +17,4 @@ if sys.version_info >= (3, 2):
|
||||
else:
|
||||
def compile(file: _EitherStr, cfile: Optional[_EitherStr] = ..., dfile: Optional[_EitherStr] = ..., doraise: bool = ...) -> None: ...
|
||||
|
||||
def main(args: Optional[List[Text]] = ...): ...
|
||||
def main(args: Optional[List[Text]] = ...) -> int: ...
|
||||
|
||||
@@ -37,7 +37,7 @@ class Event:
|
||||
def wait(self) -> Generator[Any, None, bool]: ...
|
||||
|
||||
class Condition(_ContextManagerMixin):
|
||||
def __init__(self, lock: Optional[Lock] = None, *, loop: Optional[AbstractEventLoop] = ...) -> None: ...
|
||||
def __init__(self, lock: Optional[Lock] = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ...
|
||||
def locked(self) -> bool: ...
|
||||
@coroutine
|
||||
def acquire(self) -> Generator[Any, None, bool]: ...
|
||||
@@ -46,7 +46,7 @@ class Condition(_ContextManagerMixin):
|
||||
def wait(self) -> Generator[Any, None, bool]: ...
|
||||
@coroutine
|
||||
def wait_for(self, predicate: Callable[[], _T]) -> Generator[Any, None, _T]: ...
|
||||
def notify(self, n: int = 1) -> None: ...
|
||||
def notify(self, n: int = ...) -> None: ...
|
||||
def notify_all(self) -> None: ...
|
||||
|
||||
class Semaphore(_ContextManagerMixin):
|
||||
|
||||
@@ -26,26 +26,26 @@ def ensure_future(coro_or_future: _FutureT[_T],
|
||||
async = ensure_future
|
||||
@overload
|
||||
def gather(coro_or_future1: _FutureT[_T1],
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[Tuple[_T1]]: ...
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = ...) -> Future[Tuple[_T1]]: ...
|
||||
@overload
|
||||
def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2],
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[Tuple[_T1, _T2]]: ...
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = ...) -> Future[Tuple[_T1, _T2]]: ...
|
||||
@overload
|
||||
def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3],
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[Tuple[_T1, _T2, _T3]]: ...
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = ...) -> Future[Tuple[_T1, _T2, _T3]]: ...
|
||||
@overload
|
||||
def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3],
|
||||
coro_or_future4: _FutureT[_T4],
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[Tuple[_T1, _T2, _T3, _T4]]: ...
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = ...) -> Future[Tuple[_T1, _T2, _T3, _T4]]: ...
|
||||
@overload
|
||||
def gather(coro_or_future1: _FutureT[_T1], coro_or_future2: _FutureT[_T2], coro_or_future3: _FutureT[_T3],
|
||||
coro_or_future4: _FutureT[_T4], coro_or_future5: _FutureT[_T5],
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[Tuple[_T1, _T2, _T3, _T4, _T5]]: ...
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = ...) -> Future[Tuple[_T1, _T2, _T3, _T4, _T5]]: ...
|
||||
@overload
|
||||
def gather(coro_or_future1: _FutureT[Any], coro_or_future2: _FutureT[Any], coro_or_future3: _FutureT[Any],
|
||||
coro_or_future4: _FutureT[Any], coro_or_future5: _FutureT[Any], coro_or_future6: _FutureT[Any],
|
||||
*coros_or_futures: _FutureT[Any],
|
||||
loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[Tuple[Any, ...]]: ...
|
||||
loop: AbstractEventLoop = ..., return_exceptions: bool = ...) -> Future[Tuple[Any, ...]]: ...
|
||||
def run_coroutine_threadsafe(coro: _FutureT[_T],
|
||||
loop: AbstractEventLoop) -> concurrent.futures.Future[_T]: ...
|
||||
def shield(arg: _FutureT[_T], *, loop: AbstractEventLoop = ...) -> Future[_T]: ...
|
||||
|
||||
@@ -12,8 +12,8 @@ from typing import Any, Dict, List, Optional
|
||||
if sys.version_info >= (3, 4):
|
||||
class ModuleSpec:
|
||||
def __init__(self, name: str, loader: Optional['Loader'], *,
|
||||
origin: Optional[str] = None, loader_state: Any = None,
|
||||
is_package: Optional[bool] = None) -> None: ...
|
||||
origin: Optional[str] = ..., loader_state: Any = None,
|
||||
is_package: Optional[bool] = ...) -> None: ...
|
||||
name = ... # type: str
|
||||
loader = ... # type: Optional[Loader]
|
||||
origin = ... # type: Optional[str]
|
||||
|
||||
@@ -198,7 +198,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
|
||||
class complex(SupportsAbs[float]):
|
||||
@overload
|
||||
def __init__(self, re: float = 0.0, im: float = 0.0) -> None: ...
|
||||
def __init__(self, re: float = ..., im: float = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, s: str) -> None: ...
|
||||
|
||||
@@ -240,10 +240,10 @@ class str(Sequence[str]):
|
||||
def casefold(self) -> str: ...
|
||||
def center(self, width: int, fillchar: str = ...) -> str: ...
|
||||
def count(self, x: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def encode(self, encoding: str = 'utf-8', errors: str = 'strict') -> bytes: ...
|
||||
def endswith(self, suffix: Union[str, Tuple[str, ...]], start: Optional[int] = None,
|
||||
end: Optional[int] = None) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> str: ...
|
||||
def encode(self, encoding: str = ..., errors: str = ...) -> bytes: ...
|
||||
def endswith(self, suffix: Union[str, Tuple[str, ...]], start: Optional[int] = ...,
|
||||
end: Optional[int] = ...) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> str: ...
|
||||
def find(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def format(self, *args: Any, **kwargs: Any) -> str: ...
|
||||
def format_map(self, map: Mapping[str, Any]) -> str: ...
|
||||
@@ -262,20 +262,20 @@ class str(Sequence[str]):
|
||||
def join(self, iterable: Iterable[str]) -> str: ...
|
||||
def ljust(self, width: int, fillchar: str = ...) -> str: ...
|
||||
def lower(self) -> str: ...
|
||||
def lstrip(self, chars: Optional[str] = None) -> str: ...
|
||||
def lstrip(self, chars: Optional[str] = ...) -> str: ...
|
||||
def partition(self, sep: str) -> Tuple[str, str, str]: ...
|
||||
def replace(self, old: str, new: str, count: int = -1) -> str: ...
|
||||
def rfind(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rindex(self, sub: str, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: str = ...) -> str: ...
|
||||
def rpartition(self, sep: str) -> Tuple[str, str, str]: ...
|
||||
def rsplit(self, sep: Optional[str] = None, maxsplit: int = -1) -> List[str]: ...
|
||||
def rstrip(self, chars: Optional[str] = None) -> str: ...
|
||||
def split(self, sep: Optional[str] = None, maxsplit: int = -1) -> List[str]: ...
|
||||
def rsplit(self, sep: Optional[str] = ..., maxsplit: int = -1) -> List[str]: ...
|
||||
def rstrip(self, chars: Optional[str] = ...) -> str: ...
|
||||
def split(self, sep: Optional[str] = ..., maxsplit: int = -1) -> List[str]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[str]: ...
|
||||
def startswith(self, prefix: Union[str, Tuple[str, ...]], start: Optional[int] = None,
|
||||
end: Optional[int] = None) -> bool: ...
|
||||
def strip(self, chars: Optional[str] = None) -> str: ...
|
||||
def startswith(self, prefix: Union[str, Tuple[str, ...]], start: Optional[int] = ...,
|
||||
end: Optional[int] = ...) -> bool: ...
|
||||
def strip(self, chars: Optional[str] = ...) -> str: ...
|
||||
def swapcase(self) -> str: ...
|
||||
def title(self) -> str: ...
|
||||
def translate(self, table: Union[Mapping[int, Union[int, str, None]], Sequence[Union[int, str, None]]]) -> str: ...
|
||||
@@ -312,7 +312,7 @@ class bytes(ByteString):
|
||||
def __init__(self, ints: Iterable[int]) -> None: ...
|
||||
@overload
|
||||
def __init__(self, string: str, encoding: str,
|
||||
errors: str = 'strict') -> None: ...
|
||||
errors: str = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, length: int) -> None: ...
|
||||
@overload
|
||||
@@ -322,22 +322,22 @@ class bytes(ByteString):
|
||||
def capitalize(self) -> bytes: ...
|
||||
def center(self, width: int, fillchar: bytes = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def count(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def decode(self, encoding: str = 'utf-8', errors: str = 'strict') -> str: ...
|
||||
def count(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
|
||||
def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> bytes: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def find(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def hex(self) -> str: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def index(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
def isdigit(self) -> bool: ...
|
||||
@@ -348,25 +348,25 @@ class bytes(ByteString):
|
||||
def join(self, iterable: Iterable[bytes]) -> bytes: ...
|
||||
def ljust(self, width: int, fillchar: bytes = ...) -> bytes: ...
|
||||
def lower(self) -> bytes: ...
|
||||
def lstrip(self, chars: Optional[bytes] = None) -> bytes: ...
|
||||
def lstrip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
def partition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
|
||||
def replace(self, old: bytes, new: bytes, count: int = -1) -> bytes: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rfind(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rindex(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: bytes = ...) -> bytes: ...
|
||||
def rpartition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytes]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = None) -> bytes: ...
|
||||
def split(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytes]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytes]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytes]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[bytes]: ...
|
||||
def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
|
||||
def strip(self, chars: Optional[bytes] = None) -> bytes: ...
|
||||
def strip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
def swapcase(self) -> bytes: ...
|
||||
def title(self) -> bytes: ...
|
||||
def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytes: ...
|
||||
@@ -405,7 +405,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
@overload
|
||||
def __init__(self, ints: Iterable[int]) -> None: ...
|
||||
@overload
|
||||
def __init__(self, string: str, encoding: str, errors: str = 'strict') -> None: ...
|
||||
def __init__(self, string: str, encoding: str, errors: str = ...) -> None: ...
|
||||
@overload
|
||||
def __init__(self, length: int) -> None: ...
|
||||
@overload
|
||||
@@ -413,22 +413,22 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def capitalize(self) -> bytearray: ...
|
||||
def center(self, width: int, fillchar: bytes = ...) -> bytearray: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def count(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def decode(self, encoding: str = 'utf-8', errors: str = 'strict') -> str: ...
|
||||
def count(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
|
||||
def endswith(self, suffix: bytes) -> bool: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> bytearray: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> bytearray: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def find(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def find(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def hex(self) -> str: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def index(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def index(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def insert(self, index: int, object: int) -> None: ...
|
||||
def isalnum(self) -> bool: ...
|
||||
def isalpha(self) -> bool: ...
|
||||
@@ -440,25 +440,25 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def join(self, iterable: Iterable[bytes]) -> bytearray: ...
|
||||
def ljust(self, width: int, fillchar: bytes = ...) -> bytearray: ...
|
||||
def lower(self) -> bytearray: ...
|
||||
def lstrip(self, chars: Optional[bytes] = None) -> bytearray: ...
|
||||
def lstrip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
def partition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
def replace(self, old: bytes, new: bytes, count: int = -1) -> bytearray: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rfind(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rfind(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
def rindex(self, sub: bytes, start: Optional[int] = None, end: Optional[int] = None) -> int: ...
|
||||
def rindex(self, sub: bytes, start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
def rjust(self, width: int, fillchar: bytes = ...) -> bytearray: ...
|
||||
def rpartition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = None) -> bytearray: ...
|
||||
def split(self, sep: Optional[bytes] = None, maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
|
||||
def startswith(self, prefix: bytes) -> bool: ...
|
||||
def strip(self, chars: Optional[bytes] = None) -> bytearray: ...
|
||||
def strip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
def swapcase(self) -> bytearray: ...
|
||||
def title(self) -> bytearray: ...
|
||||
def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytearray: ...
|
||||
@@ -545,7 +545,7 @@ class slice:
|
||||
@overload
|
||||
def __init__(self, stop: Optional[int]) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = None) -> None: ...
|
||||
def __init__(self, start: Optional[int], stop: Optional[int], step: Optional[int] = ...) -> None: ...
|
||||
def indices(self, len: int) -> Tuple[int, int, int]: ...
|
||||
|
||||
class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
@@ -566,7 +566,7 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
|
||||
def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ...
|
||||
def count(self, x: Any) -> int: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def index(self, x: Any, start: int = 0, end: int = 0) -> int: ...
|
||||
def index(self, x: Any, start: int = ..., end: int = ...) -> int: ...
|
||||
else:
|
||||
def index(self, x: Any) -> int: ...
|
||||
|
||||
@@ -588,7 +588,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def append(self, object: _T) -> None: ...
|
||||
def extend(self, iterable: Iterable[_T]) -> None: ...
|
||||
def pop(self, index: int = -1) -> _T: ...
|
||||
def index(self, object: _T, start: int = 0, stop: int = ...) -> int: ...
|
||||
def index(self, object: _T, start: int = ..., stop: int = ...) -> int: ...
|
||||
def count(self, object: _T) -> int: ...
|
||||
def insert(self, index: int, object: _T) -> None: ...
|
||||
def remove(self, object: _T) -> None: ...
|
||||
@@ -635,7 +635,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def clear(self) -> None: ...
|
||||
def copy(self) -> Dict[_KT, _VT]: ...
|
||||
def popitem(self) -> Tuple[_KT, _VT]: ...
|
||||
def setdefault(self, k: _KT, default: Optional[_VT] = None) -> _VT: ...
|
||||
def setdefault(self, k: _KT, default: Optional[_VT] = ...) -> _VT: ...
|
||||
@overload
|
||||
def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ...
|
||||
@overload
|
||||
@@ -719,7 +719,7 @@ class frozenset(AbstractSet[_T], Generic[_T]):
|
||||
def __gt__(self, s: AbstractSet[object]) -> bool: ...
|
||||
|
||||
class enumerate(Iterator[Tuple[int, _T]], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T], start: int = 0) -> None: ...
|
||||
def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ...
|
||||
def __iter__(self) -> Iterator[Tuple[int, _T]]: ...
|
||||
def __next__(self) -> Tuple[int, _T]: ...
|
||||
|
||||
@@ -730,9 +730,9 @@ class range(Sequence[int]):
|
||||
@overload
|
||||
def __init__(self, stop: int) -> None: ...
|
||||
@overload
|
||||
def __init__(self, start: int, stop: int, step: int = 1) -> None: ...
|
||||
def __init__(self, start: int, stop: int, step: int = ...) -> None: ...
|
||||
def count(self, value: int) -> int: ...
|
||||
def index(self, value: int, start: int = 0, stop: Optional[int] = None) -> int: ...
|
||||
def index(self, value: int, start: int = ..., stop: Optional[int] = ...) -> int: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, o: object) -> bool: ...
|
||||
def __iter__(self) -> Iterator[int]: ...
|
||||
@@ -747,11 +747,11 @@ class property:
|
||||
def __init__(self, fget: Optional[Callable[[Any], Any]] = None,
|
||||
fset: Optional[Callable[[Any, Any], None]] = None,
|
||||
fdel: Optional[Callable[[Any], None]] = None,
|
||||
doc: Optional[str] = None) -> None: ...
|
||||
doc: Optional[str] = ...) -> None: ...
|
||||
def getter(self, fget: Callable[[Any], Any]) -> property: ...
|
||||
def setter(self, fset: Callable[[Any, Any], None]) -> property: ...
|
||||
def deleter(self, fdel: Callable[[Any], None]) -> property: ...
|
||||
def __get__(self, obj: Any, type: Optional[type] = None) -> Any: ...
|
||||
def __get__(self, obj: Any, type: Optional[type] = ...) -> Any: ...
|
||||
def __set__(self, obj: Any, value: Any) -> None: ...
|
||||
def __delete__(self, obj: Any) -> None: ...
|
||||
def fget(self) -> Any: ...
|
||||
@@ -767,7 +767,7 @@ def ascii(o: object) -> str: ...
|
||||
def bin(number: int) -> str: ...
|
||||
def callable(o: object) -> bool: ...
|
||||
def chr(code: int) -> str: ...
|
||||
def compile(source: Any, filename: Union[str, bytes], mode: str, flags: int = 0, dont_inherit: int = 0) -> CodeType: ...
|
||||
def compile(source: Any, filename: Union[str, bytes], mode: str, flags: int = ..., dont_inherit: int = ...) -> CodeType: ...
|
||||
def copyright() -> None: ...
|
||||
def credits() -> None: ...
|
||||
def delattr(o: Any, name: str) -> None: ...
|
||||
@@ -790,7 +790,7 @@ def hash(o: object) -> int: ...
|
||||
def help(*args: Any, **kwds: Any) -> None: ...
|
||||
def hex(i: int) -> str: ... # TODO __index__
|
||||
def id(o: object) -> int: ...
|
||||
def input(prompt: Optional[Any] = None) -> str: ...
|
||||
def input(prompt: Optional[Any] = ...) -> str: ...
|
||||
@overload
|
||||
def iter(iterable: Iterable[_T]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
@@ -826,15 +826,15 @@ if sys.version_info >= (3, 6):
|
||||
class _PathLike(Generic[AnyStr]):
|
||||
def __fspath__(self) -> AnyStr: ...
|
||||
|
||||
def open(file: Union[str, bytes, int, _PathLike], mode: str = 'r', buffering: int = -1, encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None, newline: Optional[str] = None, closefd: bool = ...) -> IO[Any]: ...
|
||||
def open(file: Union[str, bytes, int, _PathLike], mode: str = ..., buffering: int = -1, encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...) -> IO[Any]: ...
|
||||
else:
|
||||
def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None, newline: Optional[str] = None, closefd: bool = ...) -> IO[Any]: ...
|
||||
def open(file: Union[str, bytes, int], mode: str = ..., buffering: int = -1, encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...) -> IO[Any]: ...
|
||||
|
||||
def ord(c: Union[str, bytes, bytearray]) -> int: ...
|
||||
# TODO: in Python 3.2, print() does not support flush
|
||||
def print(*values: Any, sep: str = ..., end: str = ..., file: Optional[IO[str]] = None, flush: bool = False) -> None: ...
|
||||
def print(*values: Any, sep: str = ..., end: str = ..., file: Optional[IO[str]] = None, flush: bool = ...) -> None: ...
|
||||
@overload
|
||||
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y
|
||||
@overload
|
||||
@@ -843,7 +843,7 @@ def pow(x: int, y: int, z: int) -> Any: ...
|
||||
def pow(x: float, y: float) -> float: ...
|
||||
@overload
|
||||
def pow(x: float, y: float, z: float) -> float: ...
|
||||
def quit(code: Optional[int] = None) -> None: ...
|
||||
def quit(code: Optional[int] = ...) -> None: ...
|
||||
@overload
|
||||
def reversed(object: Reversible[_T]) -> Iterator[_T]: ...
|
||||
@overload
|
||||
@@ -860,7 +860,7 @@ def round(number: SupportsRound[_T], ndigits: int) -> _T: ...
|
||||
def setattr(object: Any, name: str, value: Any) -> None: ...
|
||||
def sorted(iterable: Iterable[_T], *,
|
||||
key: Optional[Callable[[_T], Any]] = None,
|
||||
reverse: bool = False) -> List[_T]: ...
|
||||
reverse: bool = ...) -> List[_T]: ...
|
||||
@overload
|
||||
def sum(iterable: Iterable[_T]) -> Union[_T, int]: ...
|
||||
@overload
|
||||
|
||||
@@ -91,9 +91,9 @@ class RawConfigParser(_parser):
|
||||
def has_option(self, section: str, option: str) -> bool: ...
|
||||
|
||||
def read(self, filenames: Union[_Path, Iterable[_Path]],
|
||||
encoding: Optional[str] = None) -> List[str]: ...
|
||||
encoding: Optional[str] = ...) -> List[str]: ...
|
||||
|
||||
def read_file(self, f: Iterable[str], source: Optional[str] = None) -> None: ...
|
||||
def read_file(self, f: Iterable[str], source: Optional[str] = ...) -> None: ...
|
||||
|
||||
def read_string(self, string: str, source: str = ...) -> None: ...
|
||||
|
||||
@@ -124,7 +124,7 @@ class RawConfigParser(_parser):
|
||||
|
||||
def write(self,
|
||||
fileobject: IO[str],
|
||||
space_around_delimiters: bool = True) -> None: ...
|
||||
space_around_delimiters: bool = ...) -> None: ...
|
||||
|
||||
def remove_option(self, section: str, option: str) -> bool: ...
|
||||
|
||||
@@ -135,7 +135,7 @@ class RawConfigParser(_parser):
|
||||
|
||||
class ConfigParser(RawConfigParser):
|
||||
def __init__(self,
|
||||
defaults: Optional[_section] = None,
|
||||
defaults: Optional[_section] = ...,
|
||||
dict_type: Mapping[str, str] = ...,
|
||||
allow_no_value: bool = ...,
|
||||
delimiters: Sequence[str] = ...,
|
||||
@@ -144,7 +144,7 @@ class ConfigParser(RawConfigParser):
|
||||
strict: bool = ...,
|
||||
empty_lines_in_values: bool = ...,
|
||||
default_section: str = ...,
|
||||
interpolation: Optional[Interpolation] = None,
|
||||
interpolation: Optional[Interpolation] = ...,
|
||||
converters: _converters = ...) -> None: ...
|
||||
|
||||
class SafeConfigParser(ConfigParser): ...
|
||||
|
||||
@@ -95,7 +95,7 @@ class time:
|
||||
def tzname(self) -> Optional[str]: ...
|
||||
def dst(self) -> Optional[int]: ...
|
||||
def replace(self, hour: int = ..., minute: int = ..., second: int = ...,
|
||||
microsecond: int = ..., tzinfo: Optional[_tzinfo] = None) -> time: ...
|
||||
microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...) -> time: ...
|
||||
|
||||
_date = date
|
||||
_time = time
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
from typing import Optional, TextIO
|
||||
|
||||
|
||||
def getpass(prompt: str = ..., stream: Optional[TextIO] = None) -> str: ...
|
||||
def getpass(prompt: str = ..., stream: Optional[TextIO] = ...) -> str: ...
|
||||
|
||||
|
||||
def getuser() -> str: ...
|
||||
|
||||
@@ -9,10 +9,10 @@ def __import__(name: str, globals: Optional[Mapping[str, Any]] = None,
|
||||
fromlist: Sequence[str] = ...,
|
||||
level: int = ...) -> types.ModuleType: ...
|
||||
|
||||
def import_module(name: str, package: Optional[str] = None) -> types.ModuleType: ...
|
||||
def import_module(name: str, package: Optional[str] = ...) -> types.ModuleType: ...
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
def find_loader(name: str, path: Optional[str] = None) -> Optional[Loader]: ...
|
||||
def find_loader(name: str, path: Optional[str] = ...) -> Optional[Loader]: ...
|
||||
|
||||
def invalidate_caches() -> None: ...
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ if sys.version_info >= (3, 3):
|
||||
# Not defined on the actual class, but expected to exist.
|
||||
def find_spec(
|
||||
self, fullname: str, path: Optional[Sequence[_Path]],
|
||||
target: Optional[types.ModuleType] = None
|
||||
target: Optional[types.ModuleType] = ...
|
||||
) -> Optional[ModuleSpec]:
|
||||
...
|
||||
|
||||
@@ -78,7 +78,7 @@ if sys.version_info >= (3, 3):
|
||||
# Not defined on the actual class, but expected to exist.
|
||||
def find_spec(
|
||||
self, fullname: str,
|
||||
target: Optional[types.ModuleType] = None
|
||||
target: Optional[types.ModuleType] = ...
|
||||
) -> Optional[ModuleSpec]: ...
|
||||
|
||||
class FileLoader(ResourceLoader, ExecutionLoader):
|
||||
|
||||
@@ -22,7 +22,7 @@ if sys.version_info >= (3, 3):
|
||||
@classmethod
|
||||
def find_spec(cls, fullname: str,
|
||||
path: Optional[Sequence[importlib.abc._Path]],
|
||||
target: Optional[types.ModuleType] = None) -> Optional[ModuleSpec]:
|
||||
target: Optional[types.ModuleType] = ...) -> Optional[ModuleSpec]:
|
||||
...
|
||||
# InspectLoader
|
||||
@classmethod
|
||||
@@ -79,7 +79,7 @@ if sys.version_info >= (3, 3):
|
||||
@classmethod
|
||||
def find_spec(cls, fullname: str,
|
||||
path: Optional[Sequence[importlib.abc._Path]],
|
||||
target: Optional[types.ModuleType] = None) -> Optional[ModuleSpec]:
|
||||
target: Optional[types.ModuleType] = ...) -> Optional[ModuleSpec]:
|
||||
...
|
||||
# InspectLoader
|
||||
@classmethod
|
||||
@@ -136,7 +136,7 @@ if sys.version_info >= (3, 3):
|
||||
@classmethod
|
||||
def find_spec(cls, fullname: str,
|
||||
path: Optional[Sequence[importlib.abc._Path]],
|
||||
target: Optional[types.ModuleType] = None) -> Optional[ModuleSpec]:
|
||||
target: Optional[types.ModuleType] = ...) -> Optional[ModuleSpec]:
|
||||
...
|
||||
else:
|
||||
class WindowsRegisteryFinder:
|
||||
|
||||
@@ -20,21 +20,21 @@ if sys.version_info >= (3, 3):
|
||||
if sys.version_info >= (3, 4):
|
||||
MAGIC_NUMBER = ... # type: bytes
|
||||
|
||||
def cache_from_source(path: str, debug_override: Optional[bool] = None, *,
|
||||
optimization: Optional[Any] = None) -> str: ...
|
||||
def cache_from_source(path: str, debug_override: Optional[bool] = ..., *,
|
||||
optimization: Optional[Any] = ...) -> str: ...
|
||||
def source_from_cache(path: str) -> str: ...
|
||||
def decode_source(source_bytes: bytes) -> str: ...
|
||||
def find_spec(
|
||||
name: str, package: Optional[str] = None
|
||||
name: str, package: Optional[str] = ...
|
||||
) -> importlib.machinery.ModuleSpec: ...
|
||||
def spec_from_loader(
|
||||
name: str, loader: Optional[importlib.abc.Loader], *,
|
||||
origin: Optional[str] = None, loader_state: Optional[Any] = None,
|
||||
is_package: Optional[bool] = None
|
||||
origin: Optional[str] = ..., loader_state: Optional[Any] = ...,
|
||||
is_package: Optional[bool] = ...
|
||||
) -> importlib.machinery.ModuleSpec: ...
|
||||
def spec_from_file_location(
|
||||
name: str, location: str, *,
|
||||
loader: Optional[importlib.abc.Loader] = None,
|
||||
loader: Optional[importlib.abc.Loader] = ...,
|
||||
submodule_search_locations: Optional[List[str]] = None
|
||||
) -> importlib.machinery.ModuleSpec: ...
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ def cleandoc(doc: str) -> str: ...
|
||||
#
|
||||
def signature(callable: Callable[..., Any],
|
||||
*,
|
||||
follow_wrapped: bool = True) -> 'Signature': ...
|
||||
follow_wrapped: bool = ...) -> 'Signature': ...
|
||||
|
||||
class Signature:
|
||||
def __init__(self,
|
||||
@@ -93,7 +93,7 @@ class Signature:
|
||||
def from_callable(cls,
|
||||
obj: Callable[..., Any],
|
||||
*,
|
||||
follow_wrapped: bool = True) -> 'Signature': ...
|
||||
follow_wrapped: bool = ...) -> 'Signature': ...
|
||||
|
||||
# The name is the same as the enum's name in CPython
|
||||
class _ParameterKind: ...
|
||||
@@ -229,13 +229,13 @@ FrameInfo = NamedTuple('FrameInfo', [('frame', FrameType),
|
||||
])
|
||||
|
||||
# TODO make the frame type more specific
|
||||
def getframeinfo(frame: Any, context: int = 1) -> FrameInfo: ...
|
||||
def getouterframes(frame: Any, context: int = 1) -> List[FrameInfo]: ...
|
||||
def getinnerframes(traceback: TracebackType, context: int = 1) -> List[FrameInfo]:
|
||||
def getframeinfo(frame: Any, context: int = ...) -> FrameInfo: ...
|
||||
def getouterframes(frame: Any, context: int = ...) -> List[FrameInfo]: ...
|
||||
def getinnerframes(traceback: TracebackType, context: int = ...) -> List[FrameInfo]:
|
||||
...
|
||||
def currentframe() -> Optional[FrameType]: ...
|
||||
def stack(context: int = 1) -> List[FrameInfo]: ...
|
||||
def trace(context: int = 1) -> List[FrameInfo]: ...
|
||||
def stack(context: int = ...) -> List[FrameInfo]: ...
|
||||
def trace(context: int = ...) -> List[FrameInfo]: ...
|
||||
|
||||
#
|
||||
# Fetching attributes statically
|
||||
|
||||
@@ -102,8 +102,8 @@ class BytesIO(BinaryIO):
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def __enter__(self) -> 'BytesIO': ...
|
||||
def __exit__(self, t: Optional[type] = None, value: Optional[BaseException] = None,
|
||||
traceback: Optional[Any] = None) -> bool: ...
|
||||
def __exit__(self, t: Optional[type] = ..., value: Optional[BaseException] = ...,
|
||||
traceback: Optional[Any] = ...) -> bool: ...
|
||||
def close(self) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
def flush(self) -> None: ...
|
||||
@@ -205,8 +205,8 @@ class TextIOWrapper(TextIO):
|
||||
write_through: bool = ...
|
||||
) -> None: ...
|
||||
# copied from IOBase
|
||||
def __exit__(self, t: Optional[type] = None, value: Optional[BaseException] = None,
|
||||
traceback: Optional[Any] = None) -> bool: ...
|
||||
def __exit__(self, t: Optional[type] = ..., value: Optional[BaseException] = ...,
|
||||
traceback: Optional[Any] = ...) -> bool: ...
|
||||
def close(self) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
def flush(self) -> None: ...
|
||||
|
||||
@@ -22,7 +22,7 @@ class JSONDecoder:
|
||||
parse_float: Optional[Callable[[str], Any]] = None,
|
||||
parse_int: Optional[Callable[[str], Any]] = None,
|
||||
parse_constant: Optional[Callable[[str], Any]] = None,
|
||||
strict: bool = True,
|
||||
strict: bool = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = None) -> None: ...
|
||||
def decode(self, s: str) -> Any: ...
|
||||
def raw_decode(self, s: str, idx: int = ...) -> Tuple[Any, int]: ...
|
||||
|
||||
@@ -13,8 +13,8 @@ class JSONEncoder:
|
||||
|
||||
def __init__(self, skipkeys: bool = ..., ensure_ascii: bool = ...,
|
||||
check_circular: bool = ..., allow_nan: bool = ..., sort_keys: bool = ...,
|
||||
indent: Optional[int] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None) -> None: ...
|
||||
indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = ...) -> None: ...
|
||||
|
||||
def default(self, o: Any) -> Any: ...
|
||||
def encode(self, o: Any) -> str: ...
|
||||
def iterencode(self, o: Any, _one_shot: bool = False) -> Iterator[str]: ...
|
||||
def iterencode(self, o: Any, _one_shot: bool = ...) -> Iterator[str]: ...
|
||||
|
||||
@@ -20,7 +20,7 @@ class Pool(ContextManager[Pool]):
|
||||
initializer: Optional[Callable[..., None]] = ...,
|
||||
initargs: Iterable[Any] = ...,
|
||||
maxtasksperchild: Optional[int] = ...,
|
||||
context: Optional[Any] = None) -> None: ...
|
||||
context: Optional[Any] = ...) -> None: ...
|
||||
def apply(self,
|
||||
func: Callable[..., Any],
|
||||
args: Iterable[Any] = ...,
|
||||
@@ -34,28 +34,28 @@ class Pool(ContextManager[Pool]):
|
||||
def map(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
chunksize: Optional[int] = None) -> List[Any]: ...
|
||||
chunksize: Optional[int] = ...) -> List[Any]: ...
|
||||
def map_async(self, func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
chunksize: Optional[int] = None,
|
||||
chunksize: Optional[int] = ...,
|
||||
callback: Optional[Callable[..., None]] = None,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = None) -> AsyncResult: ...
|
||||
def imap(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
chunksize: Optional[int] = None) -> Iterable[Any]: ...
|
||||
chunksize: Optional[int] = ...) -> Iterable[Any]: ...
|
||||
def imap_unordered(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
chunksize: Optional[int] = None) -> Iterable[Any]: ...
|
||||
chunksize: Optional[int] = ...) -> Iterable[Any]: ...
|
||||
def starmap(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Iterable[Any]] = ...,
|
||||
chunksize: Optional[int] = None) -> List[Any]: ...
|
||||
chunksize: Optional[int] = ...) -> List[Any]: ...
|
||||
def starmap_async(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Iterable[Any]] = ...,
|
||||
chunksize: Optional[int] = None,
|
||||
chunksize: Optional[int] = ...,
|
||||
callback: Optional[Callable[..., None]] = None,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = None) -> AsyncResult: ...
|
||||
def close(self) -> None: ...
|
||||
@@ -66,6 +66,6 @@ class Pool(ContextManager[Pool]):
|
||||
|
||||
class ThreadPool(Pool, ContextManager[ThreadPool]):
|
||||
|
||||
def __init__(self, processes: Optional[int] = None,
|
||||
def __init__(self, processes: Optional[int] = ...,
|
||||
initializer: Optional[Callable[..., Any]] = None,
|
||||
initargs: Iterable[Any] = ...) -> None: ...
|
||||
|
||||
@@ -3,7 +3,7 @@ import collections
|
||||
|
||||
|
||||
class Shelf(collections.MutableMapping):
|
||||
def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = None, writeback: bool = ..., keyencoding: str = 'utf-8') -> None: ...
|
||||
def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ...
|
||||
def __iter__(self) -> Iterator[str]: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __contains__(self, key: Any) -> bool: ... # key should be str, but it would conflict with superclass's type signature
|
||||
@@ -18,7 +18,7 @@ class Shelf(collections.MutableMapping):
|
||||
def sync(self) -> None: ...
|
||||
|
||||
class BsdDbShelf(Shelf):
|
||||
def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = None, writeback: bool = ..., keyencoding: str = 'utf-8') -> None: ...
|
||||
def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ...
|
||||
def set_location(self, key: Any) -> Tuple[str, Any]: ...
|
||||
def next(self) -> Tuple[str, Any]: ...
|
||||
def previous(self) -> Tuple[str, Any]: ...
|
||||
@@ -26,6 +26,6 @@ class BsdDbShelf(Shelf):
|
||||
def last(self) -> Tuple[str, Any]: ...
|
||||
|
||||
class DbfilenameShelf(Shelf):
|
||||
def __init__(self, filename: str, flag: str = 'c', protocol: Optional[int] = None, writeback: bool = ...) -> None: ...
|
||||
def __init__(self, filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> None: ...
|
||||
|
||||
def open(filename: str, flag: str = 'c', protocol: Optional[int] = None, writeback: bool = ...) -> DbfilenameShelf: ...
|
||||
def open(filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> DbfilenameShelf: ...
|
||||
|
||||
@@ -180,7 +180,7 @@ if sys.version_info >= (3, 6):
|
||||
def asend(self, value: _T_contra) -> Awaitable[_T_co]: ...
|
||||
|
||||
@abstractmethod
|
||||
def athrow(self, typ: Type[BaseException], val: Optional[BaseException] = None,
|
||||
def athrow(self, typ: Type[BaseException], val: Optional[BaseException] = ...,
|
||||
tb: Any = None) -> Awaitable[_T_co]: ...
|
||||
|
||||
@abstractmethod
|
||||
@@ -214,7 +214,7 @@ class Sequence(_Collection[_T_co], Reversible[_T_co], Generic[_T_co]):
|
||||
def __getitem__(self, s: slice) -> Sequence[_T_co]: ...
|
||||
# Mixin methods
|
||||
if sys.version_info >= (3, 5):
|
||||
def index(self, x: Any, start: int = 0, end: int = 0) -> int: ...
|
||||
def index(self, x: Any, start: int = ..., end: int = ...) -> int: ...
|
||||
else:
|
||||
def index(self, x: Any) -> int: ...
|
||||
def count(self, x: Any) -> int: ...
|
||||
|
||||
@@ -38,7 +38,7 @@ if sys.version_info >= (3, 3):
|
||||
# expecting other classes (as is Mock's purpose)
|
||||
class NonCallableMock(Any): # type: ignore
|
||||
def __new__(cls, *args: Any, **kw: Any) -> Any: ...
|
||||
def __init__(self, spec: Optional[Any] = None, wraps: Optional[Any] = None, name: Optional[Any] = None, spec_set: Optional[Any] = None, parent: Optional[Any] = None, _spec_state: Optional[Any] = None, _new_name: Any = ..., _new_parent: Optional[Any] = None, _spec_as_instance: Any = False, _eat_self: Optional[Any] = None, unsafe: Any = False, **kwargs: Any) -> None: ...
|
||||
def __init__(self, spec: Optional[Any] = ..., wraps: Optional[Any] = ..., name: Optional[Any] = ..., spec_set: Optional[Any] = ..., parent: Optional[Any] = ..., _spec_state: Optional[Any] = ..., _new_name: Any = ..., _new_parent: Optional[Any] = ..., _spec_as_instance: Any = False, _eat_self: Optional[Any] = ..., unsafe: Any = False, **kwargs: Any) -> None: ...
|
||||
def attach_mock(self, mock: Any, attribute: Any) -> Any: ...
|
||||
def mock_add_spec(self, spec: Any, spec_set: Any = False) -> Any: ...
|
||||
return_value = ... # type: Any
|
||||
@@ -50,7 +50,7 @@ if sys.version_info >= (3, 3):
|
||||
mock_calls = ... # type: Any
|
||||
side_effect = ... # type: Any
|
||||
method_calls = ... # type: Any
|
||||
def reset_mock(self, visited: Optional[bool] = None) -> None: ...
|
||||
def reset_mock(self, visited: Optional[bool] = ...) -> None: ...
|
||||
def configure_mock(self, **kwargs: Any) -> None: ...
|
||||
def __getattr__(self, name: Any) -> Any: ...
|
||||
def __dir__(self) -> Any: ...
|
||||
@@ -59,12 +59,12 @@ if sys.version_info >= (3, 3):
|
||||
def assert_not_called(_mock_self) -> None: ...
|
||||
def assert_called_with(_mock_self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def assert_called_once_with(_mock_self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def assert_has_calls(self, calls: Any, any_order: bool = False) -> None: ...
|
||||
def assert_has_calls(self, calls: Any, any_order: bool = ...) -> None: ...
|
||||
def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
|
||||
class CallableMixin(Base):
|
||||
side_effect = ... # type: Any
|
||||
def __init__(self, spec: Optional[Any] = None, side_effect: Optional[Any] = None, return_value: Any = ..., wraps: Optional[Any] = None, name: Optional[Any] = None, spec_set: Optional[Any] = None, parent: Optional[Any] = None, _spec_state: Optional[Any] = None, _new_name: Any = ..., _new_parent: Optional[Any] = None, **kwargs: Any) -> None: ...
|
||||
def __init__(self, spec: Optional[Any] = ..., side_effect: Optional[Any] = ..., return_value: Any = ..., wraps: Optional[Any] = ..., name: Optional[Any] = ..., spec_set: Optional[Any] = ..., parent: Optional[Any] = ..., _spec_state: Optional[Any] = ..., _new_name: Any = ..., _new_parent: Optional[Any] = ..., **kwargs: Any) -> None: ...
|
||||
def __call__(_mock_self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
|
||||
class Mock(CallableMixin, NonCallableMock):
|
||||
@@ -133,7 +133,7 @@ if sys.version_info >= (3, 3):
|
||||
def __init__(self, name: Any, parent: Any) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def create_mock(self) -> Any: ...
|
||||
def __get__(self, obj: Any, _type: Optional[Any] = None) -> Any: ...
|
||||
def __get__(self, obj: Any, _type: Optional[Any] = ...) -> Any: ...
|
||||
|
||||
class _ANY:
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
@@ -142,11 +142,11 @@ if sys.version_info >= (3, 3):
|
||||
ANY = ... # type: Any
|
||||
|
||||
class _Call(tuple):
|
||||
def __new__(cls, value: Any = ..., name: Optional[Any] = None, parent: Optional[Any] = None, two: bool = False, from_kall: bool = True) -> Any: ...
|
||||
def __new__(cls, value: Any = ..., name: Optional[Any] = ..., parent: Optional[Any] = ..., two: bool = ..., from_kall: bool = ...) -> Any: ...
|
||||
name = ... # type: Any
|
||||
parent = ... # type: Any
|
||||
from_kall = ... # type: Any
|
||||
def __init__(self, value: Any = ..., name: Optional[Any] = None, parent: Optional[Any] = None, two: bool = False, from_kall: bool = True) -> None: ...
|
||||
def __init__(self, value: Any = ..., name: Optional[Any] = ..., parent: Optional[Any] = ..., two: bool = ..., from_kall: bool = ...) -> None: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
__ne__ = ... # type: Any
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
@@ -157,7 +157,7 @@ if sys.version_info >= (3, 3):
|
||||
|
||||
call = ... # type: Any
|
||||
|
||||
def create_autospec(spec: Any, spec_set: Any = False, instance: Any = False, _parent: Optional[Any] = None, _name: Optional[Any] = None, **kwargs: Any) -> Any: ...
|
||||
def create_autospec(spec: Any, spec_set: Any = False, instance: Any = False, _parent: Optional[Any] = ..., _name: Optional[Any] = ..., **kwargs: Any) -> Any: ...
|
||||
|
||||
class _SpecState:
|
||||
spec = ... # type: Any
|
||||
@@ -166,9 +166,9 @@ if sys.version_info >= (3, 3):
|
||||
parent = ... # type: Any
|
||||
instance = ... # type: Any
|
||||
name = ... # type: Any
|
||||
def __init__(self, spec: Any, spec_set: Any = False, parent: Optional[Any] = None, name: Optional[Any] = None, ids: Optional[Any] = None, instance: Any = False) -> None: ...
|
||||
def __init__(self, spec: Any, spec_set: Any = False, parent: Optional[Any] = ..., name: Optional[Any] = ..., ids: Optional[Any] = ..., instance: Any = False) -> None: ...
|
||||
|
||||
def mock_open(mock: Optional[Any] = None, read_data: Any = ...) -> Any: ...
|
||||
def mock_open(mock: Optional[Any] = ..., read_data: Any = ...) -> Any: ...
|
||||
|
||||
class PropertyMock(Mock):
|
||||
def __get__(self, obj: Any, obj_type: Any) -> Any: ...
|
||||
|
||||
@@ -68,7 +68,7 @@ class Request:
|
||||
|
||||
class OpenerDirector:
|
||||
def add_handler(self, handler: BaseHandler) -> None: ...
|
||||
def open(self, url: Union[str, Request], data: Optional[bytes] = None,
|
||||
def open(self, url: Union[str, Request], data: Optional[bytes] = ...,
|
||||
timeout: float = ...) -> _UrlopenRet: ...
|
||||
def error(self, proto: str, *args: Any) -> _UrlopenRet: ...
|
||||
|
||||
@@ -159,7 +159,7 @@ class HTTPHandler(BaseHandler):
|
||||
def http_open(self, req: Request) -> _UrlopenRet: ...
|
||||
|
||||
class HTTPSHandler(BaseHandler):
|
||||
def __init__(self, debuglevel: int = 0,
|
||||
def __init__(self, debuglevel: int = ...,
|
||||
context: Optional[ssl.SSLContext] = ...,
|
||||
check_hostname: bool = ...) -> None: ...
|
||||
def https_open(self, req: Request) -> _UrlopenRet: ...
|
||||
|
||||
Reference in New Issue
Block a user