mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 20:01:29 +08:00
Change more defaults to ... (#1727)
This commit is contained in:
committed by
Matthias Kramm
parent
fd25e534ad
commit
324f1761f4
@@ -513,7 +513,7 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def __init__(self, iterable: Iterable[_T]) -> None: ...
|
||||
def append(self, object: _T) -> None: ...
|
||||
def extend(self, iterable: Iterable[_T]) -> None: ...
|
||||
def pop(self, index: int = -1) -> _T: ...
|
||||
def pop(self, index: int = ...) -> _T: ...
|
||||
def index(self, object: _T, start: int = ..., stop: int = ...) -> int: ...
|
||||
def count(self, object: _T) -> int: ...
|
||||
def insert(self, index: int, object: _T) -> None: ...
|
||||
@@ -670,9 +670,9 @@ class xrange(Sized, Iterable[int], Reversible[int]):
|
||||
def __reversed__(self) -> Iterator[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: ...
|
||||
def __init__(self, fget: Optional[Callable[[Any], Any]] = ...,
|
||||
fset: Optional[Callable[[Any, Any], None]] = ...,
|
||||
fdel: Optional[Callable[[Any], 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: ...
|
||||
@@ -941,12 +941,12 @@ class ResourceWarning(Warning): ...
|
||||
|
||||
def eval(s: Union[str, unicode], globals: Dict[str, Any] = ..., locals: Dict[str, Any] = ...) -> Any: ...
|
||||
def exec(object: str,
|
||||
globals: Optional[Dict[str, Any]] = None,
|
||||
locals: Optional[Dict[str, Any]] = None) -> Any: ... # TODO code object as source
|
||||
globals: Optional[Dict[str, Any]] = ...,
|
||||
locals: Optional[Dict[str, Any]] = ...) -> Any: ... # TODO code object as source
|
||||
|
||||
def cmp(x: Any, y: Any) -> int: ...
|
||||
|
||||
def execfile(filename: str, globals: Optional[Dict[str, Any]] = None, locals: Optional[Dict[str, Any]] = None) -> None: ...
|
||||
def execfile(filename: str, globals: Optional[Dict[str, Any]] = ..., locals: Optional[Dict[str, Any]] = ...) -> None: ...
|
||||
|
||||
class file(BinaryIO):
|
||||
@overload
|
||||
@@ -976,6 +976,6 @@ class file(BinaryIO):
|
||||
def truncate(self, pos: Optional[int] = ...) -> int: ...
|
||||
|
||||
# Very old builtins
|
||||
def apply(func: Callable[..., _T], args: Optional[Sequence[Any]] = None, kwds: Optional[Mapping[str, Any]] = None) -> _T: ...
|
||||
def apply(func: Callable[..., _T], args: Optional[Sequence[Any]] = ..., kwds: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
_N = TypeVar('_N', bool, int, float, complex)
|
||||
def coerce(x: _N, y: _N) -> Tuple[_N, _N]: ...
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
def run(statement: str,
|
||||
globals: Optional[Dict[str, Any]] = None,
|
||||
locals: Optional[Dict[str, Any]] = None) -> None:
|
||||
globals: Optional[Dict[str, Any]] = ...,
|
||||
locals: Optional[Dict[str, Any]] = ...) -> None:
|
||||
...
|
||||
|
||||
def runeval(expression: str,
|
||||
globals: Optional[Dict[str, Any]] = None,
|
||||
locals: Optional[Dict[str, Any]] = None) -> Any:
|
||||
globals: Optional[Dict[str, Any]] = ...,
|
||||
locals: Optional[Dict[str, Any]] = ...) -> Any:
|
||||
...
|
||||
|
||||
def runctx(statement: str,
|
||||
|
||||
@@ -264,14 +264,14 @@ class str(Sequence[str]):
|
||||
def lower(self) -> 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 replace(self, old: str, new: str, count: int = ...) -> 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] = ..., maxsplit: int = -1) -> List[str]: ...
|
||||
def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ...
|
||||
def rstrip(self, chars: Optional[str] = ...) -> str: ...
|
||||
def split(self, sep: Optional[str] = ..., maxsplit: int = -1) -> List[str]: ...
|
||||
def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[str]: ...
|
||||
def startswith(self, prefix: Union[str, Tuple[str, ...]], start: Optional[int] = ...,
|
||||
end: Optional[int] = ...) -> bool: ...
|
||||
@@ -350,7 +350,7 @@ class bytes(ByteString):
|
||||
def lower(self) -> 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: ...
|
||||
def replace(self, old: bytes, new: bytes, count: int = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
@@ -361,9 +361,9 @@ class bytes(ByteString):
|
||||
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] = ..., maxsplit: int = -1) -> List[bytes]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytes]: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[bytes]: ...
|
||||
def startswith(self, prefix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
|
||||
def strip(self, chars: Optional[bytes] = ...) -> bytes: ...
|
||||
@@ -442,7 +442,7 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
def lower(self) -> 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: ...
|
||||
def replace(self, old: bytes, new: bytes, count: int = ...) -> bytearray: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
|
||||
else:
|
||||
@@ -453,9 +453,9 @@ class bytearray(MutableSequence[int], ByteString):
|
||||
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] = ..., maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ...
|
||||
def rstrip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = -1) -> List[bytearray]: ...
|
||||
def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
|
||||
def startswith(self, prefix: bytes) -> bool: ...
|
||||
def strip(self, chars: Optional[bytes] = ...) -> bytearray: ...
|
||||
@@ -587,13 +587,13 @@ class list(MutableSequence[_T], Generic[_T]):
|
||||
def copy(self) -> List[_T]: ...
|
||||
def append(self, object: _T) -> None: ...
|
||||
def extend(self, iterable: Iterable[_T]) -> None: ...
|
||||
def pop(self, index: int = -1) -> _T: ...
|
||||
def pop(self, index: int = ...) -> _T: ...
|
||||
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: ...
|
||||
def reverse(self) -> None: ...
|
||||
def sort(self, *, key: Optional[Callable[[_T], Any]] = None, reverse: bool = ...) -> None: ...
|
||||
def sort(self, *, key: Optional[Callable[[_T], Any]] = ..., reverse: bool = ...) -> None: ...
|
||||
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[_T]: ...
|
||||
@@ -744,9 +744,9 @@ class range(Sequence[int]):
|
||||
def __reversed__(self) -> Iterator[int]: ...
|
||||
|
||||
class property:
|
||||
def __init__(self, fget: Optional[Callable[[Any], Any]] = None,
|
||||
fset: Optional[Callable[[Any, Any], None]] = None,
|
||||
fdel: Optional[Callable[[Any], None]] = None,
|
||||
def __init__(self, fget: Optional[Callable[[Any], Any]] = ...,
|
||||
fset: Optional[Callable[[Any, Any], None]] = ...,
|
||||
fdel: Optional[Callable[[Any], None]] = ...,
|
||||
doc: Optional[str] = ...) -> None: ...
|
||||
def getter(self, fget: Callable[[Any], Any]) -> property: ...
|
||||
def setter(self, fset: Callable[[Any, Any], None]) -> property: ...
|
||||
@@ -774,8 +774,8 @@ def delattr(o: Any, name: str) -> None: ...
|
||||
def dir(o: object = ...) -> List[str]: ...
|
||||
_N = TypeVar('_N', int, float)
|
||||
def divmod(a: _N, b: _N) -> Tuple[_N, _N]: ...
|
||||
def eval(source: Union[str, bytes, CodeType], globals: Optional[Dict[str, Any]] = None, locals: Optional[Mapping[str, Any]] = None) -> Any: ...
|
||||
def exec(object: Union[str, bytes, CodeType], globals: Optional[Dict[str, Any]] = None, locals: Optional[Mapping[str, Any]] = None) -> Any: ...
|
||||
def eval(source: Union[str, bytes, CodeType], globals: Optional[Dict[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ...) -> Any: ...
|
||||
def exec(object: Union[str, bytes, CodeType], globals: Optional[Dict[str, Any]] = ..., locals: Optional[Mapping[str, Any]] = ...) -> Any: ...
|
||||
def exit(code: Any = ...) -> NoReturn: ...
|
||||
@overload
|
||||
def filter(function: Optional[Callable[[_T], Any]],
|
||||
@@ -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 = ..., buffering: int = -1, encoding: Optional[str] = ...,
|
||||
def open(file: Union[str, bytes, int, _PathLike], mode: str = ..., buffering: int = ..., encoding: Optional[str] = ...,
|
||||
errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ...) -> IO[Any]: ...
|
||||
else:
|
||||
def open(file: Union[str, bytes, int], mode: str = ..., buffering: int = -1, encoding: Optional[str] = ...,
|
||||
def open(file: Union[str, bytes, int], mode: str = ..., buffering: int = ..., 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 = ...) -> None: ...
|
||||
def print(*values: Any, sep: str = ..., end: str = ..., file: Optional[IO[str]] = ..., flush: bool = ...) -> None: ...
|
||||
@overload
|
||||
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y
|
||||
@overload
|
||||
@@ -859,7 +859,7 @@ def round(number: SupportsRound[_T]) -> _T: ...
|
||||
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,
|
||||
key: Optional[Callable[[_T], Any]] = ...,
|
||||
reverse: bool = ...) -> List[_T]: ...
|
||||
@overload
|
||||
def sum(iterable: Iterable[_T]) -> Union[_T, int]: ...
|
||||
@@ -886,7 +886,7 @@ def zip(iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any],
|
||||
iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any],
|
||||
*iterables: Iterable[Any]) -> Iterator[Tuple[Any, ...]]: ...
|
||||
def __import__(name: str, globals: Dict[str, Any] = ..., locals: Dict[str, Any] = ...,
|
||||
fromlist: List[str] = ..., level: int = -1) -> Any: ...
|
||||
fromlist: List[str] = ..., level: int = ...) -> Any: ...
|
||||
|
||||
# Ellipsis
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ class ConfigParser(RawConfigParser):
|
||||
allow_no_value: bool = ...,
|
||||
delimiters: Sequence[str] = ...,
|
||||
comment_prefixes: Sequence[str] = ...,
|
||||
inline_comment_prefixes: Optional[Sequence[str]] = None,
|
||||
inline_comment_prefixes: Optional[Sequence[str]] = ...,
|
||||
strict: bool = ...,
|
||||
empty_lines_in_values: bool = ...,
|
||||
default_section: str = ...,
|
||||
|
||||
@@ -195,7 +195,7 @@ class datetime:
|
||||
def timetz(self) -> _time: ...
|
||||
def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ...,
|
||||
minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo:
|
||||
Optional[_tzinfo] = None) -> datetime: ...
|
||||
Optional[_tzinfo] = ...) -> datetime: ...
|
||||
def astimezone(self, tz: Optional[_tzinfo] = ...) -> datetime: ...
|
||||
def ctime(self) -> str: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
|
||||
@@ -4,8 +4,8 @@ import sys
|
||||
import types
|
||||
from typing import Any, Mapping, Optional, Sequence
|
||||
|
||||
def __import__(name: str, globals: Optional[Mapping[str, Any]] = None,
|
||||
locals: Optional[Mapping[str, Any]] = None,
|
||||
def __import__(name: str, globals: Optional[Mapping[str, Any]] = ...,
|
||||
locals: Optional[Mapping[str, Any]] = ...,
|
||||
fromlist: Sequence[str] = ...,
|
||||
level: int = ...) -> types.ModuleType: ...
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class Finder(metaclass=ABCMeta):
|
||||
# easier to simply ignore that this method exists.
|
||||
# @abstractmethod
|
||||
# def find_module(self, fullname: str,
|
||||
# path: Optional[Sequence[_Path]] = None) -> Optional[Loader]: ...
|
||||
# path: Optional[Sequence[_Path]] = ...) -> Optional[Loader]: ...
|
||||
|
||||
class ResourceLoader(Loader):
|
||||
@abstractmethod
|
||||
|
||||
@@ -35,7 +35,7 @@ if sys.version_info >= (3, 4):
|
||||
def spec_from_file_location(
|
||||
name: str, location: str, *,
|
||||
loader: Optional[importlib.abc.Loader] = ...,
|
||||
submodule_search_locations: Optional[List[str]] = None
|
||||
submodule_search_locations: Optional[List[str]] = ...
|
||||
) -> importlib.machinery.ModuleSpec: ...
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
|
||||
@@ -18,11 +18,11 @@ class JSONDecoder:
|
||||
strict = ... # type: bool
|
||||
object_pairs_hook = ... # type: Callable[[List[Tuple[str, Any]]], Any]
|
||||
|
||||
def __init__(self, object_hook: Optional[Callable[[Dict[str, Any]], Any]] = None,
|
||||
parse_float: Optional[Callable[[str], Any]] = None,
|
||||
parse_int: Optional[Callable[[str], Any]] = None,
|
||||
parse_constant: Optional[Callable[[str], Any]] = None,
|
||||
def __init__(self, object_hook: Optional[Callable[[Dict[str, Any]], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
strict: bool = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = None) -> None: ...
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[str, Any]]], Any]] = ...) -> None: ...
|
||||
def decode(self, s: str) -> Any: ...
|
||||
def raw_decode(self, s: str, idx: int = ...) -> Tuple[Any, int]: ...
|
||||
|
||||
@@ -13,7 +13,7 @@ class JSONEncoder:
|
||||
|
||||
def __init__(self, skipkeys: bool = ..., ensure_ascii: bool = ...,
|
||||
check_circular: bool = ..., allow_nan: bool = ..., sort_keys: bool = ...,
|
||||
indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = ...) -> None: ...
|
||||
indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = ..., default: Optional[Callable] = ...) -> None: ...
|
||||
|
||||
def default(self, o: Any) -> Any: ...
|
||||
def encode(self, o: Any) -> str: ...
|
||||
|
||||
@@ -29,8 +29,8 @@ class Pool(ContextManager[Pool]):
|
||||
func: Callable[..., Any],
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Dict[str, Any] = ...,
|
||||
callback: Optional[Callable[..., None]] = None,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = None) -> AsyncResult: ...
|
||||
callback: Optional[Callable[..., None]] = ...,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult: ...
|
||||
def map(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
@@ -38,8 +38,8 @@ class Pool(ContextManager[Pool]):
|
||||
def map_async(self, func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
chunksize: Optional[int] = ...,
|
||||
callback: Optional[Callable[..., None]] = None,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = None) -> AsyncResult: ...
|
||||
callback: Optional[Callable[..., None]] = ...,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult: ...
|
||||
def imap(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
@@ -56,8 +56,8 @@ class Pool(ContextManager[Pool]):
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Iterable[Any]] = ...,
|
||||
chunksize: Optional[int] = ...,
|
||||
callback: Optional[Callable[..., None]] = None,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = None) -> AsyncResult: ...
|
||||
callback: Optional[Callable[..., None]] = ...,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult: ...
|
||||
def close(self) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
def join(self) -> None: ...
|
||||
@@ -67,5 +67,5 @@ class Pool(ContextManager[Pool]):
|
||||
class ThreadPool(Pool, ContextManager[ThreadPool]):
|
||||
|
||||
def __init__(self, processes: Optional[int] = ...,
|
||||
initializer: Optional[Callable[..., Any]] = None,
|
||||
initializer: Optional[Callable[..., Any]] = ...,
|
||||
initargs: Iterable[Any] = ...) -> None: ...
|
||||
|
||||
2
third_party/2/dateutil/parser.pyi
vendored
2
third_party/2/dateutil/parser.pyi
vendored
@@ -30,7 +30,7 @@ class parser(object):
|
||||
def __init__(self, info: Optional[parserinfo] = ...) -> None: ...
|
||||
def parse(self, timestr: Union[str, unicode, IO[unicode]],
|
||||
default: Optional[datetime] = ...,
|
||||
ignoretz: bool = ..., tzinfos: Optional[Dict[Union[str, unicode], tzinfo]] = None,
|
||||
ignoretz: bool = ..., tzinfos: Optional[Dict[Union[str, unicode], tzinfo]] = ...,
|
||||
**kwargs: Any) -> datetime: ...
|
||||
|
||||
DEFAULTPARSER = ... # type: parser
|
||||
|
||||
6
third_party/2/werkzeug/wrappers.pyi
vendored
6
third_party/2/werkzeug/wrappers.pyi
vendored
@@ -77,14 +77,14 @@ class BaseResponse:
|
||||
direct_passthrough = ... # type: bool
|
||||
response = ... # type: Iterable[str]
|
||||
def __init__(self,
|
||||
response: Optional[Union[Iterable[str], str]] = None,
|
||||
status: Optional[Union[basestring, int]] = None,
|
||||
response: Optional[Union[Iterable[str], str]] = ...,
|
||||
status: Optional[Union[basestring, int]] = ...,
|
||||
headers: Optional[Union[Headers,
|
||||
Mapping[basestring, basestring],
|
||||
Sequence[Tuple[basestring, basestring]]]] = None,
|
||||
mimetype: Optional[basestring] = ...,
|
||||
content_type: Optional[basestring] = ...,
|
||||
direct_passthrough: Optional[bool] = False) -> None: ...
|
||||
direct_passthrough: Optional[bool] = ...) -> None: ...
|
||||
def call_on_close(self, func): ...
|
||||
@classmethod
|
||||
def force_type(cls, response, environ=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] = ..., endpoint: Optional[str] = ..., connection_cls: Optional[Type[AWSAuthConnection]] = None, **kw_params) -> S3Connection: ...
|
||||
def connect(self, name: Optional[Text] = ..., endpoint: Optional[str] = ..., connection_cls: Optional[Type[AWSAuthConnection]] = ..., **kw_params) -> S3Connection: ...
|
||||
|
||||
def regions() -> List[S3RegionInfo]: ...
|
||||
def connect_to_region(region_name: Text, **kw_params): ...
|
||||
|
||||
@@ -17,7 +17,7 @@ def attributes(
|
||||
apply_with_init: bool = ...,
|
||||
apply_with_repr: bool = ...,
|
||||
apply_immutable: bool = ...,
|
||||
store_attributes: Optional[Callable[[type, Attribute], Any]] = None,
|
||||
store_attributes: Optional[Callable[[type, Attribute], Any]] = ...,
|
||||
**kw: Optional[dict]) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
class Attribute:
|
||||
@@ -29,6 +29,6 @@ class Attribute:
|
||||
exclude_from_repr: bool = ...,
|
||||
exclude_from_immutable: bool = ...,
|
||||
default_value: Any = NOTHING,
|
||||
default_factory: Optional[Callable[[None], Any]] = None,
|
||||
default_factory: Optional[Callable[[None], Any]] = ...,
|
||||
instance_of: Optional[Any] = ...,
|
||||
init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = strip_leading_underscores) -> None: ...
|
||||
|
||||
30
third_party/2and3/click/core.pyi
vendored
30
third_party/2and3/click/core.pyi
vendored
@@ -77,15 +77,15 @@ class Context:
|
||||
info_name: Optional[str] = ...,
|
||||
obj: Optional[Any] = ...,
|
||||
auto_envvar_prefix: Optional[str] = ...,
|
||||
default_map: Optional[Mapping[str, Any]] = None,
|
||||
default_map: Optional[Mapping[str, Any]] = ...,
|
||||
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,
|
||||
help_option_names: Optional[List[str]] = ...,
|
||||
token_normalize_func: Optional[Callable[[str], str]] = ...,
|
||||
color: Optional[bool] = ...
|
||||
) -> None:
|
||||
...
|
||||
@@ -169,7 +169,7 @@ class BaseCommand:
|
||||
|
||||
def main(
|
||||
self,
|
||||
args: Optional[List[str]] = None,
|
||||
args: Optional[List[str]] = ...,
|
||||
prog_name: Optional[str] = ...,
|
||||
complete_var: Optional[str] = ...,
|
||||
standalone_mode: bool = ...,
|
||||
@@ -195,7 +195,7 @@ class Command(BaseCommand):
|
||||
name: str,
|
||||
context_settings: Optional[Dict] = ...,
|
||||
callback: Optional[Callable] = ...,
|
||||
params: Optional[List['Parameter']] = None,
|
||||
params: Optional[List['Parameter']] = ...,
|
||||
help: Optional[str] = ...,
|
||||
epilog: Optional[str] = ...,
|
||||
short_help: Optional[str] = ...,
|
||||
@@ -286,7 +286,7 @@ class Group(MultiCommand):
|
||||
commands: Dict[str, Command]
|
||||
|
||||
def __init__(
|
||||
self, name: Optional[str] = ..., commands: Optional[Dict[str, Command]] = None, **attrs
|
||||
self, name: Optional[str] = ..., commands: Optional[Dict[str, Command]] = ..., **attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -304,7 +304,7 @@ class CommandCollection(MultiCommand):
|
||||
sources: List[MultiCommand]
|
||||
|
||||
def __init__(
|
||||
self, name: Optional[str] = ..., sources: Optional[List[MultiCommand]] = None, **attrs
|
||||
self, name: Optional[str] = ..., sources: Optional[List[MultiCommand]] = ..., **attrs
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -332,16 +332,16 @@ class Parameter:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
type: Optional[Union[type, 'ParamType']] = None,
|
||||
param_decls: Optional[List[str]] = ...,
|
||||
type: Optional[Union[type, 'ParamType']] = ...,
|
||||
required: bool = ...,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[Callable[[Context, 'Parameter', str], Any]] = None,
|
||||
callback: Optional[Callable[[Context, 'Parameter', str], Any]] = ...,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
envvar: Optional[Union[str, List[str]]] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@@ -402,9 +402,9 @@ class Option(Parameter):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
param_decls: Optional[List[str]] = ...,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, str] = False,
|
||||
prompt: Union[bool, str] = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
@@ -412,7 +412,7 @@ class Option(Parameter):
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, 'ParamType']] = None,
|
||||
type: Optional[Union[type, 'ParamType']] = ...,
|
||||
help: Optional[str] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
@@ -425,7 +425,7 @@ class Option(Parameter):
|
||||
class Argument(Parameter):
|
||||
def __init__(
|
||||
self,
|
||||
param_decls: Optional[List[str]] = None,
|
||||
param_decls: Optional[List[str]] = ...,
|
||||
required: Optional[bool] = ...,
|
||||
**attrs
|
||||
) -> None:
|
||||
|
||||
36
third_party/2and3/click/decorators.pyi
vendored
36
third_party/2and3/click/decorators.pyi
vendored
@@ -49,7 +49,7 @@ def group(
|
||||
name: Optional[str] = ...,
|
||||
cls: type = Group,
|
||||
# Group
|
||||
commands: Optional[Dict[str, Command]] = None,
|
||||
commands: Optional[Dict[str, Command]] = ...,
|
||||
# MultiCommand
|
||||
invoke_without_command: bool = ...,
|
||||
no_args_is_help: Optional[bool] = ...,
|
||||
@@ -74,14 +74,14 @@ def argument(
|
||||
# Argument
|
||||
required: Optional[bool] = ...,
|
||||
# Parameter
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
type: Optional[Union[type, ParamType]] = ...,
|
||||
default: Optional[Any] = ...,
|
||||
callback: Optional[_Callback] = ...,
|
||||
nargs: Optional[int] = ...,
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
envvar: Optional[Union[str, List[str]]] = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -91,7 +91,7 @@ def option(
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
prompt: Union[bool, Text] = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
@@ -99,7 +99,7 @@ def option(
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
type: Optional[Union[type, ParamType]] = ...,
|
||||
help: Optional[str] = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = ...,
|
||||
@@ -109,7 +109,7 @@ def option(
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
envvar: Optional[Union[str, List[str]]] = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -128,7 +128,7 @@ def confirmation_option(
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
type: Optional[Union[type, ParamType]] = ...,
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = ...,
|
||||
@@ -137,7 +137,7 @@ def confirmation_option(
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
envvar: Optional[Union[str, List[str]]] = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -148,7 +148,7 @@ def password_option(
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = True,
|
||||
prompt: Union[bool, Text] = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: Optional[bool] = ...,
|
||||
@@ -156,7 +156,7 @@ def password_option(
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
type: Optional[Union[type, ParamType]] = ...,
|
||||
help: Optional[str] = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = ...,
|
||||
@@ -165,20 +165,20 @@ def password_option(
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
envvar: Optional[Union[str, List[str]]] = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
|
||||
# Defaults copied from the decorator body.
|
||||
def version_option(
|
||||
version: Optional[Union[str, Version]] = None,
|
||||
version: Optional[Union[str, Version]] = ...,
|
||||
*param_decls: str,
|
||||
cls: type = Option,
|
||||
# Option
|
||||
prog_name: Optional[str] = ...,
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
prompt: Union[bool, Text] = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
@@ -186,7 +186,7 @@ def version_option(
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
type: Optional[Union[type, ParamType]] = ...,
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = ...,
|
||||
@@ -195,7 +195,7 @@ def version_option(
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
envvar: Optional[Union[str, List[str]]] = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
@@ -206,7 +206,7 @@ def help_option(
|
||||
cls: type = Option,
|
||||
# Option
|
||||
show_default: bool = ...,
|
||||
prompt: Union[bool, Text] = False,
|
||||
prompt: Union[bool, Text] = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
hide_input: bool = ...,
|
||||
is_flag: bool = ...,
|
||||
@@ -214,7 +214,7 @@ def help_option(
|
||||
multiple: bool = ...,
|
||||
count: bool = ...,
|
||||
allow_from_autoenv: bool = ...,
|
||||
type: Optional[Union[type, ParamType]] = None,
|
||||
type: Optional[Union[type, ParamType]] = ...,
|
||||
help: str = ...,
|
||||
# Parameter
|
||||
default: Optional[Any] = ...,
|
||||
@@ -223,6 +223,6 @@ def help_option(
|
||||
metavar: Optional[str] = ...,
|
||||
expose_value: bool = ...,
|
||||
is_eager: bool = ...,
|
||||
envvar: Optional[Union[str, List[str]]] = None
|
||||
envvar: Optional[Union[str, List[str]]] = ...
|
||||
) -> _Decorator:
|
||||
...
|
||||
|
||||
2
third_party/2and3/click/exceptions.pyi
vendored
2
third_party/2and3/click/exceptions.pyi
vendored
@@ -63,7 +63,7 @@ class NoSuchOption(UsageError):
|
||||
self,
|
||||
option_name: str,
|
||||
message: Optional[str] = ...,
|
||||
possibilities: Optional[List[str]] = None,
|
||||
possibilities: Optional[List[str]] = ...,
|
||||
ctx: Optional[Context] = ...
|
||||
) -> None:
|
||||
...
|
||||
|
||||
6
third_party/2and3/click/termui.pyi
vendored
6
third_party/2and3/click/termui.pyi
vendored
@@ -31,7 +31,7 @@ def prompt(
|
||||
hide_input: bool = ...,
|
||||
confirmation_prompt: bool = ...,
|
||||
type: Optional[Any] = ...,
|
||||
value_proc: Optional[Callable[[Optional[str]], Any]] = None,
|
||||
value_proc: Optional[Callable[[Optional[str]], Any]] = ...,
|
||||
prompt_suffix: str = ...,
|
||||
show_default: bool = ...,
|
||||
err: bool = ...,
|
||||
@@ -63,13 +63,13 @@ _T = TypeVar('_T')
|
||||
|
||||
@contextmanager
|
||||
def progressbar(
|
||||
iterable: Optional[Iterable[_T]] = None,
|
||||
iterable: Optional[Iterable[_T]] = ...,
|
||||
length: Optional[int] = ...,
|
||||
label: Optional[str] = ...,
|
||||
show_eta: bool = ...,
|
||||
show_percent: Optional[bool] = ...,
|
||||
show_pos: bool = ...,
|
||||
item_show_func: Optional[Callable[[_T], str]] = None,
|
||||
item_show_func: Optional[Callable[[_T], str]] = ...,
|
||||
fill_char: str = ...,
|
||||
empty_char: str = ...,
|
||||
bar_template: str = ...,
|
||||
|
||||
6
third_party/2and3/markupsafe/__init__.pyi
vendored
6
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] = ..., maxsplit: int = -1) -> List[text_type]: ...
|
||||
def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = -1) -> List[text_type]: ...
|
||||
def split(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...
|
||||
def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...
|
||||
def splitlines(self, keepends: bool = ...) -> List[text_type]: ...
|
||||
def unescape(self) -> Text: ...
|
||||
def striptags(self) -> Text: ...
|
||||
@@ -34,7 +34,7 @@ class Markup(text_type):
|
||||
def lower(self) -> Markup: ...
|
||||
def upper(self) -> Markup: ...
|
||||
def swapcase(self) -> Markup: ...
|
||||
def replace(self, old: text_type, new: text_type, count: int = -1) -> Markup: ...
|
||||
def replace(self, old: text_type, new: text_type, count: int = ...) -> 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] = ...) -> Markup: ...
|
||||
|
||||
Reference in New Issue
Block a user