mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 13:51:30 +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: ...
|
||||
|
||||
6
third_party/2/dateutil/parser.pyi
vendored
6
third_party/2/dateutil/parser.pyi
vendored
@@ -27,13 +27,13 @@ class parserinfo(object):
|
||||
def validate(self, res: datetime) -> bool: ...
|
||||
|
||||
class parser(object):
|
||||
def __init__(self, info: Optional[parserinfo] = None) -> None: ...
|
||||
def __init__(self, info: Optional[parserinfo] = ...) -> None: ...
|
||||
def parse(self, timestr: Union[str, unicode, IO[unicode]],
|
||||
default: Optional[datetime] = None,
|
||||
default: Optional[datetime] = ...,
|
||||
ignoretz: bool = ..., tzinfos: Optional[Dict[Union[str, unicode], tzinfo]] = None,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
DEFAULTPARSER = ... # type: parser
|
||||
def parse(timestr: Union[str, unicode, IO[unicode]],
|
||||
parserinfo: Optional[parserinfo] = None,
|
||||
parserinfo: Optional[parserinfo] = ...,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
@@ -6,7 +6,7 @@ from .descriptor_pool import DescriptorPool
|
||||
|
||||
class MessageFactory:
|
||||
pool = ... # type: Any
|
||||
def __init__(self, pool: Optional[DescriptorPool] = None) -> None: ...
|
||||
def __init__(self, pool: Optional[DescriptorPool] = ...) -> None: ...
|
||||
def GetPrototype(self, descriptor: Descriptor) -> Type[Message]: ...
|
||||
def GetMessages(self, files: Iterable[str]) -> Dict[str, Type[Message]]: ...
|
||||
|
||||
|
||||
4
third_party/2/werkzeug/wrappers.pyi
vendored
4
third_party/2/werkzeug/wrappers.pyi
vendored
@@ -82,8 +82,8 @@ class BaseResponse:
|
||||
headers: Optional[Union[Headers,
|
||||
Mapping[basestring, basestring],
|
||||
Sequence[Tuple[basestring, basestring]]]] = None,
|
||||
mimetype: Optional[basestring] = None,
|
||||
content_type: Optional[basestring] = None,
|
||||
mimetype: Optional[basestring] = ...,
|
||||
content_type: Optional[basestring] = ...,
|
||||
direct_passthrough: Optional[bool] = False) -> None: ...
|
||||
def call_on_close(self, func): ...
|
||||
@classmethod
|
||||
|
||||
2
third_party/2and3/atomicwrites/__init__.pyi
vendored
2
third_party/2and3/atomicwrites/__init__.pyi
vendored
@@ -9,7 +9,7 @@ class AtomicWriter(object):
|
||||
def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool=False) -> None: ...
|
||||
def open(self) -> ContextManager[IO]: ...
|
||||
def _open(self, get_fileobject: Callable) -> ContextManager[IO]: ...
|
||||
def get_fileobject(self, dir: Optional[AnyStr] = None, **kwargs) -> IO: ...
|
||||
def get_fileobject(self, dir: Optional[AnyStr] = ..., **kwargs) -> IO: ...
|
||||
def sync(self, f: IO) -> None: ...
|
||||
def commit(self, f: IO) -> None: ...
|
||||
def rollback(self, f: IO) -> None: ...
|
||||
|
||||
2
third_party/2and3/boto/s3/__init__.pyi
vendored
2
third_party/2and3/boto/s3/__init__.pyi
vendored
@@ -8,7 +8,7 @@ from boto.regioninfo import RegionInfo
|
||||
from typing import List, Type, Text
|
||||
|
||||
class S3RegionInfo(RegionInfo):
|
||||
def connect(self, name: Optional[Text] = None, endpoint: Optional[str] = None, connection_cls: Optional[Type[AWSAuthConnection]] = None, **kw_params) -> S3Connection: ...
|
||||
def connect(self, name: Optional[Text] = ..., endpoint: Optional[str] = ..., connection_cls: Optional[Type[AWSAuthConnection]] = None, **kw_params) -> S3Connection: ...
|
||||
|
||||
def regions() -> List[S3RegionInfo]: ...
|
||||
def connect_to_region(region_name: Text, **kw_params): ...
|
||||
|
||||
18
third_party/2and3/characteristic/__init__.pyi
vendored
18
third_party/2and3/characteristic/__init__.pyi
vendored
@@ -13,10 +13,10 @@ _T = TypeVar('_T')
|
||||
|
||||
def attributes(
|
||||
attrs: Sequence[Union[AnyStr, Attribute]],
|
||||
apply_with_cmp: bool = True,
|
||||
apply_with_init: bool = True,
|
||||
apply_with_repr: bool = True,
|
||||
apply_immutable: bool = False,
|
||||
apply_with_cmp: bool = ...,
|
||||
apply_with_init: bool = ...,
|
||||
apply_with_repr: bool = ...,
|
||||
apply_immutable: bool = ...,
|
||||
store_attributes: Optional[Callable[[type, Attribute], Any]] = None,
|
||||
**kw: Optional[dict]) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
@@ -24,11 +24,11 @@ class Attribute:
|
||||
def __init__(
|
||||
self,
|
||||
name: AnyStr,
|
||||
exclude_from_cmp: bool = False,
|
||||
exclude_from_init: bool = False,
|
||||
exclude_from_repr: bool = False,
|
||||
exclude_from_immutable: bool = False,
|
||||
exclude_from_cmp: bool = ...,
|
||||
exclude_from_init: bool = ...,
|
||||
exclude_from_repr: bool = ...,
|
||||
exclude_from_immutable: bool = ...,
|
||||
default_value: Any = NOTHING,
|
||||
default_factory: Optional[Callable[[None], Any]] = None,
|
||||
instance_of: Optional[Any] = None,
|
||||
instance_of: Optional[Any] = ...,
|
||||
init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = strip_leading_underscores) -> None: ...
|
||||
|
||||
102
third_party/2and3/click/core.pyi
vendored
102
third_party/2and3/click/core.pyi
vendored
@@ -30,7 +30,7 @@ def invoke_param_callback(
|
||||
|
||||
@contextmanager
|
||||
def augment_usage_errors(
|
||||
ctx: 'Context', param: Optional['Parameter'] = None
|
||||
ctx: 'Context', param: Optional['Parameter'] = ...
|
||||
) -> Generator[None, None, None]:
|
||||
...
|
||||
|
||||
@@ -73,25 +73,25 @@ class Context:
|
||||
def __init__(
|
||||
self,
|
||||
command: 'Command',
|
||||
parent: Optional['Context'] = None,
|
||||
info_name: Optional[str] = None,
|
||||
obj: Optional[Any] = None,
|
||||
auto_envvar_prefix: Optional[str] = None,
|
||||
parent: Optional['Context'] = ...,
|
||||
info_name: Optional[str] = ...,
|
||||
obj: Optional[Any] = ...,
|
||||
auto_envvar_prefix: Optional[str] = ...,
|
||||
default_map: Optional[Mapping[str, Any]] = None,
|
||||
terminal_width: Optional[int] = None,
|
||||
max_content_width: Optional[int] = None,
|
||||
resilient_parsing: bool = False,
|
||||
allow_extra_args: Optional[bool] = None,
|
||||
allow_interspersed_args: Optional[bool] = None,
|
||||
ignore_unknown_options: Optional[bool] = None,
|
||||
terminal_width: Optional[int] = ...,
|
||||
max_content_width: Optional[int] = ...,
|
||||
resilient_parsing: bool = ...,
|
||||
allow_extra_args: Optional[bool] = ...,
|
||||
allow_interspersed_args: Optional[bool] = ...,
|
||||
ignore_unknown_options: Optional[bool] = ...,
|
||||
help_option_names: Optional[List[str]] = None,
|
||||
token_normalize_func: Optional[Callable[[str], str]] = None,
|
||||
color: Optional[bool] = None
|
||||
color: Optional[bool] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@contextmanager
|
||||
def scope(self, cleanup: bool = True) -> Generator['Context', None, None]:
|
||||
def scope(self, cleanup: bool = ...) -> Generator['Context', None, None]:
|
||||
...
|
||||
|
||||
def make_formatter(self) -> HelpFormatter:
|
||||
@@ -147,7 +147,7 @@ class BaseCommand:
|
||||
name: str
|
||||
context_settings: Dict
|
||||
|
||||
def __init__(self, name: str, context_settings: Optional[Dict] = None) -> None:
|
||||
def __init__(self, name: str, context_settings: Optional[Dict] = ...) -> None:
|
||||
...
|
||||
|
||||
def get_usage(self, ctx: Context) -> str:
|
||||
@@ -157,7 +157,7 @@ class BaseCommand:
|
||||
...
|
||||
|
||||
def make_context(
|
||||
self, info_name: str, args: List[str], parent: Optional[Context] = None, **extra
|
||||
self, info_name: str, args: List[str], parent: Optional[Context] = ..., **extra
|
||||
) -> Context:
|
||||
...
|
||||
|
||||
@@ -170,9 +170,9 @@ class BaseCommand:
|
||||
def main(
|
||||
self,
|
||||
args: Optional[List[str]] = None,
|
||||
prog_name: Optional[str] = None,
|
||||
complete_var: Optional[str] = None,
|
||||
standalone_mode: bool = True,
|
||||
prog_name: Optional[str] = ...,
|
||||
complete_var: Optional[str] = ...,
|
||||
standalone_mode: bool = ...,
|
||||
**extra
|
||||
) -> Any:
|
||||
...
|
||||
@@ -193,14 +193,14 @@ class Command(BaseCommand):
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
context_settings: Optional[Dict] = None,
|
||||
callback: Optional[Callable] = None,
|
||||
context_settings: Optional[Dict] = ...,
|
||||
callback: Optional[Callable] = ...,
|
||||
params: Optional[List['Parameter']] = None,
|
||||
help: Optional[str] = None,
|
||||
epilog: Optional[str] = None,
|
||||
short_help: Optional[str] = None,
|
||||
options_metavar: str = '[OPTIONS]',
|
||||
add_help_option: bool = True
|
||||
help: Optional[str] = ...,
|
||||
epilog: Optional[str] = ...,
|
||||
short_help: Optional[str] = ...,
|
||||
options_metavar: str = ...,
|
||||
add_help_option: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -252,18 +252,18 @@ class MultiCommand(Command):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str] = None,
|
||||
invoke_without_command: bool = False,
|
||||
no_args_is_help: Optional[bool] = None,
|
||||
subcommand_metavar: Optional[str] = None,
|
||||
chain: bool = False,
|
||||
result_callback: Optional[Callable] = None,
|
||||
name: Optional[str] = ...,
|
||||
invoke_without_command: bool = ...,
|
||||
no_args_is_help: Optional[bool] = ...,
|
||||
subcommand_metavar: Optional[str] = ...,
|
||||
chain: bool = ...,
|
||||
result_callback: Optional[Callable] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def resultcallback(
|
||||
self, replace: bool = False
|
||||
self, replace: bool = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -286,11 +286,11 @@ class Group(MultiCommand):
|
||||
commands: Dict[str, Command]
|
||||
|
||||
def __init__(
|
||||
self, name: Optional[str] = None, commands: Optional[Dict[str, Command]] = None, **attrs
|
||||
self, name: Optional[str] = ..., commands: Optional[Dict[str, Command]] = None, **attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def add_command(self, cmd: Command, name: Optional[str] = None):
|
||||
def add_command(self, cmd: Command, name: Optional[str] = ...):
|
||||
...
|
||||
|
||||
def command(self, *args, **kwargs) -> _Decorator:
|
||||
@@ -304,7 +304,7 @@ class CommandCollection(MultiCommand):
|
||||
sources: List[MultiCommand]
|
||||
|
||||
def __init__(
|
||||
self, name: Optional[str] = None, sources: Optional[List[MultiCommand]] = None, **attrs
|
||||
self, name: Optional[str] = ..., sources: Optional[List[MultiCommand]] = None, **attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -334,13 +334,13 @@ class Parameter:
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
type: Optional[Union[type, 'ParamType']] = None,
|
||||
required: bool = False,
|
||||
default: Optional[Any] = None,
|
||||
required: bool = ...,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[Callable[[Context, 'Parameter', str], Any]] = None,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> None:
|
||||
...
|
||||
@@ -403,17 +403,17 @@ class Option(Parameter):
|
||||
def __init__(
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, str] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: Optional[bool] = None,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, 'ParamType']] = None,
|
||||
help: Optional[str] = None,
|
||||
help: Optional[str] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
...
|
||||
@@ -426,7 +426,7 @@ class Argument(Parameter):
|
||||
def __init__(
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
required: Optional[bool] = None,
|
||||
required: Optional[bool] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
192
third_party/2and3/click/decorators.pyi
vendored
192
third_party/2and3/click/decorators.pyi
vendored
@@ -21,7 +21,7 @@ def pass_obj(_T) -> _T:
|
||||
|
||||
|
||||
def make_pass_decorator(
|
||||
object_type: type, ensure: bool = False
|
||||
object_type: type, ensure: bool = ...
|
||||
) -> Callable[[_T], _T]:
|
||||
...
|
||||
|
||||
@@ -30,15 +30,15 @@ def make_pass_decorator(
|
||||
# arguments from core.pyi to help with type checking.
|
||||
|
||||
def command(
|
||||
name: Optional[str] = None,
|
||||
name: Optional[str] = ...,
|
||||
cls: type = Command,
|
||||
# Command
|
||||
context_settings: Optional[Dict] = ...,
|
||||
help: Optional[str] = None,
|
||||
epilog: Optional[str] = None,
|
||||
short_help: Optional[str] = None,
|
||||
options_metavar: str = '[OPTIONS]',
|
||||
add_help_option: bool = True,
|
||||
help: Optional[str] = ...,
|
||||
epilog: Optional[str] = ...,
|
||||
short_help: Optional[str] = ...,
|
||||
options_metavar: str = ...,
|
||||
add_help_option: bool = ...,
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -46,22 +46,22 @@ def command(
|
||||
# This inherits attrs from Group, MultiCommand and Command.
|
||||
|
||||
def group(
|
||||
name: Optional[str] = None,
|
||||
name: Optional[str] = ...,
|
||||
cls: type = Group,
|
||||
# Group
|
||||
commands: Optional[Dict[str, Command]] = None,
|
||||
# MultiCommand
|
||||
invoke_without_command: bool = False,
|
||||
no_args_is_help: Optional[bool] = None,
|
||||
subcommand_metavar: Optional[str] = None,
|
||||
chain: bool = False,
|
||||
result_callback: Optional[Callable] = None,
|
||||
invoke_without_command: bool = ...,
|
||||
no_args_is_help: Optional[bool] = ...,
|
||||
subcommand_metavar: Optional[str] = ...,
|
||||
chain: bool = ...,
|
||||
result_callback: Optional[Callable] = ...,
|
||||
# Command
|
||||
help: Optional[str] = None,
|
||||
epilog: Optional[str] = None,
|
||||
short_help: Optional[str] = None,
|
||||
options_metavar: str = '[OPTIONS]',
|
||||
add_help_option: bool = True,
|
||||
help: Optional[str] = ...,
|
||||
epilog: Optional[str] = ...,
|
||||
short_help: Optional[str] = ...,
|
||||
options_metavar: str = ...,
|
||||
add_help_option: bool = ...,
|
||||
# User-defined
|
||||
**kwargs: Any,
|
||||
) -> _Decorator:
|
||||
@@ -72,15 +72,15 @@ def argument(
|
||||
*param_decls: str,
|
||||
cls: type = Argument,
|
||||
# Argument
|
||||
required: Optional[bool] = None,
|
||||
required: Optional[bool] = ...,
|
||||
# Parameter
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -90,25 +90,25 @@ def option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: Optional[bool] = None,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: Optional[str] = None,
|
||||
help: Optional[str] = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
required: bool = False,
|
||||
default: Optional[Any] = ...,
|
||||
required: bool = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -119,24 +119,24 @@ def confirmation_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = 'Do you want to continue?',
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: bool = True,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: str = 'Confirm the action without prompting.',
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = False,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -147,24 +147,24 @@ def password_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = True,
|
||||
confirmation_prompt: bool = True,
|
||||
hide_input: bool = True,
|
||||
is_flag: Optional[bool] = None,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: Optional[str] = None,
|
||||
help: Optional[str] = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = True,
|
||||
is_eager: bool = False,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -176,25 +176,25 @@ def version_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
prog_name: Optional[str] = None,
|
||||
show_default: bool = False,
|
||||
prog_name: Optional[str] = ...,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: bool = True,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: str = 'Show the version and exit.',
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = False,
|
||||
is_eager: bool = True,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
@@ -205,24 +205,24 @@ def help_option(
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = False,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
confirmation_prompt: bool = False,
|
||||
hide_input: bool = False,
|
||||
is_flag: bool = True,
|
||||
flag_value: Optional[Any] = None,
|
||||
multiple: bool = False,
|
||||
count: bool = False,
|
||||
allow_from_autoenv: bool = True,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
flag_value: Optional[Any] = ...,
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
help: str = 'Show this message and exit.',
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = None,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = None,
|
||||
metavar: Optional[str] = None,
|
||||
expose_value: bool = False,
|
||||
is_eager: bool = True,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
30
third_party/2and3/click/exceptions.pyi
vendored
30
third_party/2and3/click/exceptions.pyi
vendored
@@ -20,10 +20,10 @@ class ClickException(Exception):
|
||||
class UsageError(ClickException):
|
||||
ctx: Optional[Context]
|
||||
|
||||
def __init__(self, message: str, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
def show(self, file: Optional[IO] = None) -> None:
|
||||
def show(self, file: Optional[IO] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ class BadParameter(UsageError):
|
||||
def __init__(
|
||||
self,
|
||||
message: str,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = None,
|
||||
param_hint: Optional[str] = None
|
||||
ctx: Optional[Context] = ...,
|
||||
param: Optional[Parameter] = ...,
|
||||
param_hint: Optional[str] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -46,11 +46,11 @@ class MissingParameter(BadParameter):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
message: Optional[str] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = None,
|
||||
param_hint: Optional[str] = None,
|
||||
param_type: Optional[str] = None
|
||||
message: Optional[str] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
param: Optional[Parameter] = ...,
|
||||
param_hint: Optional[str] = ...,
|
||||
param_type: Optional[str] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -62,20 +62,20 @@ class NoSuchOption(UsageError):
|
||||
def __init__(
|
||||
self,
|
||||
option_name: str,
|
||||
message: Optional[str] = None,
|
||||
message: Optional[str] = ...,
|
||||
possibilities: Optional[List[str]] = None,
|
||||
ctx: Optional[Context] = None
|
||||
ctx: Optional[Context] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
|
||||
class BadOptionUsage(UsageError):
|
||||
def __init__(self, message: str, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
class BadArgumentUsage(UsageError):
|
||||
def __init__(self, message: str, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, message: str, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class FileError(ClickException):
|
||||
ui_filename: str
|
||||
filename: str
|
||||
|
||||
def __init__(self, filename: str, hint: Optional[str] = None) -> None:
|
||||
def __init__(self, filename: str, hint: Optional[str] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
|
||||
22
third_party/2and3/click/formatting.pyi
vendored
22
third_party/2and3/click/formatting.pyi
vendored
@@ -17,10 +17,10 @@ def iter_rows(
|
||||
|
||||
def wrap_text(
|
||||
text: str,
|
||||
width: int = 78,
|
||||
initial_indent: str = '',
|
||||
subsequent_indent: str = '',
|
||||
preserve_paragraphs: bool = False
|
||||
width: int = ...,
|
||||
initial_indent: str = ...,
|
||||
subsequent_indent: str = ...,
|
||||
preserve_paragraphs: bool = ...
|
||||
) -> str:
|
||||
...
|
||||
|
||||
@@ -33,9 +33,9 @@ class HelpFormatter:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
indent_increment: int = 2,
|
||||
width: Optional[int] = None,
|
||||
max_width: Optional[int] = None,
|
||||
indent_increment: int = ...,
|
||||
width: Optional[int] = ...,
|
||||
max_width: Optional[int] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -51,8 +51,8 @@ class HelpFormatter:
|
||||
def write_usage(
|
||||
self,
|
||||
prog: str,
|
||||
args: str = '',
|
||||
prefix: str = 'Usage: ',
|
||||
args: str = ...,
|
||||
prefix: str = ...,
|
||||
):
|
||||
...
|
||||
|
||||
@@ -68,8 +68,8 @@ class HelpFormatter:
|
||||
def write_dl(
|
||||
self,
|
||||
rows: Iterable[Iterable[str]],
|
||||
col_max: int = 30,
|
||||
col_spacing: int = 2,
|
||||
col_max: int = ...,
|
||||
col_spacing: int = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
|
||||
4
third_party/2and3/click/globals.pyi
vendored
4
third_party/2and3/click/globals.pyi
vendored
@@ -2,7 +2,7 @@ from click.core import Context
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def get_current_context(silent: bool = False) -> Context:
|
||||
def get_current_context(silent: bool = ...) -> Context:
|
||||
...
|
||||
|
||||
|
||||
@@ -14,5 +14,5 @@ def pop_context() -> None:
|
||||
...
|
||||
|
||||
|
||||
def resolve_color_default(color: Optional[bool] = None) -> Optional[bool]:
|
||||
def resolve_color_default(color: Optional[bool] = ...) -> Optional[bool]:
|
||||
...
|
||||
|
||||
22
third_party/2and3/click/parser.pyi
vendored
22
third_party/2and3/click/parser.pyi
vendored
@@ -37,10 +37,10 @@ class Option:
|
||||
self,
|
||||
opts: Iterable[str],
|
||||
dest: str,
|
||||
action: Optional[str] = None,
|
||||
nargs: int = 1,
|
||||
const: Optional[Any] = None,
|
||||
obj: Optional[Any] = None
|
||||
action: Optional[str] = ...,
|
||||
nargs: int = ...,
|
||||
const: Optional[Any] = ...,
|
||||
obj: Optional[Any] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -53,7 +53,7 @@ class Argument:
|
||||
nargs: int
|
||||
obj: Any
|
||||
|
||||
def __init__(self, dest: str, nargs: int = 1, obj: Optional[Any] = None) -> None:
|
||||
def __init__(self, dest: str, nargs: int = ..., obj: Optional[Any] = ...) -> None:
|
||||
...
|
||||
|
||||
def process(self, value: Any, state: 'ParsingState') -> None:
|
||||
@@ -79,21 +79,21 @@ class OptionParser:
|
||||
_opt_prefixes: Set[str]
|
||||
_args: List[Argument]
|
||||
|
||||
def __init__(self, ctx: Optional[Context] = None) -> None:
|
||||
def __init__(self, ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
def add_option(
|
||||
self,
|
||||
opts: Iterable[str],
|
||||
dest: str,
|
||||
action: Optional[str] = None,
|
||||
nargs: int = 1,
|
||||
const: Optional[Any] = None,
|
||||
obj: Optional[Any] = None
|
||||
action: Optional[str] = ...,
|
||||
nargs: int = ...,
|
||||
const: Optional[Any] = ...,
|
||||
obj: Optional[Any] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def add_argument(self, dest: str, nargs: int = 1, obj: Optional[Any] = None) -> None:
|
||||
def add_argument(self, dest: str, nargs: int = ..., obj: Optional[Any] = ...) -> None:
|
||||
...
|
||||
|
||||
def parse_args(
|
||||
|
||||
110
third_party/2and3/click/termui.pyi
vendored
110
third_party/2and3/click/termui.pyi
vendored
@@ -19,33 +19,33 @@ def hidden_prompt_func(prompt: str) -> str:
|
||||
def _build_prompt(
|
||||
text: str,
|
||||
suffix: str,
|
||||
show_default: bool = False,
|
||||
default: Optional[str] = None,
|
||||
show_default: bool = ...,
|
||||
default: Optional[str] = ...,
|
||||
) -> str:
|
||||
...
|
||||
|
||||
|
||||
def prompt(
|
||||
text: str,
|
||||
default: Optional[str] = None,
|
||||
hide_input: bool = False,
|
||||
confirmation_prompt: bool = False,
|
||||
type: Optional[Any] = None,
|
||||
default: Optional[str] = ...,
|
||||
hide_input: bool = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
type: Optional[Any] = ...,
|
||||
value_proc: Optional[Callable[[Optional[str]], Any]] = None,
|
||||
prompt_suffix: str = ': ',
|
||||
show_default: bool = True,
|
||||
err: bool = False,
|
||||
prompt_suffix: str = ...,
|
||||
show_default: bool = ...,
|
||||
err: bool = ...,
|
||||
) -> Any:
|
||||
...
|
||||
|
||||
|
||||
def confirm(
|
||||
text: str,
|
||||
default: bool = False,
|
||||
abort: bool = False,
|
||||
prompt_suffix: str = ': ',
|
||||
show_default: bool = True,
|
||||
err: bool = False,
|
||||
default: bool = ...,
|
||||
abort: bool = ...,
|
||||
prompt_suffix: str = ...,
|
||||
show_default: bool = ...,
|
||||
err: bool = ...,
|
||||
) -> bool:
|
||||
...
|
||||
|
||||
@@ -54,7 +54,7 @@ def get_terminal_size() -> Tuple[int, int]:
|
||||
...
|
||||
|
||||
|
||||
def echo_via_pager(text: str, color: Optional[bool] = None) -> None:
|
||||
def echo_via_pager(text: str, color: Optional[bool] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -64,19 +64,19 @@ _T = TypeVar('_T')
|
||||
@contextmanager
|
||||
def progressbar(
|
||||
iterable: Optional[Iterable[_T]] = None,
|
||||
length: Optional[int] = None,
|
||||
label: Optional[str] = None,
|
||||
show_eta: bool = True,
|
||||
show_percent: Optional[bool] = None,
|
||||
show_pos: bool = False,
|
||||
length: Optional[int] = ...,
|
||||
label: Optional[str] = ...,
|
||||
show_eta: bool = ...,
|
||||
show_percent: Optional[bool] = ...,
|
||||
show_pos: bool = ...,
|
||||
item_show_func: Optional[Callable[[_T], str]] = None,
|
||||
fill_char: str = '#',
|
||||
empty_char: str = '-',
|
||||
bar_template: str = '%(label)s [%(bar)s] %(info)s',
|
||||
info_sep: str = ' ',
|
||||
width: int = 36,
|
||||
file: Optional[IO] = None,
|
||||
color: Optional[bool] = None,
|
||||
fill_char: str = ...,
|
||||
empty_char: str = ...,
|
||||
bar_template: str = ...,
|
||||
info_sep: str = ...,
|
||||
width: int = ...,
|
||||
file: Optional[IO] = ...,
|
||||
color: Optional[bool] = ...,
|
||||
) -> Generator[_T, None, None]:
|
||||
...
|
||||
|
||||
@@ -87,14 +87,14 @@ def clear() -> None:
|
||||
|
||||
def style(
|
||||
text: str,
|
||||
fg: Optional[str] = None,
|
||||
bg: Optional[str] = None,
|
||||
bold: Optional[bool] = None,
|
||||
dim: Optional[bool] = None,
|
||||
underline: Optional[bool] = None,
|
||||
blink: Optional[bool] = None,
|
||||
reverse: Optional[bool] = None,
|
||||
reset: bool = True,
|
||||
fg: Optional[str] = ...,
|
||||
bg: Optional[str] = ...,
|
||||
bold: Optional[bool] = ...,
|
||||
dim: Optional[bool] = ...,
|
||||
underline: Optional[bool] = ...,
|
||||
blink: Optional[bool] = ...,
|
||||
reverse: Optional[bool] = ...,
|
||||
reset: bool = ...,
|
||||
):
|
||||
...
|
||||
|
||||
@@ -106,42 +106,42 @@ def unstyle(text: str) -> str:
|
||||
# Styling options copied from style() for nicer type checking.
|
||||
def secho(
|
||||
text: str,
|
||||
file: Optional[IO] = None,
|
||||
file: Optional[IO] = ...,
|
||||
nl: bool =True,
|
||||
err: bool = False,
|
||||
color: Optional[bool] = None,
|
||||
fg: Optional[str] = None,
|
||||
bg: Optional[str] = None,
|
||||
bold: Optional[bool] = None,
|
||||
dim: Optional[bool] = None,
|
||||
underline: Optional[bool] = None,
|
||||
blink: Optional[bool] = None,
|
||||
reverse: Optional[bool] = None,
|
||||
reset: bool = True,
|
||||
err: bool = ...,
|
||||
color: Optional[bool] = ...,
|
||||
fg: Optional[str] = ...,
|
||||
bg: Optional[str] = ...,
|
||||
bold: Optional[bool] = ...,
|
||||
dim: Optional[bool] = ...,
|
||||
underline: Optional[bool] = ...,
|
||||
blink: Optional[bool] = ...,
|
||||
reverse: Optional[bool] = ...,
|
||||
reset: bool = ...,
|
||||
):
|
||||
...
|
||||
|
||||
|
||||
def edit(
|
||||
text: Optional[str] = None,
|
||||
editor: Optional[str] = None,
|
||||
env: Optional[str] = None,
|
||||
require_save: bool = True,
|
||||
extension: str = '.txt',
|
||||
filename: Optional[str] = None,
|
||||
text: Optional[str] = ...,
|
||||
editor: Optional[str] = ...,
|
||||
env: Optional[str] = ...,
|
||||
require_save: bool = ...,
|
||||
extension: str = ...,
|
||||
filename: Optional[str] = ...,
|
||||
) -> str:
|
||||
...
|
||||
|
||||
|
||||
def launch(url: str, wait: bool = False, locate: bool = False) -> int:
|
||||
def launch(url: str, wait: bool = ..., locate: bool = ...) -> int:
|
||||
...
|
||||
|
||||
|
||||
def getchar(echo: bool = False) -> str:
|
||||
def getchar(echo: bool = ...) -> str:
|
||||
...
|
||||
|
||||
|
||||
def pause(
|
||||
info: str ='Press any key to continue ...', err: bool = False
|
||||
info: str ='Press any key to continue ...', err: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
72
third_party/2and3/click/types.pyi
vendored
72
third_party/2and3/click/types.pyi
vendored
@@ -12,8 +12,8 @@ class ParamType:
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> Any:
|
||||
...
|
||||
|
||||
@@ -34,7 +34,7 @@ class ParamType:
|
||||
def split_envvar_value(self, rv: str) -> List[str]:
|
||||
...
|
||||
|
||||
def fail(self, message: str, param: Optional[Parameter] = None, ctx: Optional[Context] = None) -> None:
|
||||
def fail(self, message: str, param: Optional[Parameter] = ..., ctx: Optional[Context] = ...) -> None:
|
||||
...
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ class BoolParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> bool:
|
||||
...
|
||||
|
||||
@@ -70,8 +70,8 @@ class FloatParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> float:
|
||||
...
|
||||
|
||||
@@ -91,19 +91,19 @@ class FloatRange(FloatParamType):
|
||||
class File(ParamType):
|
||||
def __init__(
|
||||
self,
|
||||
mode: str = 'r',
|
||||
encoding: Optional[str] = None,
|
||||
errors: Optional[str] = None,
|
||||
lazy: Optional[bool] = None,
|
||||
atomic: Optional[bool] = None,
|
||||
mode: str = ...,
|
||||
encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ...,
|
||||
lazy: Optional[bool] = ...,
|
||||
atomic: Optional[bool] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> IO:
|
||||
...
|
||||
|
||||
@@ -132,8 +132,8 @@ class FuncParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> _F:
|
||||
...
|
||||
|
||||
@@ -150,8 +150,8 @@ class IntParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> int:
|
||||
...
|
||||
|
||||
@@ -166,7 +166,7 @@ class IntParamType(ParamType):
|
||||
|
||||
class IntRange(IntParamType):
|
||||
def __init__(
|
||||
self, min: Optional[int] = None, max: Optional[int] = None, clamp: bool = False
|
||||
self, min: Optional[int] = ..., max: Optional[int] = ..., clamp: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -177,14 +177,14 @@ _PathType = TypeVar('_PathType', str, bytes)
|
||||
class Path(ParamType):
|
||||
def __init__(
|
||||
self,
|
||||
exists: bool = False,
|
||||
file_okay: bool = True,
|
||||
dir_okay: bool = True,
|
||||
writable: bool = False,
|
||||
readable: bool = True,
|
||||
resolve_path: bool = False,
|
||||
allow_dash: bool = False,
|
||||
path_type: Optional[_PathType] = None,
|
||||
exists: bool = ...,
|
||||
file_okay: bool = ...,
|
||||
dir_okay: bool = ...,
|
||||
writable: bool = ...,
|
||||
readable: bool = ...,
|
||||
resolve_path: bool = ...,
|
||||
allow_dash: bool = ...,
|
||||
path_type: Optional[_PathType] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -194,8 +194,8 @@ class Path(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> _PathType:
|
||||
...
|
||||
|
||||
@@ -211,8 +211,8 @@ class StringParamType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> str:
|
||||
...
|
||||
|
||||
@@ -234,8 +234,8 @@ class Tuple(CompositeParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> Tuple:
|
||||
...
|
||||
|
||||
@@ -256,8 +256,8 @@ class UUIDParameterType(ParamType):
|
||||
def __call__(
|
||||
self,
|
||||
value: Optional[str],
|
||||
param: Optional[Parameter] = None,
|
||||
ctx: Optional[Context] = None,
|
||||
param: Optional[Parameter] = ...,
|
||||
ctx: Optional[Context] = ...,
|
||||
) -> uuid.UUID:
|
||||
...
|
||||
|
||||
@@ -270,7 +270,7 @@ class UUIDParameterType(ParamType):
|
||||
...
|
||||
|
||||
|
||||
def convert_type(ty: Any, default: Optional[Any] = None) -> ParamType:
|
||||
def convert_type(ty: Any, default: Optional[Any] = ...) -> ParamType:
|
||||
...
|
||||
|
||||
# parameter type shortcuts
|
||||
|
||||
36
third_party/2and3/click/utils.pyi
vendored
36
third_party/2and3/click/utils.pyi
vendored
@@ -16,7 +16,7 @@ def make_str(value: Any) -> str:
|
||||
...
|
||||
|
||||
|
||||
def make_default_short_help(help: str, max_length: int = 45):
|
||||
def make_default_short_help(help: str, max_length: int = ...):
|
||||
...
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ class LazyFile:
|
||||
def __init__(
|
||||
self,
|
||||
filename: str,
|
||||
mode: str = 'r',
|
||||
encoding: Optional[str] = None,
|
||||
errors: str = 'strict',
|
||||
atomic: bool = False
|
||||
mode: str = ...,
|
||||
encoding: Optional[str] = ...,
|
||||
errors: str = ...,
|
||||
atomic: bool = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -73,11 +73,11 @@ class KeepOpenFile:
|
||||
|
||||
|
||||
def echo(
|
||||
message: Optional[Union[bytes, Text]] = None,
|
||||
file: Optional[IO] = None,
|
||||
nl: bool = True,
|
||||
err: bool = False,
|
||||
color: Optional[bool] = None,
|
||||
message: Optional[Union[bytes, Text]] = ...,
|
||||
file: Optional[IO] = ...,
|
||||
nl: bool = ...,
|
||||
err: bool = ...,
|
||||
color: Optional[bool] = ...,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -87,18 +87,18 @@ def get_binary_stream(name: str) -> IO[bytes]:
|
||||
|
||||
|
||||
def get_text_stream(
|
||||
name: str, encoding: Optional[str] = None, errors: str = 'strict'
|
||||
name: str, encoding: Optional[str] = ..., errors: str = ...
|
||||
) -> IO[str]:
|
||||
...
|
||||
|
||||
|
||||
def open_file(
|
||||
filename: str,
|
||||
mode: str = 'r',
|
||||
encoding: Optional[str] = None,
|
||||
errors: str = 'strict',
|
||||
lazy: bool = False,
|
||||
atomic: bool = False
|
||||
mode: str = ...,
|
||||
encoding: Optional[str] = ...,
|
||||
errors: str = ...,
|
||||
lazy: bool = ...,
|
||||
atomic: bool = ...
|
||||
) -> Union[IO, LazyFile, KeepOpenFile]:
|
||||
...
|
||||
|
||||
@@ -107,11 +107,11 @@ def get_os_args() -> List[str]:
|
||||
...
|
||||
|
||||
|
||||
def format_filename(filename: str, shorten: bool = False) -> str:
|
||||
def format_filename(filename: str, shorten: bool = ...) -> str:
|
||||
...
|
||||
|
||||
|
||||
def get_app_dir(
|
||||
app_name: str, roaming: bool = True, force_posix: bool = False
|
||||
app_name: str, roaming: bool = ..., force_posix: bool = ...
|
||||
) -> str:
|
||||
...
|
||||
|
||||
12
third_party/2and3/markupsafe/__init__.pyi
vendored
12
third_party/2and3/markupsafe/__init__.pyi
vendored
@@ -16,8 +16,8 @@ class Markup(text_type):
|
||||
def __rmul__(self, num: int) -> Markup: ...
|
||||
def __mod__(self, *args: Any) -> Markup: ...
|
||||
def join(self, seq: Iterable[text_type]): ...
|
||||
def split(self, sep: Optional[text_type] = None, maxsplit: int = -1) -> List[text_type]: ...
|
||||
def rsplit(self, sep: Optional[text_type] = None, maxsplit: int = -1) -> List[text_type]: ...
|
||||
def split(self, sep: Optional[text_type] = ..., maxsplit: int = -1) -> List[text_type]: ...
|
||||
def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = -1) -> List[text_type]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[text_type]: ...
|
||||
def unescape(self) -> Text: ...
|
||||
def striptags(self) -> Text: ...
|
||||
@@ -37,13 +37,13 @@ class Markup(text_type):
|
||||
def replace(self, old: text_type, new: text_type, count: int = -1) -> Markup: ...
|
||||
def ljust(self, width: int, fillchar: text_type = ...) -> Markup: ...
|
||||
def rjust(self, width: int, fillchar: text_type = ...) -> Markup: ...
|
||||
def lstrip(self, chars: Optional[text_type] = None) -> Markup: ...
|
||||
def rstrip(self, chars: Optional[text_type] = None) -> Markup: ...
|
||||
def strip(self, chars: Optional[text_type] = None) -> Markup: ...
|
||||
def lstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
|
||||
def rstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
|
||||
def strip(self, chars: Optional[text_type] = ...) -> Markup: ...
|
||||
def center(self, width: int, fillchar: text_type = ...) -> Markup: ...
|
||||
def zfill(self, width: int) -> Markup: ...
|
||||
def translate(self, table: Union[Mapping[int, Union[int, text_type, None]], Sequence[Union[int, text_type, None]]]) -> Markup: ...
|
||||
def expandtabs(self, tabsize: int = 8) -> Markup: ...
|
||||
def expandtabs(self, tabsize: int = ...) -> Markup: ...
|
||||
|
||||
class EscapeFormatter(string.Formatter):
|
||||
escape = ... # type: Callable[[text_type], Markup]
|
||||
|
||||
2
third_party/2and3/pymysql/cursors.pyi
vendored
2
third_party/2and3/pymysql/cursors.pyi
vendored
@@ -22,7 +22,7 @@ class Cursor:
|
||||
def executemany(self, query: str, args) -> int: ...
|
||||
def callproc(self, procname, args=...): ...
|
||||
def fetchone(self) -> Optional[Gen]: ...
|
||||
def fetchmany(self, size: Optional[int] = None) -> Optional[Gen]: ...
|
||||
def fetchmany(self, size: Optional[int] = ...) -> Optional[Gen]: ...
|
||||
def fetchall(self) -> Optional[Tuple[Gen, ...]]: ...
|
||||
def scroll(self, value, mode=''): ...
|
||||
def __iter__(self): ...
|
||||
|
||||
8
third_party/3/six/__init__.pyi
vendored
8
third_party/3/six/__init__.pyi
vendored
@@ -84,16 +84,16 @@ def byte2int(bs: binary_type) -> int: ...
|
||||
def indexbytes(buf: binary_type, i: int) -> int: ...
|
||||
def iterbytes(buf: binary_type) -> typing.Iterator[int]: ...
|
||||
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = None) -> None: ...
|
||||
def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Iterable[_T], msg: Optional[str] = ...) -> None: ...
|
||||
@overload
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = None) -> Any: ...
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: Optional[str] = ...) -> Any: ...
|
||||
@overload
|
||||
def assertRaisesRegex(self: unittest.TestCase, callable_obj: Callable[..., Any], *args: Any, **kwargs: Any) -> Any: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = None) -> None: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]], msg: Optional[str] = ...) -> None: ...
|
||||
|
||||
exec_ = exec
|
||||
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = None) -> NoReturn: ...
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ...
|
||||
def raise_from(value: BaseException, from_value: Optional[BaseException]) -> NoReturn: ...
|
||||
|
||||
print_ = print
|
||||
|
||||
4
third_party/3/werkzeug/wrappers.pyi
vendored
4
third_party/3/werkzeug/wrappers.pyi
vendored
@@ -81,8 +81,8 @@ class BaseResponse:
|
||||
headers: Optional[Union[Headers,
|
||||
Mapping[str, str],
|
||||
Sequence[Tuple[str, str]]]]=None,
|
||||
mimetype: Optional[str] = None,
|
||||
content_type: Optional[str] = None,
|
||||
mimetype: Optional[str] = ...,
|
||||
content_type: Optional[str] = ...,
|
||||
direct_passthrough: bool=False) -> None: ...
|
||||
def call_on_close(self, func): ...
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user