mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-11 02:12:29 +08:00
Flake8 fixes (#2549)
* Fix over-indented continuation lines * Fix under-indented continuation lines * Fix whitespace around default operator problems * Limit line lengths * Fix inconsistent files
This commit is contained in:
committed by
Jelle Zijlstra
parent
f362cf47fa
commit
006a79220f
@@ -10,16 +10,13 @@
|
||||
# 4 E741 ambiguous variable name
|
||||
|
||||
# Nice-to-haves ignored for now
|
||||
# 159 E128 continuation line under-indented for visual indent
|
||||
# 34 E127 continuation line over-indented for visual indent
|
||||
# E252 missing whitespace around parameter equals
|
||||
# 2307 E501 line too long
|
||||
|
||||
# Other ignored warnings
|
||||
# W504 line break after binary operator
|
||||
|
||||
[flake8]
|
||||
ignore = F401, F403, F405, F811, E127, E128, E252, E301, E302, E305, E501, E701, E704, E741, B303, W504
|
||||
ignore = F401, F403, F405, F811, E301, E302, E305, E501, E701, E704, E741, B303, W504
|
||||
# We are checking with Python 3 but many of the stubs are Python 2 stubs.
|
||||
# A nice future improvement would be to provide separate .flake8
|
||||
# configurations for Python 2 and Python 3 files.
|
||||
|
||||
@@ -55,14 +55,14 @@ class staticmethod(object): # Special, only valid as a decorator.
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
|
||||
class classmethod(object): # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
|
||||
class type(object):
|
||||
__bases__ = ... # type: Tuple[type, ...]
|
||||
@@ -871,8 +871,7 @@ def open(file: unicode, mode: unicode = ..., buffering: int = ...) -> BinaryIO:
|
||||
def open(file: int, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
|
||||
def ord(c: unicode) -> int: ...
|
||||
# This is only available after from __future__ import print_function.
|
||||
def print(*values: Any, sep: unicode = ..., end: unicode = ...,
|
||||
file: IO[Any] = ...) -> None: ...
|
||||
def print(*values: Any, sep: unicode = ..., end: unicode = ..., file: IO[Any] = ...) -> None: ...
|
||||
@overload
|
||||
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y.
|
||||
@overload
|
||||
@@ -925,12 +924,10 @@ def zip(iter1: Iterable[_T1], iter2: Iterable[_T2],
|
||||
iter3: Iterable[_T3]) -> List[Tuple[_T1, _T2, _T3]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2,
|
||||
_T3, _T4]]: ...
|
||||
iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2, _T3, _T4]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4], iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2,
|
||||
_T3, _T4, _T5]]: ...
|
||||
iter4: Iterable[_T4], iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2, _T3, _T4, _T5]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any],
|
||||
iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any],
|
||||
|
||||
@@ -275,7 +275,7 @@ class SocketType(object):
|
||||
raise error
|
||||
def recvfrom_into(self, buffer: bytearray, nbytes: int = ...,
|
||||
flags: int = ...) -> int: ...
|
||||
def send(self, data: str, flags: int =...) -> int: ...
|
||||
def send(self, data: str, flags: int = ...) -> int: ...
|
||||
def sendall(self, data: str, flags: int = ...) -> None: ...
|
||||
@overload
|
||||
def sendto(self, data: str, address: tuple) -> int: ...
|
||||
|
||||
@@ -55,14 +55,14 @@ class staticmethod(object): # Special, only valid as a decorator.
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
|
||||
class classmethod(object): # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
|
||||
class type(object):
|
||||
__bases__ = ... # type: Tuple[type, ...]
|
||||
@@ -871,8 +871,7 @@ def open(file: unicode, mode: unicode = ..., buffering: int = ...) -> BinaryIO:
|
||||
def open(file: int, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
|
||||
def ord(c: unicode) -> int: ...
|
||||
# This is only available after from __future__ import print_function.
|
||||
def print(*values: Any, sep: unicode = ..., end: unicode = ...,
|
||||
file: IO[Any] = ...) -> None: ...
|
||||
def print(*values: Any, sep: unicode = ..., end: unicode = ..., file: IO[Any] = ...) -> None: ...
|
||||
@overload
|
||||
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y.
|
||||
@overload
|
||||
@@ -925,12 +924,10 @@ def zip(iter1: Iterable[_T1], iter2: Iterable[_T2],
|
||||
iter3: Iterable[_T3]) -> List[Tuple[_T1, _T2, _T3]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2,
|
||||
_T3, _T4]]: ...
|
||||
iter4: Iterable[_T4]) -> List[Tuple[_T1, _T2, _T3, _T4]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4], iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2,
|
||||
_T3, _T4, _T5]]: ...
|
||||
iter4: Iterable[_T4], iter5: Iterable[_T5]) -> List[Tuple[_T1, _T2, _T3, _T4, _T5]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any],
|
||||
iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any],
|
||||
|
||||
+3
-8
@@ -3,15 +3,10 @@ from typing import List, Tuple
|
||||
class GetoptError(Exception):
|
||||
opt = ... # type: str
|
||||
msg = ... # type: str
|
||||
def __init__(self, msg: str, opt: str=...) -> None: ...
|
||||
def __init__(self, msg: str, opt: str = ...) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
error = GetoptError
|
||||
|
||||
def getopt(args: List[str], shortopts: str,
|
||||
longopts: List[str]=...) -> Tuple[List[Tuple[str, str]],
|
||||
List[str]]: ...
|
||||
|
||||
def gnu_getopt(args: List[str], shortopts: str,
|
||||
longopts: List[str]=...) -> Tuple[List[Tuple[str, str]],
|
||||
List[str]]: ...
|
||||
def getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ...
|
||||
def gnu_getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ...
|
||||
|
||||
@@ -28,7 +28,7 @@ class HTTPResponse:
|
||||
chunk_left = ... # type: Any
|
||||
length = ... # type: Any
|
||||
will_close = ... # type: Any
|
||||
def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering: bool=...) -> None: ...
|
||||
def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering: bool = ...) -> None: ...
|
||||
def begin(self): ...
|
||||
def close(self): ...
|
||||
def isclosed(self): ...
|
||||
@@ -56,16 +56,16 @@ class HTTPConnection:
|
||||
def putheader(self, header, *values): ...
|
||||
def endheaders(self, message_body=None): ...
|
||||
def request(self, method, url, body=None, headers=...): ...
|
||||
def getresponse(self, buffering: bool=...): ...
|
||||
def getresponse(self, buffering: bool = ...): ...
|
||||
|
||||
class HTTP:
|
||||
debuglevel = ... # type: Any
|
||||
def __init__(self, host: str=..., port=None, strict=None) -> None: ...
|
||||
def __init__(self, host: str = ..., port=None, strict=None) -> None: ...
|
||||
def connect(self, host=None, port=None): ...
|
||||
def getfile(self): ...
|
||||
file = ... # type: Any
|
||||
headers = ... # type: Any
|
||||
def getreply(self, buffering: bool=...): ...
|
||||
def getreply(self, buffering: bool = ...): ...
|
||||
def close(self): ...
|
||||
|
||||
class HTTPSConnection(HTTPConnection):
|
||||
@@ -79,7 +79,7 @@ class HTTPSConnection(HTTPConnection):
|
||||
class HTTPS(HTTP):
|
||||
key_file = ... # type: Any
|
||||
cert_file = ... # type: Any
|
||||
def __init__(self, host: str=..., port=None, key_file=None, cert_file=None, strict=None, context=None) -> None: ...
|
||||
def __init__(self, host: str = ..., port=None, key_file=None, cert_file=None, strict=None, context=None) -> None: ...
|
||||
|
||||
class HTTPException(Exception): ...
|
||||
class NotConnected(HTTPException): ...
|
||||
|
||||
@@ -94,11 +94,11 @@ def getargs(co: CodeType) -> Arguments: ...
|
||||
def getargspec(func: object) -> ArgSpec: ...
|
||||
def getargvalues(frame: FrameType) -> ArgInfo: ...
|
||||
def formatargspec(args, varargs=..., varkw=..., defaults=...,
|
||||
formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=...,
|
||||
join=...) -> str: ...
|
||||
formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=...,
|
||||
join=...) -> str: ...
|
||||
def formatargvalues(args, varargs=..., varkw=..., defaults=...,
|
||||
formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=...,
|
||||
join=...) -> str: ...
|
||||
formatarg=..., formatvarargs=..., formatvarkw=..., formatvalue=...,
|
||||
join=...) -> str: ...
|
||||
def getmro(cls: type) -> Tuple[type, ...]: ...
|
||||
def getcallargs(func, *args, **kwds) -> Dict[str, Any]: ...
|
||||
|
||||
|
||||
+3
-3
@@ -22,9 +22,9 @@ from _io import UnsupportedOperation as UnsupportedOperation
|
||||
from _io import open as open
|
||||
|
||||
def _OpenWrapper(file: Union[str, unicode, int],
|
||||
mode: unicode = ..., buffering: int = ..., encoding: unicode = ...,
|
||||
errors: unicode = ..., newline: unicode = ...,
|
||||
closefd: bool = ...) -> IO[Any]: ...
|
||||
mode: unicode = ..., buffering: int = ..., encoding: unicode = ...,
|
||||
errors: unicode = ..., newline: unicode = ...,
|
||||
closefd: bool = ...) -> IO[Any]: ...
|
||||
|
||||
SEEK_SET = ... # type: int
|
||||
SEEK_CUR = ... # type: int
|
||||
|
||||
@@ -54,8 +54,8 @@ _T6 = TypeVar('_T6')
|
||||
def imap(func: Callable[[_T1], _S], iter1: Iterable[_T1]) -> Iterator[_S]: ...
|
||||
@overload
|
||||
def imap(func: Callable[[_T1, _T2], _S],
|
||||
iter1: Iterable[_T1],
|
||||
iter2: Iterable[_T2]) -> Iterator[_S]: ...
|
||||
iter1: Iterable[_T1],
|
||||
iter2: Iterable[_T2]) -> Iterator[_S]: ...
|
||||
@overload
|
||||
def imap(func: Callable[[_T1, _T2, _T3], _S],
|
||||
iter1: Iterable[_T1], iter2: Iterable[_T2],
|
||||
|
||||
+56
-60
@@ -7,67 +7,63 @@ class JSONDecodeError(ValueError):
|
||||
def load(self, fp: IO[str]) -> Any: ...
|
||||
|
||||
def dumps(obj: Any,
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Optional[int] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
encoding: str = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> str: ...
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Optional[int] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
encoding: str = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> str: ...
|
||||
|
||||
def dump(obj: Any,
|
||||
fp: Union[IO[str], IO[Text]],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Optional[int] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
encoding: str = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> None: ...
|
||||
fp: Union[IO[str], IO[Text]],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Optional[int] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
encoding: str = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> None: ...
|
||||
|
||||
def loads(s: Union[Text, bytes],
|
||||
encoding: Any = ...,
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
encoding: Any = ...,
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
|
||||
def load(fp: IO[str],
|
||||
encoding: Optional[str] = ...,
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
encoding: Optional[str] = ...,
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
|
||||
class JSONDecoder(object):
|
||||
def __init__(self,
|
||||
encoding: Union[Text, bytes] = ...,
|
||||
object_hook: Callable[..., Any] = ...,
|
||||
parse_float: Callable[[str], float] = ...,
|
||||
parse_int: Callable[[str], int] = ...,
|
||||
parse_constant: Callable[[str], Any] = ...,
|
||||
strict: bool = ...,
|
||||
object_pairs_hook: Callable[..., Any] = ...) -> None: ...
|
||||
|
||||
encoding: Union[Text, bytes] = ...,
|
||||
object_hook: Callable[..., Any] = ...,
|
||||
parse_float: Callable[[str], float] = ...,
|
||||
parse_int: Callable[[str], int] = ...,
|
||||
parse_constant: Callable[[str], Any] = ...,
|
||||
strict: bool = ...,
|
||||
object_pairs_hook: Callable[..., Any] = ...) -> None: ...
|
||||
def decode(self, s: Union[Text, bytes], _w: Any = ...) -> Any: ...
|
||||
|
||||
def raw_decode(self,
|
||||
s: Union[Text, bytes],
|
||||
idx: int = ...) -> Tuple[Any, Any]: ...
|
||||
def raw_decode(self, s: Union[Text, bytes], idx: int = ...) -> Tuple[Any, Any]: ...
|
||||
|
||||
class JSONEncoder(object):
|
||||
item_separator = ... # type: str
|
||||
@@ -80,15 +76,15 @@ class JSONEncoder(object):
|
||||
indent = ... # type: int
|
||||
|
||||
def __init__(self,
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
indent: int = ...,
|
||||
separators: Tuple[Union[Text, bytes], Union[Text, bytes]] = ...,
|
||||
encoding: Union[Text, bytes] = ...,
|
||||
default: Callable[..., Any] = ...) -> None: ...
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
sort_keys: bool = ...,
|
||||
indent: int = ...,
|
||||
separators: Tuple[Union[Text, bytes], Union[Text, bytes]] = ...,
|
||||
encoding: Union[Text, bytes] = ...,
|
||||
default: Callable[..., Any] = ...) -> None: ...
|
||||
|
||||
def default(self, o: Any) -> Any: ...
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ class Pool(ContextManager[Pool]):
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Dict[str, Any] = ...) -> Any: ...
|
||||
def apply_async(self,
|
||||
func: Callable[..., Any],
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Dict[str, Any] = ...,
|
||||
callback: Optional[Callable[..., None]] = ...) -> AsyncResult: ...
|
||||
func: Callable[..., Any],
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Dict[str, Any] = ...,
|
||||
callback: Optional[Callable[..., None]] = ...) -> AsyncResult: ...
|
||||
def map(self,
|
||||
func: Callable[..., Any],
|
||||
iterable: Iterable[Any] = ...,
|
||||
|
||||
+1
-2
@@ -31,8 +31,7 @@ class Random(_random.Random):
|
||||
def sample(self, population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ...
|
||||
def random(self) -> float: ...
|
||||
def uniform(self, a: float, b: float) -> float: ...
|
||||
def triangular(self, low: float = ..., high: float = ...,
|
||||
mode: float = ...) -> float: ...
|
||||
def triangular(self, low: float = ..., high: float = ..., mode: float = ...) -> float: ...
|
||||
def betavariate(self, alpha: float, beta: float) -> float: ...
|
||||
def expovariate(self, lambd: float) -> float: ...
|
||||
def gammavariate(self, alpha: float, beta: float) -> float: ...
|
||||
|
||||
+20
-24
@@ -36,30 +36,26 @@ class TextWrapper(object):
|
||||
def wrap(self, text: AnyStr) -> List[AnyStr]: ...
|
||||
def fill(self, text: AnyStr) -> AnyStr: ...
|
||||
|
||||
def wrap(
|
||||
text: AnyStr,
|
||||
width: int = ...,
|
||||
initial_indent: AnyStr = ...,
|
||||
subsequent_indent: AnyStr = ...,
|
||||
expand_tabs: bool = ...,
|
||||
replace_whitespace: bool = ...,
|
||||
fix_sentence_endings: bool = ...,
|
||||
break_long_words: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
break_on_hyphens: bool = ...) -> List[AnyStr]:
|
||||
...
|
||||
def wrap(text: AnyStr,
|
||||
width: int = ...,
|
||||
initial_indent: AnyStr = ...,
|
||||
subsequent_indent: AnyStr = ...,
|
||||
expand_tabs: bool = ...,
|
||||
replace_whitespace: bool = ...,
|
||||
fix_sentence_endings: bool = ...,
|
||||
break_long_words: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
break_on_hyphens: bool = ...) -> List[AnyStr]: ...
|
||||
|
||||
def fill(
|
||||
text: AnyStr,
|
||||
width: int =...,
|
||||
initial_indent: AnyStr = ...,
|
||||
subsequent_indent: AnyStr = ...,
|
||||
expand_tabs: bool = ...,
|
||||
replace_whitespace: bool = ...,
|
||||
fix_sentence_endings: bool = ...,
|
||||
break_long_words: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
break_on_hyphens: bool = ...) -> AnyStr:
|
||||
...
|
||||
def fill(text: AnyStr,
|
||||
width: int = ...,
|
||||
initial_indent: AnyStr = ...,
|
||||
subsequent_indent: AnyStr = ...,
|
||||
expand_tabs: bool = ...,
|
||||
replace_whitespace: bool = ...,
|
||||
fix_sentence_endings: bool = ...,
|
||||
break_long_words: bool = ...,
|
||||
drop_whitespace: bool = ...,
|
||||
break_on_hyphens: bool = ...) -> AnyStr: ...
|
||||
|
||||
def dedent(text: AnyStr) -> AnyStr: ...
|
||||
|
||||
@@ -41,10 +41,8 @@ class TestResult:
|
||||
def stopTest(self, test: Testable) -> None: ...
|
||||
def startTestRun(self) -> None: ...
|
||||
def stopTestRun(self) -> None: ...
|
||||
def addError(self, test: Testable,
|
||||
err: Tuple[type, Any, Any]) -> None: ... # TODO
|
||||
def addFailure(self, test: Testable,
|
||||
err: Tuple[type, Any, Any]) -> None: ... # TODO
|
||||
def addError(self, test: Testable, err: Tuple[type, Any, Any]) -> None: ... # TODO
|
||||
def addFailure(self, test: Testable, err: Tuple[type, Any, Any]) -> None: ... # TODO
|
||||
def addSuccess(self, test: Testable) -> None: ...
|
||||
def addSkip(self, test: Testable, reason: str) -> None: ...
|
||||
def addExpectedFailure(self, test: Testable, err: str) -> None: ...
|
||||
@@ -201,7 +199,7 @@ class TestLoader:
|
||||
def loadTestsFromName(self, name: str = ...,
|
||||
module: Optional[types.ModuleType] = ...) -> TestSuite: ...
|
||||
def loadTestsFromNames(self, names: List[str] = ...,
|
||||
module: Optional[types.ModuleType] = ...) -> TestSuite: ...
|
||||
module: Optional[types.ModuleType] = ...) -> TestSuite: ...
|
||||
def discover(self, start_dir: str, pattern: str = ...,
|
||||
top_level_dir: Optional[str] = ...) -> TestSuite: ...
|
||||
def getTestCaseNames(self, testCaseClass: Type[TestCase] = ...) -> List[str]: ...
|
||||
|
||||
@@ -31,8 +31,7 @@ if sys.version_info >= (3, 6):
|
||||
else:
|
||||
def b2a_base64(data: _Bytes) -> bytes: ...
|
||||
def a2b_qp(string: _Ascii, header: bool = ...) -> bytes: ...
|
||||
def b2a_qp(data: _Bytes, quotetabs: bool = ..., istext: bool = ...,
|
||||
header: bool = ...) -> bytes: ...
|
||||
def b2a_qp(data: _Bytes, quotetabs: bool = ..., istext: bool = ..., header: bool = ...) -> bytes: ...
|
||||
def a2b_hqx(string: _Ascii) -> bytes: ...
|
||||
def rledecode_hqx(data: _Bytes) -> bytes: ...
|
||||
def rlecode_hqx(data: _Bytes) -> bytes: ...
|
||||
|
||||
@@ -51,7 +51,7 @@ def IS_CHARACTER_JUNK(line: _StrType) -> bool: ...
|
||||
def unified_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrType = ...,
|
||||
tofile: _StrType = ..., fromfiledate: _StrType = ..., tofiledate: _StrType = ...,
|
||||
n: int = ..., lineterm: _StrType = ...) -> Iterator[_StrType]: ...
|
||||
def context_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrType =...,
|
||||
def context_diff(a: Sequence[_StrType], b: Sequence[_StrType], fromfile: _StrType = ...,
|
||||
tofile: _StrType = ..., fromfiledate: _StrType = ..., tofiledate: _StrType = ...,
|
||||
n: int = ..., lineterm: _StrType = ...) -> Iterator[_StrType]: ...
|
||||
def ndiff(a: Sequence[_StrType], b: Sequence[_StrType],
|
||||
|
||||
@@ -173,12 +173,12 @@ class Formatter:
|
||||
|
||||
if sys.version_info >= (3,):
|
||||
def __init__(self, fmt: Optional[str] = ...,
|
||||
datefmt: Optional[str] =...,
|
||||
datefmt: Optional[str] = ...,
|
||||
style: str = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self,
|
||||
fmt: Optional[str] = ...,
|
||||
datefmt: Optional[str] =...) -> None: ...
|
||||
datefmt: Optional[str] = ...) -> None: ...
|
||||
|
||||
def format(self, record: LogRecord) -> str: ...
|
||||
def formatTime(self, record: LogRecord, datefmt: str = ...) -> str: ...
|
||||
|
||||
@@ -129,7 +129,7 @@ class SysLogHandler(Handler):
|
||||
LOG_LOCAL6 = ... # type: int
|
||||
LOG_LOCAL7 = ... # type: int
|
||||
def __init__(self, address: Union[Tuple[str, int], str] = ...,
|
||||
facility: int = ..., socktype: _SocketKind = ...) -> None: ...
|
||||
facility: int = ..., socktype: _SocketKind = ...) -> None: ...
|
||||
def encodePriority(self, facility: Union[int, str],
|
||||
priority: Union[int, str]) -> int: ...
|
||||
def mapPriority(self, levelName: int) -> str: ...
|
||||
@@ -150,14 +150,14 @@ class SMTPHandler(Handler):
|
||||
def __init__(self, mailhost: Union[str, Tuple[str, int]], fromaddr: str,
|
||||
toaddrs: List[str], subject: str,
|
||||
credentials: Optional[Tuple[str, str]] = ...,
|
||||
secure: Union[Tuple[str], Tuple[str, str], None] =...,
|
||||
secure: Union[Tuple[str], Tuple[str, str], None] = ...,
|
||||
timeout: float = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self,
|
||||
mailhost: Union[str, Tuple[str, int]], fromaddr: str,
|
||||
toaddrs: List[str], subject: str,
|
||||
credentials: Optional[Tuple[str, str]] = ...,
|
||||
secure: Union[Tuple[str], Tuple[str, str], None] =...) -> None: ...
|
||||
secure: Union[Tuple[str], Tuple[str, str], None] = ...) -> None: ...
|
||||
def getSubject(self, record: LogRecord) -> str: ...
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ class BufferingHandler(Handler):
|
||||
|
||||
class MemoryHandler(BufferingHandler):
|
||||
def __init__(self, capacity: int, flushLevel: int = ...,
|
||||
target: Optional[Handler] =...) -> None: ...
|
||||
target: Optional[Handler] = ...) -> None: ...
|
||||
def setTarget(self, target: Handler) -> None: ...
|
||||
|
||||
|
||||
|
||||
+11
-10
@@ -180,16 +180,17 @@ class OptionParser(OptionContainer):
|
||||
usage = ... # type: Optional[_Text]
|
||||
values = ... # type: Optional[Values]
|
||||
version = ... # type: _Text
|
||||
def __init__(self, usage: Optional[_Text] = ...,
|
||||
option_list: Iterable[Option] = ...,
|
||||
option_class: Option = ...,
|
||||
version: Optional[_Text] = ...,
|
||||
conflict_handler: _Text = ...,
|
||||
description: Optional[_Text] = ...,
|
||||
formatter: Optional[HelpFormatter] = ...,
|
||||
add_help_option: bool = ...,
|
||||
prog: Optional[_Text] = ...,
|
||||
epilog: Optional[_Text] = ...) -> None: ...
|
||||
def __init__(self,
|
||||
usage: Optional[_Text] = ...,
|
||||
option_list: Iterable[Option] = ...,
|
||||
option_class: Option = ...,
|
||||
version: Optional[_Text] = ...,
|
||||
conflict_handler: _Text = ...,
|
||||
description: Optional[_Text] = ...,
|
||||
formatter: Optional[HelpFormatter] = ...,
|
||||
add_help_option: bool = ...,
|
||||
prog: Optional[_Text] = ...,
|
||||
epilog: Optional[_Text] = ...) -> None: ...
|
||||
def _add_help_option(self) -> None: ...
|
||||
def _add_version_option(self) -> None: ...
|
||||
def _create_option_list(self) -> None: ...
|
||||
|
||||
@@ -28,7 +28,7 @@ if sys.version_info >= (3, 4):
|
||||
def loads(data: bytes, *, fmt: Optional[PlistFormat] = ...,
|
||||
use_builtin_types: bool = ..., dict_type: Type[_D] = ...) -> _D: ...
|
||||
def dump(value: Mapping[str, Any], fp: IO[bytes], *,
|
||||
fmt: PlistFormat =..., sort_keys: bool = ...,
|
||||
fmt: PlistFormat = ..., sort_keys: bool = ...,
|
||||
skipkeys: bool = ...) -> None: ...
|
||||
def dumps(value: Mapping[str, Any], *, fmt: PlistFormat = ...,
|
||||
skipkeys: bool = ..., sort_keys: bool = ...) -> bytes: ...
|
||||
|
||||
@@ -509,11 +509,9 @@ class socket:
|
||||
proto: int
|
||||
|
||||
if sys.version_info < (3,):
|
||||
def __init__(self, family: int = ..., type: int = ...,
|
||||
proto: int = ...) -> None: ...
|
||||
def __init__(self, family: int = ..., type: int = ..., proto: int = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, family: int = ..., type: int = ...,
|
||||
proto: int = ..., fileno: Optional[int] = ...) -> None: ...
|
||||
def __init__(self, family: int = ..., type: int = ..., proto: int = ..., fileno: Optional[int] = ...) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 2):
|
||||
def __enter__(self: _SelfT) -> _SelfT: ...
|
||||
@@ -556,7 +554,7 @@ class socket:
|
||||
def recv_into(self, buffer: _WriteBuffer, nbytes: int,
|
||||
flags: int = ...) -> int: ...
|
||||
def send(self, data: bytes, flags: int = ...) -> int: ...
|
||||
def sendall(self, data: bytes, flags: int =...) -> None:
|
||||
def sendall(self, data: bytes, flags: int = ...) -> None:
|
||||
... # return type: None on success
|
||||
@overload
|
||||
def sendto(self, data: bytes, address: Union[tuple, str]) -> int: ...
|
||||
|
||||
@@ -165,9 +165,7 @@ if sys.version_info < (3,) or sys.version_info >= (3, 4):
|
||||
ALERT_DESCRIPTION_USER_CANCELLED: int
|
||||
|
||||
if sys.version_info < (3,) or sys.version_info >= (3, 4):
|
||||
_PurposeType = NamedTuple('_PurposeType',
|
||||
[('nid', int), ('shortname', str),
|
||||
('longname', str), ('oid', str)])
|
||||
_PurposeType = NamedTuple('_PurposeType', [('nid', int), ('shortname', str), ('longname', str), ('oid', str)])
|
||||
class Purpose:
|
||||
SERVER_AUTH: _PurposeType
|
||||
CLIENT_AUTH: _PurposeType
|
||||
|
||||
@@ -39,15 +39,15 @@ if sys.version_info < (3,):
|
||||
TAR_GZIPPED = ... # type: int
|
||||
|
||||
def open(name: Optional[_Path] = ..., mode: str = ...,
|
||||
fileobj: Optional[IO[bytes]] = ..., bufsize: int = ...,
|
||||
*, format: Optional[int] = ..., tarinfo: Optional[TarInfo] = ...,
|
||||
dereference: Optional[bool] = ...,
|
||||
ignore_zeros: Optional[bool] = ...,
|
||||
encoding: Optional[str] = ..., errors: str = ...,
|
||||
pax_headers: Optional[Mapping[str, str]] = ...,
|
||||
debug: Optional[int] = ...,
|
||||
errorlevel: Optional[int] = ...,
|
||||
compresslevel: Optional[int] = ...) -> TarFile: ...
|
||||
fileobj: Optional[IO[bytes]] = ..., bufsize: int = ...,
|
||||
*, format: Optional[int] = ..., tarinfo: Optional[TarInfo] = ...,
|
||||
dereference: Optional[bool] = ...,
|
||||
ignore_zeros: Optional[bool] = ...,
|
||||
encoding: Optional[str] = ..., errors: str = ...,
|
||||
pax_headers: Optional[Mapping[str, str]] = ...,
|
||||
debug: Optional[int] = ...,
|
||||
errorlevel: Optional[int] = ...,
|
||||
compresslevel: Optional[int] = ...) -> TarFile: ...
|
||||
|
||||
|
||||
class TarFile(Iterable[TarInfo]):
|
||||
|
||||
@@ -12,7 +12,7 @@ default_timer = ... # type: _Timer
|
||||
class Timer:
|
||||
if sys.version_info >= (3, 5):
|
||||
def __init__(self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
globals: Optional[Dict[str, Any]] =...) -> None: ...
|
||||
globals: Optional[Dict[str, Any]] = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...) -> None: ...
|
||||
def print_exc(self, file: Optional[IO[str]] = ...) -> None: ...
|
||||
@@ -23,9 +23,9 @@ class Timer:
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
def timeit(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
number: int = ..., globals: Optional[Dict[str, Any]] =...) -> float: ...
|
||||
number: int = ..., globals: Optional[Dict[str, Any]] = ...) -> float: ...
|
||||
def repeat(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
repeat: int = ..., number: int = ..., globals: Optional[Dict[str, Any]] =...) -> List[float]: ...
|
||||
repeat: int = ..., number: int = ..., globals: Optional[Dict[str, Any]] = ...) -> List[float]: ...
|
||||
else:
|
||||
def timeit(stmt: _stmt = ..., setup: _stmt = ..., timer: _Timer = ...,
|
||||
number: int = ...) -> float: ...
|
||||
|
||||
@@ -10,15 +10,15 @@ _default = TypeVar('_default')
|
||||
def bidirectional(__chr: Text) -> Text: ...
|
||||
def category(__chr: Text) -> Text: ...
|
||||
def combining(__chr: Text) -> int: ...
|
||||
def decimal(__chr: Text, __default: _default=...) -> Union[int, _default]: ...
|
||||
def decimal(__chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def decomposition(__chr: Text) -> Text: ...
|
||||
def digit(__chr: Text, __default: _default=...) -> Union[int, _default]: ...
|
||||
def digit(__chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def east_asian_width(__chr: Text) -> Text: ...
|
||||
def lookup(__name: Union[Text, bytes]) -> Text: ...
|
||||
def mirrored(__chr: Text) -> int: ...
|
||||
def name(__chr: Text, __default: _default=...) -> Union[Text, _default]: ...
|
||||
def name(__chr: Text, __default: _default = ...) -> Union[Text, _default]: ...
|
||||
def normalize(__form: Text, __unistr: Text) -> Text: ...
|
||||
def numeric(__chr: Text, __default: _default=...) -> Union[float, _default]: ...
|
||||
def numeric(__chr: Text, __default: _default = ...) -> Union[float, _default]: ...
|
||||
|
||||
class UCD(object):
|
||||
# The methods below are constructed from the same array in C
|
||||
@@ -27,12 +27,12 @@ class UCD(object):
|
||||
def bidirectional(self, __chr: Text) -> str: ...
|
||||
def category(self, __chr: Text) -> str: ...
|
||||
def combining(self, __chr: Text) -> int: ...
|
||||
def decimal(self, __chr: Text, __default: _default=...) -> Union[int, _default]: ...
|
||||
def decimal(self, __chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def decomposition(self, __chr: Text) -> str: ...
|
||||
def digit(self, __chr: Text, __default: _default=...) -> Union[int, _default]: ...
|
||||
def digit(self, __chr: Text, __default: _default = ...) -> Union[int, _default]: ...
|
||||
def east_asian_width(self, __chr: Text) -> str: ...
|
||||
def lookup(self, __name: Union[Text, bytes]) -> Text: ...
|
||||
def mirrored(self, __chr: Text) -> int: ...
|
||||
def name(self, __chr: Text, __default: _default=...) -> Union[Text, _default]: ...
|
||||
def name(self, __chr: Text, __default: _default = ...) -> Union[Text, _default]: ...
|
||||
def normalize(self, __form: Text, __unistr: Text) -> Text: ...
|
||||
def numeric(self, __chr: Text, __default: _default=...) -> Union[float, _default]: ...
|
||||
def numeric(self, __chr: Text, __default: _default = ...) -> Union[float, _default]: ...
|
||||
|
||||
@@ -22,13 +22,12 @@ def simplefilter(action: str, category: Type[Warning] = ..., lineno: int = ...,
|
||||
def resetwarnings() -> None: ...
|
||||
|
||||
_Record = NamedTuple('_Record',
|
||||
[('message', str),
|
||||
('category', Type[Warning]),
|
||||
('filename', str),
|
||||
('lineno', int),
|
||||
('file', Optional[TextIO]),
|
||||
('line', Optional[str])]
|
||||
)
|
||||
[('message', str),
|
||||
('category', Type[Warning]),
|
||||
('filename', str),
|
||||
('lineno', int),
|
||||
('file', Optional[TextIO]),
|
||||
('line', Optional[str])])
|
||||
|
||||
class catch_warnings:
|
||||
def __init__(self, *, record: bool = ...,
|
||||
|
||||
@@ -9,9 +9,9 @@ XINCLUDE_FALLBACK = ... # type: str
|
||||
|
||||
class FatalIncludeError(SyntaxError): ...
|
||||
|
||||
def default_loader(href: Union[str, bytes, int], parse: str, encoding: Optional[str]=...) -> Union[str, Element]: ...
|
||||
def default_loader(href: Union[str, bytes, int], parse: str, encoding: Optional[str] = ...) -> Union[str, Element]: ...
|
||||
|
||||
# TODO: loader is of type default_loader ie it takes a callable that has the
|
||||
# same signature as default_loader. But default_loader has a keyword argument
|
||||
# Which can't be represented using Callable...
|
||||
def include(elem: Element, loader: Callable[..., Union[str, Element]]=...) -> None: ...
|
||||
def include(elem: Element, loader: Callable[..., Union[str, Element]] = ...) -> None: ...
|
||||
|
||||
@@ -9,7 +9,7 @@ _token = Tuple[str, str]
|
||||
_next = Callable[[], _token]
|
||||
_callback = Callable[[_SelectorContext, List[Element]], Generator[Element, None, None]]
|
||||
|
||||
def xpath_tokenizer(pattern: str, namespaces: Dict[str, str]=...) -> Generator[_token, None, None]: ...
|
||||
def xpath_tokenizer(pattern: str, namespaces: Dict[str, str] = ...) -> Generator[_token, None, None]: ...
|
||||
def get_parent_map(context: _SelectorContext) -> Dict[Element, Element]: ...
|
||||
def prepare_child(next: _next, token: _token) -> _callback: ...
|
||||
def prepare_star(next: _next, token: _token) -> _callback: ...
|
||||
@@ -27,7 +27,7 @@ class _SelectorContext:
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
def iterfind(elem: Element, path: str, namespaces: Dict[str, str]=...) -> List[Element]: ...
|
||||
def find(elem: Element, path: str, namespaces: Dict[str, str]=...) -> Optional[Element]: ...
|
||||
def findall(elem: Element, path: str, namespaces: Dict[str, str]=...) -> List[Element]: ...
|
||||
def findtext(elem: Element, path: str, default: _T=..., namespaces: Dict[str, str]=...) -> Union[_T, str]: ...
|
||||
def iterfind(elem: Element, path: str, namespaces: Dict[str, str] = ...) -> List[Element]: ...
|
||||
def find(elem: Element, path: str, namespaces: Dict[str, str] = ...) -> Optional[Element]: ...
|
||||
def findall(elem: Element, path: str, namespaces: Dict[str, str] = ...) -> List[Element]: ...
|
||||
def findtext(elem: Element, path: str, default: _T = ..., namespaces: Dict[str, str] = ...) -> Union[_T, str]: ...
|
||||
|
||||
@@ -46,24 +46,24 @@ class Element(MutableSequence[Element]):
|
||||
attrib = ... # type: Dict[_str_result_type, _str_result_type]
|
||||
text = ... # type: Optional[_str_result_type]
|
||||
tail = ... # type: Optional[_str_result_type]
|
||||
def __init__(self, tag: Union[_str_argument_type, Callable[..., Element]], attrib: Dict[_str_argument_type, _str_argument_type]=..., **extra: _str_argument_type) -> None: ...
|
||||
def __init__(self, tag: Union[_str_argument_type, Callable[..., Element]], attrib: Dict[_str_argument_type, _str_argument_type] = ..., **extra: _str_argument_type) -> None: ...
|
||||
def append(self, subelement: Element) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def copy(self) -> Element: ...
|
||||
def extend(self, elements: Iterable[Element]) -> None: ...
|
||||
def find(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> Optional[Element]: ...
|
||||
def findall(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> List[Element]: ...
|
||||
def findtext(self, path: _str_argument_type, default: _T=..., namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> Union[_T, _str_result_type]: ...
|
||||
def get(self, key: _str_argument_type, default: _T=...) -> Union[_str_result_type, _T]: ...
|
||||
def find(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> Optional[Element]: ...
|
||||
def findall(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> List[Element]: ...
|
||||
def findtext(self, path: _str_argument_type, default: _T = ..., namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> Union[_T, _str_result_type]: ...
|
||||
def get(self, key: _str_argument_type, default: _T = ...) -> Union[_str_result_type, _T]: ...
|
||||
def getchildren(self) -> List[Element]: ...
|
||||
def getiterator(self, tag: _str_argument_type=...) -> List[Element]: ...
|
||||
def getiterator(self, tag: _str_argument_type = ...) -> List[Element]: ...
|
||||
if sys.version_info >= (3, 2):
|
||||
def insert(self, index: int, subelement: Element) -> None: ...
|
||||
else:
|
||||
def insert(self, index: int, element: Element) -> None: ...
|
||||
def items(self) -> ItemsView[_str_result_type, _str_result_type]: ...
|
||||
def iter(self, tag: _str_argument_type=...) -> Generator[Element, None, None]: ...
|
||||
def iterfind(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> List[Element]: ...
|
||||
def iter(self, tag: _str_argument_type = ...) -> Generator[Element, None, None]: ...
|
||||
def iterfind(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> List[Element]: ...
|
||||
def itertext(self) -> Generator[_str_result_type, None, None]: ...
|
||||
def keys(self) -> KeysView[_str_result_type]: ...
|
||||
def makeelement(self, tag: _str_argument_type, attrib: Dict[_str_argument_type, _str_argument_type]) -> Element: ...
|
||||
@@ -82,60 +82,60 @@ class Element(MutableSequence[Element]):
|
||||
def __setitem__(self, s: slice, o: Iterable[Element]) -> None: ...
|
||||
|
||||
|
||||
def SubElement(parent: Element, tag: _str_argument_type, attrib: Dict[_str_argument_type, _str_argument_type]=..., **extra: _str_argument_type) -> Element: ...
|
||||
def Comment(text: _str_argument_type=...) -> Element: ...
|
||||
def ProcessingInstruction(target: _str_argument_type, text: _str_argument_type=...) -> Element: ...
|
||||
def SubElement(parent: Element, tag: _str_argument_type, attrib: Dict[_str_argument_type, _str_argument_type] = ..., **extra: _str_argument_type) -> Element: ...
|
||||
def Comment(text: _str_argument_type = ...) -> Element: ...
|
||||
def ProcessingInstruction(target: _str_argument_type, text: _str_argument_type = ...) -> Element: ...
|
||||
|
||||
PI = ... # type: Callable[..., Element]
|
||||
|
||||
class QName:
|
||||
text = ... # type: str
|
||||
def __init__(self, text_or_uri: _str_argument_type, tag: _str_argument_type=...) -> None: ...
|
||||
def __init__(self, text_or_uri: _str_argument_type, tag: _str_argument_type = ...) -> None: ...
|
||||
|
||||
|
||||
_file_or_filename = Union[str, bytes, int, IO[Any]]
|
||||
|
||||
class ElementTree:
|
||||
def __init__(self, element: Element=..., file: _file_or_filename=...) -> None: ...
|
||||
def __init__(self, element: Element = ..., file: _file_or_filename = ...) -> None: ...
|
||||
def getroot(self) -> Element: ...
|
||||
def parse(self, source: _file_or_filename, parser: XMLParser=...) -> Element: ...
|
||||
def iter(self, tag: _str_argument_type=...) -> Generator[Element, None, None]: ...
|
||||
def getiterator(self, tag: _str_argument_type=...) -> List[Element]: ...
|
||||
def find(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> Optional[Element]: ...
|
||||
def findtext(self, path: _str_argument_type, default: _T=..., namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> Union[_T, _str_result_type]: ...
|
||||
def findall(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> List[Element]: ...
|
||||
def iterfind(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type]=...) -> List[Element]: ...
|
||||
def parse(self, source: _file_or_filename, parser: XMLParser = ...) -> Element: ...
|
||||
def iter(self, tag: _str_argument_type = ...) -> Generator[Element, None, None]: ...
|
||||
def getiterator(self, tag: _str_argument_type = ...) -> List[Element]: ...
|
||||
def find(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> Optional[Element]: ...
|
||||
def findtext(self, path: _str_argument_type, default: _T = ..., namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> Union[_T, _str_result_type]: ...
|
||||
def findall(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> List[Element]: ...
|
||||
def iterfind(self, path: _str_argument_type, namespaces: Dict[_str_argument_type, _str_argument_type] = ...) -> List[Element]: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
def write(self, file_or_filename: _file_or_filename, encoding: str=..., xml_declaration: Optional[bool]=..., default_namespace: _str_argument_type=..., method: str=..., *, short_empty_elements: bool=...) -> None: ...
|
||||
def write(self, file_or_filename: _file_or_filename, encoding: str = ..., xml_declaration: Optional[bool] = ..., default_namespace: _str_argument_type = ..., method: str = ..., *, short_empty_elements: bool = ...) -> None: ...
|
||||
else:
|
||||
def write(self, file_or_filename: _file_or_filename, encoding: str=..., xml_declaration: Optional[bool]=..., default_namespace: _str_argument_type=..., method: str=...) -> None: ...
|
||||
def write(self, file_or_filename: _file_or_filename, encoding: str = ..., xml_declaration: Optional[bool] = ..., default_namespace: _str_argument_type = ..., method: str = ...) -> None: ...
|
||||
def write_c14n(self, file: _file_or_filename) -> None: ...
|
||||
|
||||
def register_namespace(prefix: _str_argument_type, uri: _str_argument_type) -> None: ...
|
||||
if sys.version_info >= (3, 4):
|
||||
def tostring(element: Element, encoding: str=..., method: str=..., *, short_empty_elements: bool=...) -> _tostring_result_type: ...
|
||||
def tostringlist(element: Element, encoding: str=..., method: str=..., *, short_empty_elements: bool=...) -> List[_tostring_result_type]: ...
|
||||
def tostring(element: Element, encoding: str = ..., method: str = ..., *, short_empty_elements: bool = ...) -> _tostring_result_type: ...
|
||||
def tostringlist(element: Element, encoding: str = ..., method: str = ..., *, short_empty_elements: bool = ...) -> List[_tostring_result_type]: ...
|
||||
else:
|
||||
def tostring(element: Element, encoding: str=..., method: str=...) -> _tostring_result_type: ...
|
||||
def tostringlist(element: Element, encoding: str=..., method: str=...) -> List[_tostring_result_type]: ...
|
||||
def tostring(element: Element, encoding: str = ..., method: str = ...) -> _tostring_result_type: ...
|
||||
def tostringlist(element: Element, encoding: str = ..., method: str = ...) -> List[_tostring_result_type]: ...
|
||||
def dump(elem: Element) -> None: ...
|
||||
def parse(source: _file_or_filename, parser: XMLParser=...) -> ElementTree: ...
|
||||
def iterparse(source: _file_or_filename, events: Sequence[str]=..., parser: XMLParser=...) -> Iterator[Tuple[str, Any]]: ...
|
||||
def parse(source: _file_or_filename, parser: XMLParser = ...) -> ElementTree: ...
|
||||
def iterparse(source: _file_or_filename, events: Sequence[str] = ..., parser: XMLParser = ...) -> Iterator[Tuple[str, Any]]: ...
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
class XMLPullParser:
|
||||
def __init__(self, events: Sequence[str]=..., *, _parser: XMLParser=...) -> None: ...
|
||||
def __init__(self, events: Sequence[str] = ..., *, _parser: XMLParser = ...) -> None: ...
|
||||
def feed(self, data: bytes) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def read_events(self) -> Iterator[Tuple[str, Element]]: ...
|
||||
|
||||
def XML(text: _parser_input_type, parser: XMLParser=...) -> Element: ...
|
||||
def XMLID(text: _parser_input_type, parser: XMLParser=...) -> Tuple[Element, Dict[_str_result_type, Element]]: ...
|
||||
def XML(text: _parser_input_type, parser: XMLParser = ...) -> Element: ...
|
||||
def XMLID(text: _parser_input_type, parser: XMLParser = ...) -> Tuple[Element, Dict[_str_result_type, Element]]: ...
|
||||
|
||||
# This is aliased to XML in the source.
|
||||
fromstring = XML
|
||||
|
||||
def fromstringlist(sequence: Sequence[_parser_input_type], parser: XMLParser=...) -> Element: ...
|
||||
def fromstringlist(sequence: Sequence[_parser_input_type], parser: XMLParser = ...) -> Element: ...
|
||||
|
||||
# This type is both not precise enough and too precise. The TreeBuilder
|
||||
# requires the elementfactory to accept tag and attrs in its args and produce
|
||||
@@ -149,7 +149,7 @@ def fromstringlist(sequence: Sequence[_parser_input_type], parser: XMLParser=...
|
||||
_ElementFactory = Callable[[Any, Dict[Any, Any]], Element]
|
||||
|
||||
class TreeBuilder:
|
||||
def __init__(self, element_factory: _ElementFactory=...) -> None: ...
|
||||
def __init__(self, element_factory: _ElementFactory = ...) -> None: ...
|
||||
def close(self) -> Element: ...
|
||||
def data(self, data: _parser_input_type) -> None: ...
|
||||
def start(self, tag: _parser_input_type, attrs: Dict[_parser_input_type, _parser_input_type]) -> Element: ...
|
||||
@@ -161,7 +161,7 @@ class XMLParser:
|
||||
# TODO-what is entity used for???
|
||||
entity = ... # type: Any
|
||||
version = ... # type: str
|
||||
def __init__(self, html: int=..., target: TreeBuilder=..., encoding: str=...) -> None: ...
|
||||
def __init__(self, html: int = ..., target: TreeBuilder = ..., encoding: str = ...) -> None: ...
|
||||
def doctype(self, name: str, pubid: str, system: str) -> None: ...
|
||||
def close(self) -> Element: ...
|
||||
def feed(self, data: _parser_input_type) -> None: ...
|
||||
|
||||
@@ -10,8 +10,7 @@ def quoteattr(data: Text, entities: Mapping[Text, Text] = ...) -> Text: ...
|
||||
|
||||
class XMLGenerator(handler.ContentHandler):
|
||||
if sys.version_info >= (3, 0):
|
||||
def __init__(self, out=..., encoding=...,
|
||||
short_empty_elements: bool=...) -> None: ...
|
||||
def __init__(self, out=..., encoding=..., short_empty_elements: bool = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, out=..., encoding=...) -> None: ...
|
||||
def startDocument(self): ...
|
||||
|
||||
@@ -22,7 +22,7 @@ def dataclass(_cls: Type[_T]) -> Type[_T]: ...
|
||||
|
||||
@overload
|
||||
def dataclass(*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ...,
|
||||
unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
|
||||
class Field(Generic[_T]):
|
||||
@@ -41,18 +41,18 @@ class Field(Generic[_T]):
|
||||
# to understand the magic that happens at runtime.
|
||||
@overload # `default` and `default_factory` are optional and mutually exclusive.
|
||||
def field(*, default: _T,
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
|
||||
@overload
|
||||
def field(*, default_factory: Callable[[], _T],
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
|
||||
@overload
|
||||
def field(*,
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> Any: ...
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> Any: ...
|
||||
|
||||
|
||||
def fields(class_or_instance: Any) -> Tuple[Field[Any], ...]: ...
|
||||
@@ -64,7 +64,8 @@ class FrozenInstanceError(AttributeError): ...
|
||||
class InitVar(Generic[_T]): ...
|
||||
|
||||
def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *,
|
||||
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ..., frozen: bool = ...): ...
|
||||
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ...,
|
||||
frozen: bool = ...): ...
|
||||
|
||||
def replace(obj: _T, **changes: Any) -> _T: ...
|
||||
|
||||
@@ -22,8 +22,7 @@ _TransProtPair = Tuple[BaseTransport, BaseProtocol]
|
||||
class Handle:
|
||||
_cancelled = False
|
||||
_args = ... # type: List[Any]
|
||||
def __init__(self, callback: Callable[..., Any], args: List[Any],
|
||||
loop: AbstractEventLoop) -> None: ...
|
||||
def __init__(self, callback: Callable[..., Any], args: List[Any], loop: AbstractEventLoop) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def cancel(self) -> None: ...
|
||||
def _run(self) -> None: ...
|
||||
@@ -90,7 +89,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
@abstractmethod
|
||||
@coroutine
|
||||
def run_in_executor(self, executor: Any,
|
||||
func: Callable[..., _T], *args: Any) -> Generator[Any, None, _T]: ...
|
||||
func: Callable[..., _T], *args: Any) -> Generator[Any, None, _T]: ...
|
||||
@abstractmethod
|
||||
def set_default_executor(self, executor: Any) -> None: ...
|
||||
# Network I/O methods returning Futures.
|
||||
@@ -99,7 +98,8 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
# TODO the "Tuple[Any, ...]" should be "Union[Tuple[str, int], Tuple[str, int, int, int]]" but that triggers
|
||||
# https://github.com/python/mypy/issues/2509
|
||||
def getaddrinfo(self, host: Optional[str], port: Union[str, int, None], *,
|
||||
family: int = ..., type: int = ..., proto: int = ..., flags: int = ...) -> Generator[Any, None, List[Tuple[int, int, int, str, Tuple[Any, ...]]]]: ...
|
||||
family: int = ..., type: int = ..., proto: int = ...,
|
||||
flags: int = ...) -> Generator[Any, None, List[Tuple[int, int, int, str, Tuple[Any, ...]]]]: ...
|
||||
@abstractmethod
|
||||
@coroutine
|
||||
def getnameinfo(self, sockaddr: tuple, flags: int = ...) -> Generator[Any, None, Tuple[str, int]]: ...
|
||||
|
||||
@@ -64,9 +64,9 @@ class FlowControlMixin(protocols.Protocol): ...
|
||||
|
||||
class StreamReaderProtocol(FlowControlMixin, protocols.Protocol):
|
||||
def __init__(self,
|
||||
stream_reader: StreamReader,
|
||||
client_connected_cb: _ClientConnectedCallback = ...,
|
||||
loop: Optional[events.AbstractEventLoop] = ...) -> None: ...
|
||||
stream_reader: StreamReader,
|
||||
client_connected_cb: _ClientConnectedCallback = ...,
|
||||
loop: Optional[events.AbstractEventLoop] = ...) -> None: ...
|
||||
def connection_made(self, transport: transports.BaseTransport) -> None: ...
|
||||
def connection_lost(self, exc: Optional[Exception]) -> None: ...
|
||||
def data_received(self, data: bytes) -> None: ...
|
||||
@@ -74,10 +74,10 @@ class StreamReaderProtocol(FlowControlMixin, protocols.Protocol):
|
||||
|
||||
class StreamWriter:
|
||||
def __init__(self,
|
||||
transport: transports.BaseTransport,
|
||||
protocol: protocols.BaseProtocol,
|
||||
reader: StreamReader,
|
||||
loop: events.AbstractEventLoop) -> None: ...
|
||||
transport: transports.BaseTransport,
|
||||
protocol: protocols.BaseProtocol,
|
||||
reader: StreamReader,
|
||||
loop: events.AbstractEventLoop) -> None: ...
|
||||
@property
|
||||
def transport(self) -> transports.BaseTransport: ...
|
||||
def write(self, data: bytes) -> None: ...
|
||||
@@ -91,8 +91,8 @@ class StreamWriter:
|
||||
|
||||
class StreamReader:
|
||||
def __init__(self,
|
||||
limit: int = ...,
|
||||
loop: Optional[events.AbstractEventLoop] = ...) -> None: ...
|
||||
limit: int = ...,
|
||||
loop: Optional[events.AbstractEventLoop] = ...) -> None: ...
|
||||
def exception(self) -> Exception: ...
|
||||
def set_exception(self, exc: Exception) -> None: ...
|
||||
def set_transport(self, transport: transports.BaseTransport) -> None: ...
|
||||
|
||||
@@ -29,9 +29,9 @@ class Process:
|
||||
stderr = ... # type: Optional[streams.StreamReader]
|
||||
pid = ... # type: int
|
||||
def __init__(self,
|
||||
transport: transports.BaseTransport,
|
||||
protocol: protocols.BaseProtocol,
|
||||
loop: events.AbstractEventLoop) -> None: ...
|
||||
transport: transports.BaseTransport,
|
||||
protocol: protocols.BaseProtocol,
|
||||
loop: events.AbstractEventLoop) -> None: ...
|
||||
@property
|
||||
def returncode(self) -> int: ...
|
||||
@coroutine
|
||||
|
||||
@@ -53,8 +53,7 @@ def run_coroutine_threadsafe(coro: _FutureT[_T],
|
||||
loop: AbstractEventLoop) -> concurrent.futures.Future[_T]: ...
|
||||
def shield(arg: _FutureT[_T], *, loop: AbstractEventLoop = ...) -> Future[_T]: ...
|
||||
def sleep(delay: float, result: _T = ..., loop: AbstractEventLoop = ...) -> Future[_T]: ...
|
||||
def wait(fs: Iterable[_FutureT[_T]], *, loop: AbstractEventLoop = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
def wait(fs: Iterable[_FutureT[_T]], *, loop: AbstractEventLoop = ..., timeout: Optional[float] = ...,
|
||||
return_when: str = ...) -> Future[Tuple[Set[Future[_T]], Set[Future[_T]]]]: ...
|
||||
def wait_for(fut: _FutureT[_T], timeout: Optional[float],
|
||||
*, loop: AbstractEventLoop = ...) -> Future[_T]: ...
|
||||
|
||||
@@ -63,7 +63,7 @@ class staticmethod: # Special, only valid as a decorator.
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
|
||||
class classmethod: # Special, only valid as a decorator.
|
||||
__func__ = ... # type: function
|
||||
@@ -71,7 +71,7 @@ class classmethod: # Special, only valid as a decorator.
|
||||
|
||||
def __init__(self, f: function) -> None: ...
|
||||
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]]=...) -> function: ...
|
||||
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> function: ...
|
||||
|
||||
class type:
|
||||
__bases__ = ... # type: Tuple[type, ...]
|
||||
@@ -935,12 +935,10 @@ def zip(iter1: Iterable[_T1], iter2: Iterable[_T2],
|
||||
iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2,
|
||||
_T3, _T4]]: ...
|
||||
iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, _T3, _T4]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3],
|
||||
iter4: Iterable[_T4], iter5: Iterable[_T5]) -> Iterator[Tuple[_T1, _T2,
|
||||
_T3, _T4, _T5]]: ...
|
||||
iter4: Iterable[_T4], iter5: Iterable[_T5]) -> Iterator[Tuple[_T1, _T2, _T3, _T4, _T5]]: ...
|
||||
@overload
|
||||
def zip(iter1: Iterable[Any], iter2: Iterable[Any], iter3: Iterable[Any],
|
||||
iter4: Iterable[Any], iter5: Iterable[Any], iter6: Iterable[Any],
|
||||
|
||||
@@ -42,7 +42,8 @@ class Future(Generic[_T]):
|
||||
class Executor:
|
||||
def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...) -> Iterator[_T]: ...
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...,
|
||||
chunksize: int = ...) -> Iterator[_T]: ...
|
||||
else:
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...,) -> Iterator[_T]: ...
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
@@ -51,4 +52,5 @@ class Executor:
|
||||
|
||||
def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ...
|
||||
|
||||
def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future[_T]], Set[Future[_T]]]: ...
|
||||
def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future[_T]],
|
||||
Set[Future[_T]]]: ...
|
||||
|
||||
@@ -5,7 +5,7 @@ def rectangle(win: _CursesWindow, uly: int, ulx: int, lry: int, lrx: int) -> Non
|
||||
|
||||
class Textbox:
|
||||
stripspaces: bool
|
||||
def __init__(self, w: _CursesWindow, insert_mode: bool= ...) -> None: ...
|
||||
def __init__(self, w: _CursesWindow, insert_mode: bool = ...) -> None: ...
|
||||
def edit(self, validate: Callable[[int], int]) -> str: ...
|
||||
def do_command(self, ch: Union[str, int]) -> None: ...
|
||||
def gather(self) -> str: ...
|
||||
|
||||
@@ -5,15 +5,10 @@ import sys
|
||||
from email.message import Message
|
||||
from email.policy import Policy
|
||||
|
||||
def message_from_string(s: str, _class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> Message: ...
|
||||
def message_from_bytes(s: bytes, _class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> Message: ...
|
||||
def message_from_file(fp: IO[str], _class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> Message: ...
|
||||
def message_from_binary_file(fp: IO[bytes],
|
||||
_class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> Message: ...
|
||||
def message_from_string(s: str, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
def message_from_bytes(s: bytes, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
def message_from_file(fp: IO[str], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
def message_from_binary_file(fp: IO[bytes], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
|
||||
# Names in __all__ with no definition:
|
||||
# base64mime
|
||||
|
||||
@@ -11,7 +11,7 @@ class Generator:
|
||||
maxheaderlen: int = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def flatten(self, msg: Message, unixfrom: bool = ...,
|
||||
linesep: Optional[str] =...) -> None: ...
|
||||
linesep: Optional[str] = ...) -> None: ...
|
||||
|
||||
class BytesGenerator:
|
||||
def clone(self, fp: TextIO) -> Generator: ...
|
||||
@@ -20,7 +20,7 @@ class BytesGenerator:
|
||||
maxheaderlen: int = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def flatten(self, msg: Message, unixfrom: bool = ...,
|
||||
linesep: Optional[str] =...) -> None: ...
|
||||
linesep: Optional[str] = ...) -> None: ...
|
||||
|
||||
class DecodedGenerator(Generator):
|
||||
# TODO `fmt` is positional
|
||||
|
||||
@@ -20,6 +20,6 @@ class Header:
|
||||
|
||||
def decode_header(header: Union[Header, str]) -> List[Tuple[bytes, Optional[str]]]: ...
|
||||
def make_header(decoded_seq: List[Tuple[bytes, Optional[str]]],
|
||||
maxlinelen: Optional[int] =...,
|
||||
maxlinelen: Optional[int] = ...,
|
||||
header_name: Optional[str] = ...,
|
||||
continuation_ws: str = ...) -> Header: ...
|
||||
|
||||
@@ -86,7 +86,7 @@ class Address:
|
||||
def __init__(self, display_name: str = ...,
|
||||
username: Optional[str] = ...,
|
||||
domain: Optional[str] = ...,
|
||||
addr_spec: Optional[str]=...) -> None: ...
|
||||
addr_spec: Optional[str] = ...) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class Group:
|
||||
|
||||
+2
-7
@@ -4,13 +4,8 @@
|
||||
|
||||
from typing import List, Tuple
|
||||
|
||||
def getopt(args: List[str], shortopts: str,
|
||||
longopts: List[str]=...) -> Tuple[List[Tuple[str, str]],
|
||||
List[str]]: ...
|
||||
|
||||
def gnu_getopt(args: List[str], shortopts: str,
|
||||
longopts: List[str]=...) -> Tuple[List[Tuple[str, str]],
|
||||
List[str]]: ...
|
||||
def getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ...
|
||||
def gnu_getopt(args: List[str], shortopts: str, longopts: List[str] = ...) -> Tuple[List[Tuple[str, str]], List[str]]: ...
|
||||
|
||||
class GetoptError(Exception):
|
||||
msg = ... # type: str
|
||||
|
||||
@@ -24,7 +24,7 @@ def find(domain: str, localedir: str = ..., languages: List[str] = ...,
|
||||
|
||||
def translation(domain: str, localedir: str = ..., languages: List[str] = ...,
|
||||
class_: Callable[[IO[str]], NullTranslations] = ...,
|
||||
fallback: bool =..., codeset: Any = ...) -> NullTranslations: ...
|
||||
fallback: bool = ..., codeset: Any = ...) -> NullTranslations: ...
|
||||
|
||||
def install(domain: str, localedir: str = ..., codeset: Any = ...,
|
||||
names: List[str] = ...): ...
|
||||
|
||||
@@ -69,7 +69,7 @@ class DefaultCookiePolicy(CookiePolicy):
|
||||
rfc2965: bool = ...,
|
||||
rfc2109_as_netscape: Optional[bool] = ...,
|
||||
hide_cookie2: bool = ..., strict_domain: bool = ...,
|
||||
strict_rfc2965_unverifiable: bool =...,
|
||||
strict_rfc2965_unverifiable: bool = ...,
|
||||
strict_ns_unverifiable: bool = ...,
|
||||
strict_ns_domain: int = ...,
|
||||
strict_ns_set_initial_dollar: bool = ...,
|
||||
|
||||
@@ -12,14 +12,14 @@ if sys.version_info >= (3, 7):
|
||||
|
||||
def open_binary(package: Package, resource: Resource) -> BinaryIO: ...
|
||||
def open_text(package: Package,
|
||||
resource: Resource,
|
||||
encoding: str = ...,
|
||||
errors: str = ...) -> TextIO: ...
|
||||
resource: Resource,
|
||||
encoding: str = ...,
|
||||
errors: str = ...) -> TextIO: ...
|
||||
def read_binary(package: Package, resource: Resource) -> bytes: ...
|
||||
def read_text(package: Package,
|
||||
resource: Resource,
|
||||
encoding: str = ...,
|
||||
errors: str = ...) -> str: ...
|
||||
resource: Resource,
|
||||
encoding: str = ...,
|
||||
errors: str = ...) -> str: ...
|
||||
def path(package: Package, resource: Resource) -> ContextManager[Path]: ...
|
||||
def is_resource(package: Package, name: str) -> bool: ...
|
||||
def contents(package: Package) -> Iterator[str]: ...
|
||||
|
||||
+36
-36
@@ -7,52 +7,52 @@ if sys.version_info >= (3, 5):
|
||||
from .decoder import JSONDecodeError as JSONDecodeError
|
||||
|
||||
def dumps(obj: Any,
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> str: ...
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> str: ...
|
||||
|
||||
def dump(obj: Any,
|
||||
fp: IO[str],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> None: ...
|
||||
fp: IO[str],
|
||||
skipkeys: bool = ...,
|
||||
ensure_ascii: bool = ...,
|
||||
check_circular: bool = ...,
|
||||
allow_nan: bool = ...,
|
||||
cls: Any = ...,
|
||||
indent: Union[None, int, str] = ...,
|
||||
separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable[[Any], Any]] = ...,
|
||||
sort_keys: bool = ...,
|
||||
**kwds: Any) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
_LoadsString = Union[str, bytes, bytearray]
|
||||
else:
|
||||
_LoadsString = str
|
||||
def loads(s: _LoadsString,
|
||||
encoding: Any = ..., # ignored and deprecated
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
encoding: Any = ..., # ignored and deprecated
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
|
||||
class _Reader(Protocol):
|
||||
def read(self) -> _LoadsString: ...
|
||||
|
||||
def load(fp: _Reader,
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
cls: Any = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
object_pairs_hook: Optional[Callable[[List[Tuple[Any, Any]]], Any]] = ...,
|
||||
**kwds: Any) -> Any: ...
|
||||
|
||||
@@ -19,10 +19,10 @@ class JSONDecoder:
|
||||
object_pairs_hook = ... # type: Callable[[List[Tuple[str, Any]]], Any]
|
||||
|
||||
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: ...
|
||||
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: ...
|
||||
def decode(self, s: str) -> Any: ...
|
||||
def raw_decode(self, s: str, idx: int = ...) -> Tuple[Any, int]: ...
|
||||
|
||||
@@ -12,8 +12,9 @@ class JSONEncoder:
|
||||
indent = ... # type: int
|
||||
|
||||
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]] = ..., default: Optional[Callable] = ...) -> None: ...
|
||||
check_circular: bool = ..., allow_nan: bool = ..., sort_keys: bool = ...,
|
||||
indent: Optional[int] = ..., separators: Optional[Tuple[str, str]] = ...,
|
||||
default: Optional[Callable] = ...) -> None: ...
|
||||
|
||||
def default(self, o: Any) -> Any: ...
|
||||
def encode(self, o: Any) -> str: ...
|
||||
|
||||
@@ -18,7 +18,7 @@ class Connection(object):
|
||||
def __exit__(self, exc_type, exc_value, exc_tb) -> None: ...
|
||||
def __init__(self, _in, _out) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def poll(self, timeout: float=...) -> bool: ...
|
||||
def poll(self, timeout: float = ...) -> bool: ...
|
||||
|
||||
class Listener(object):
|
||||
_backlog_queue = ... # type: Optional[Queue]
|
||||
@@ -32,4 +32,4 @@ class Listener(object):
|
||||
|
||||
|
||||
def Client(address) -> Connection: ...
|
||||
def Pipe(duplex: bool=...) -> Tuple[Connection, Connection]: ...
|
||||
def Pipe(duplex: bool = ...) -> Tuple[Connection, Connection]: ...
|
||||
|
||||
@@ -31,11 +31,11 @@ class Pool(ContextManager[Pool]):
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Mapping[str, Any] = ...) -> _T: ...
|
||||
def apply_async(self,
|
||||
func: Callable[..., _T],
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Mapping[str, Any] = ...,
|
||||
callback: Optional[Callable[[_T], None]] = ...,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult[_T]: ...
|
||||
func: Callable[..., _T],
|
||||
args: Iterable[Any] = ...,
|
||||
kwds: Mapping[str, Any] = ...,
|
||||
callback: Optional[Callable[[_T], None]] = ...,
|
||||
error_callback: Optional[Callable[[BaseException], None]] = ...) -> AsyncResult[_T]: ...
|
||||
def map(self,
|
||||
func: Callable[[_S], _T],
|
||||
iterable: Iterable[_S] = ...,
|
||||
|
||||
@@ -482,7 +482,7 @@ else:
|
||||
def renames(old: _PathType, new: _PathType) -> None: ...
|
||||
if sys.version_info >= (3, 3):
|
||||
def replace(src: _PathType, dst: _PathType, *,
|
||||
src_dir_fd: Optional[int] = ..., dst_dir_fd: Optional[int] = ...) -> None: ...
|
||||
src_dir_fd: Optional[int] = ..., dst_dir_fd: Optional[int] = ...) -> None: ...
|
||||
def rmdir(path: _PathType, *, dir_fd: Optional[int] = ...) -> None: ...
|
||||
else:
|
||||
def rmdir(path: _PathType) -> None: ...
|
||||
|
||||
+7
-2
@@ -45,8 +45,13 @@ class stat_result:
|
||||
st_creator: int
|
||||
st_type: int
|
||||
|
||||
uname_result = NamedTuple('uname_result', [('sysname', str), ('nodename', str),
|
||||
('release', str), ('version', str), ('machine', str)])
|
||||
uname_result = NamedTuple('uname_result', [
|
||||
('sysname', str),
|
||||
('nodename', str),
|
||||
('release', str),
|
||||
('version', str),
|
||||
('machine', str),
|
||||
])
|
||||
|
||||
times_result = NamedTuple('times_result', [
|
||||
('user', float),
|
||||
|
||||
+1
-2
@@ -29,8 +29,7 @@ class Random(_random.Random):
|
||||
def sample(self, population: Union[Sequence[_T], AbstractSet[_T]], k: int) -> List[_T]: ...
|
||||
def random(self) -> float: ...
|
||||
def uniform(self, a: float, b: float) -> float: ...
|
||||
def triangular(self, low: float = ..., high: float = ...,
|
||||
mode: float = ...) -> float: ...
|
||||
def triangular(self, low: float = ..., high: float = ..., mode: float = ...) -> float: ...
|
||||
def betavariate(self, alpha: float, beta: float) -> float: ...
|
||||
def expovariate(self, lambd: float) -> float: ...
|
||||
def gammavariate(self, alpha: float, beta: float) -> float: ...
|
||||
|
||||
@@ -23,7 +23,7 @@ if sys.version_info >= (3, 5):
|
||||
def NamedTemporaryFile(
|
||||
mode: str = ..., buffering: int = ..., encoding: Optional[str] = ...,
|
||||
newline: Optional[str] = ..., suffix: Optional[AnyStr] = ..., prefix: Optional[AnyStr] = ...,
|
||||
dir: Optional[AnyStr] = ..., delete: bool =...
|
||||
dir: Optional[AnyStr] = ..., delete: bool = ...
|
||||
) -> IO[Any]:
|
||||
...
|
||||
def SpooledTemporaryFile(
|
||||
@@ -61,7 +61,7 @@ else:
|
||||
def NamedTemporaryFile(
|
||||
mode: str = ..., buffering: int = ..., encoding: Optional[str] = ...,
|
||||
newline: Optional[str] = ..., suffix: str = ..., prefix: str = ...,
|
||||
dir: Optional[str] = ..., delete: bool =...
|
||||
dir: Optional[str] = ..., delete: bool = ...
|
||||
) -> IO[Any]:
|
||||
...
|
||||
def SpooledTemporaryFile(
|
||||
|
||||
@@ -51,8 +51,8 @@ class Request:
|
||||
unverifiable: bool
|
||||
method: Optional[str]
|
||||
def __init__(self, url: str, data: Optional[bytes] = ...,
|
||||
headers: Dict[str, str] =..., origin_req_host: Optional[str] = ...,
|
||||
unverifiable: bool = ..., method: Optional[str] = ...) -> None: ...
|
||||
headers: Dict[str, str] = ..., origin_req_host: Optional[str] = ...,
|
||||
unverifiable: bool = ..., method: Optional[str] = ...) -> None: ...
|
||||
def get_method(self) -> str: ...
|
||||
def add_header(self, key: str, val: str) -> None: ...
|
||||
def add_unredirected_header(self, key: str, val: str) -> None: ...
|
||||
|
||||
Vendored
+8
-4
@@ -13,11 +13,13 @@ TYPE_DSA = ... # type: int
|
||||
|
||||
class Error(Exception): ...
|
||||
|
||||
_Key = Union[rsa.RSAPublicKey, rsa.RSAPrivateKey, dsa.DSAPublicKey, dsa.DSAPrivateKey]
|
||||
|
||||
class PKey:
|
||||
def __init__(self) -> None: ...
|
||||
def to_cryptography_key(self) -> Union[rsa.RSAPublicKey, rsa.RSAPrivateKey, dsa.DSAPublicKey, dsa.DSAPrivateKey]: ...
|
||||
def to_cryptography_key(self) -> _Key: ...
|
||||
@classmethod
|
||||
def from_cryptography_key(cls, crypto_key: Union[rsa.RSAPublicKey, rsa.RSAPrivateKey, dsa.DSAPublicKey, dsa.DSAPrivateKey]): ...
|
||||
def from_cryptography_key(cls, crypto_key: _Key): ...
|
||||
def generate_key(self, type: int, bits: int) -> None: ...
|
||||
def check(self) -> bool: ...
|
||||
def type(self) -> int: ...
|
||||
@@ -49,7 +51,8 @@ class X509Name:
|
||||
def get_components(self) -> List[Tuple[str, str]]: ...
|
||||
|
||||
class X509Extension:
|
||||
def __init__(self, type_name: bytes, critical: bool, value: bytes, subject: Optional[X509] = ..., issuer: Optional[X509] = ...) -> None: ...
|
||||
def __init__(self, type_name: bytes, critical: bool, value: bytes, subject: Optional[X509] = ...,
|
||||
issuer: Optional[X509] = ...) -> None: ...
|
||||
def get_critical(self) -> bool: ...
|
||||
def get_short_name(self) -> str: ...
|
||||
def get_data(self) -> str: ...
|
||||
@@ -125,7 +128,8 @@ class X509StoreContext:
|
||||
def load_certificate(type: int, buffer: Union[str, unicode]) -> X509: ...
|
||||
def dump_certificate(type: int, cert: X509) -> bytes: ...
|
||||
def dump_publickey(type: int, pkey: PKey) -> bytes: ...
|
||||
def dump_privatekey(type: int, pkey: PKey, cipher: Optional[str] = ..., passphrase: Optional[Union[str, Callable[[int], int]]] = ...) -> bytes: ...
|
||||
def dump_privatekey(type: int, pkey: PKey, cipher: Optional[str] = ...,
|
||||
passphrase: Optional[Union[str, Callable[[int], int]]] = ...) -> bytes: ...
|
||||
|
||||
class Revoked:
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
+4
-2
@@ -42,7 +42,8 @@ class Future(Generic[_T]):
|
||||
class Executor:
|
||||
def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: ...
|
||||
if sys.version_info >= (3, 5):
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ..., chunksize: int = ...) -> Iterator[_T]: ...
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...,
|
||||
chunksize: int = ...) -> Iterator[_T]: ...
|
||||
else:
|
||||
def map(self, func: Callable[..., _T], *iterables: Iterable[Any], timeout: Optional[float] = ...,) -> Iterator[_T]: ...
|
||||
def shutdown(self, wait: bool = ...) -> None: ...
|
||||
@@ -51,4 +52,5 @@ class Executor:
|
||||
|
||||
def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ...
|
||||
|
||||
def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future[_T]], Set[Future[_T]]]: ...
|
||||
def wait(fs: Iterable[Future[_T]], timeout: Optional[float] = ..., return_when: str = ...) -> Tuple[Set[Future[_T]],
|
||||
Set[Future[_T]]]: ...
|
||||
|
||||
@@ -11,7 +11,8 @@ class RSAPrivateKey:
|
||||
|
||||
class RSAPrivateKeyWithSerialization(RSAPrivateKey):
|
||||
def private_numbers(self) -> RSAPrivateNumbers: ...
|
||||
def private_bytes(self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption) -> bytes: ...
|
||||
def private_bytes(self, encoding: Encoding, format: PrivateFormat,
|
||||
encryption_algorithm: KeySerializationEncryption) -> bytes: ...
|
||||
|
||||
class RSAPublicKey:
|
||||
def verifier(self, signature: bytes, padding, algorithm): ...
|
||||
|
||||
Vendored
+5
-4
@@ -102,8 +102,8 @@ class Flag:
|
||||
allow_override = False
|
||||
|
||||
def __init__(self, parser: ArgumentParser, serializer: ArgumentSerializer, name: str,
|
||||
default: Optional[str], help_string: str, short_name: str = ..., boolean: bool = ...,
|
||||
allow_override: bool = ...) -> None: ...
|
||||
default: Optional[str], help_string: str, short_name: str = ..., boolean: bool = ...,
|
||||
allow_override: bool = ...) -> None: ...
|
||||
def Parse(self, argument: Any) -> Any: ...
|
||||
def Unparse(self) -> None: ...
|
||||
def Serialize(self) -> str: ...
|
||||
@@ -199,7 +199,7 @@ class EnumParser(ArgumentParser):
|
||||
|
||||
class EnumFlag(Flag):
|
||||
def __init__(self, name: str, default: Optional[str], help: str, enum_values: List[str],
|
||||
short_name: str, **args: Any) -> None: ...
|
||||
short_name: str, **args: Any) -> None: ...
|
||||
|
||||
def DEFINE_enum(name: str, default: Optional[str], enum_values: List[str], help: str,
|
||||
flag_values: FlagValues = ..., **args: Any) -> None: ...
|
||||
@@ -217,7 +217,8 @@ class WhitespaceSeparatedListParser(BaseListParser):
|
||||
def WriteCustomInfoInXMLFormat(self, outfile: IO[str], indent: str): ...
|
||||
|
||||
def DEFINE_list(name: str, default: Optional[List[str]], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ...
|
||||
def DEFINE_spaceseplist(name: str, default: Optional[List[str]], help: str, flag_values: FlagValues = ..., **args: Any) -> None: ...
|
||||
def DEFINE_spaceseplist(name: str, default: Optional[List[str]], help: str, flag_values: FlagValues = ...,
|
||||
**args: Any) -> None: ...
|
||||
|
||||
class MultiFlag(Flag):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
|
||||
Vendored
+9
-4
@@ -98,7 +98,8 @@ class Serializer:
|
||||
is_text_serializer = ... # type: bool
|
||||
signer = ... # type: Signer
|
||||
signer_kwargs = ... # type: MutableMapping
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ...) -> None: ...
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like] = ..., serializer: Optional[_serializer] = ...,
|
||||
signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ...) -> None: ...
|
||||
def load_payload(self, payload: Any, serializer: Optional[_serializer] = ...) -> Any: ...
|
||||
def dump_payload(self, *args, **kwargs) -> str: ...
|
||||
def make_signer(self, salt: Optional[bytes_like] = ...) -> Signer: ...
|
||||
@@ -111,7 +112,8 @@ class Serializer:
|
||||
|
||||
class TimedSerializer(Serializer):
|
||||
default_signer = ... # type: Callable[..., TimestampSigner]
|
||||
def loads(self, s: str, salt: Optional[bytes_like] = ..., max_age: Optional[int] = ..., return_timestamp: bool = ...) -> Any: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like] = ..., max_age: Optional[int] = ...,
|
||||
return_timestamp: bool = ...) -> Any: ...
|
||||
def loads_unsafe(self, s: str, salt: Optional[bytes_like] = ..., max_age: Optional[int] = ...) -> Tuple[bool, Any]: ...
|
||||
|
||||
class JSONWebSignatureSerializer(Serializer):
|
||||
@@ -120,7 +122,9 @@ class JSONWebSignatureSerializer(Serializer):
|
||||
default_serializer = ... # type: Any
|
||||
algorithm_name = ... # type: str
|
||||
algorithm = ... # type: Any
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ..., algorithm_name: Optional[str] = ...) -> None: ...
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like] = ..., serializer: Optional[_serializer] = ...,
|
||||
signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ...,
|
||||
algorithm_name: Optional[str] = ...) -> None: ...
|
||||
def load_payload(self, payload: Any, serializer: Optional[_serializer] = ..., return_header: bool = ...) -> Any: ...
|
||||
def dump_payload(self, *args, **kwargs) -> bytes: ...
|
||||
def make_algorithm(self, algorithm_name: str) -> SigningAlgorithm: ...
|
||||
@@ -140,7 +144,8 @@ class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer):
|
||||
def now(self) -> int: ...
|
||||
|
||||
class URLSafeSerializerMixin:
|
||||
def load_payload(self, payload: Any, serializer=None, return_header=False, **kwargs) -> Any: ... # FIXME: This is invalid but works around https://github.com/pallets/itsdangerous/issues/74
|
||||
def load_payload(self, payload: Any, serializer=None, return_header=False, **kwargs) \
|
||||
-> Any: ... # FIXME: This is invalid but works around https://github.com/pallets/itsdangerous/issues/74
|
||||
def dump_payload(self, *args, **kwargs) -> str: ...
|
||||
|
||||
class URLSafeSerializer(URLSafeSerializerMixin, Serializer):
|
||||
|
||||
Vendored
+2
-1
@@ -34,7 +34,8 @@ class KazooClient:
|
||||
SetPartitioner = ... # type: Any
|
||||
Semaphore = ... # type: Any
|
||||
ShallowParty = ... # type: Any
|
||||
def __init__(self, hosts=..., timeout=..., client_id=..., handler=..., default_acl=..., auth_data=..., read_only=..., randomize_hosts=..., connection_retry=..., command_retry=..., logger=..., **kwargs) -> None: ...
|
||||
def __init__(self, hosts=..., timeout=..., client_id=..., handler=..., default_acl=..., auth_data=..., read_only=...,
|
||||
randomize_hosts=..., connection_retry=..., command_retry=..., logger=..., **kwargs) -> None: ...
|
||||
@property
|
||||
def client_state(self): ...
|
||||
@property
|
||||
|
||||
Vendored
+4
-1
@@ -37,7 +37,10 @@ class StrictRedis:
|
||||
def from_url(cls, url, db=..., **kwargs): ...
|
||||
connection_pool = ... # type: Any
|
||||
response_callbacks = ... # type: Any
|
||||
def __init__(self, host=..., port=..., db=..., password=..., socket_timeout=..., socket_connect_timeout=..., socket_keepalive=..., socket_keepalive_options=..., connection_pool=..., unix_socket_path=..., encoding=..., encoding_errors=..., charset=..., errors=..., decode_responses=..., retry_on_timeout=..., ssl=..., ssl_keyfile=..., ssl_certfile=..., ssl_cert_reqs=..., ssl_ca_certs=...) -> None: ...
|
||||
def __init__(self, host=..., port=..., db=..., password=..., socket_timeout=..., socket_connect_timeout=...,
|
||||
socket_keepalive=..., socket_keepalive_options=..., connection_pool=..., unix_socket_path=..., encoding=...,
|
||||
encoding_errors=..., charset=..., errors=..., decode_responses=..., retry_on_timeout=..., ssl=...,
|
||||
ssl_keyfile=..., ssl_certfile=..., ssl_cert_reqs=..., ssl_ca_certs=...) -> None: ...
|
||||
def set_response_callback(self, command, callback): ...
|
||||
def pipeline(self, transaction=..., shard_hint=...): ...
|
||||
def transaction(self, func, *watches, **kwargs): ...
|
||||
|
||||
Vendored
+5
-2
@@ -68,7 +68,9 @@ class Connection:
|
||||
encoding = ... # type: Any
|
||||
encoding_errors = ... # type: Any
|
||||
decode_responses = ... # type: Any
|
||||
def __init__(self, host=..., port=..., db=..., password=..., socket_timeout=..., socket_connect_timeout=..., socket_keepalive=..., socket_keepalive_options=..., retry_on_timeout=..., encoding=..., encoding_errors=..., decode_responses=..., parser_class=..., socket_read_size=...) -> None: ...
|
||||
def __init__(self, host=..., port=..., db=..., password=..., socket_timeout=..., socket_connect_timeout=...,
|
||||
socket_keepalive=..., socket_keepalive_options=..., retry_on_timeout=..., encoding=..., encoding_errors=...,
|
||||
decode_responses=..., parser_class=..., socket_read_size=...) -> None: ...
|
||||
def __del__(self): ...
|
||||
def register_connect_callback(self, callback): ...
|
||||
def clear_connect_callbacks(self): ...
|
||||
@@ -102,7 +104,8 @@ class UnixDomainSocketConnection(Connection):
|
||||
encoding = ... # type: Any
|
||||
encoding_errors = ... # type: Any
|
||||
decode_responses = ... # type: Any
|
||||
def __init__(self, path=..., db=..., password=..., socket_timeout=..., encoding=..., encoding_errors=..., decode_responses=..., retry_on_timeout=..., parser_class=..., socket_read_size=...) -> None: ...
|
||||
def __init__(self, path=..., db=..., password=..., socket_timeout=..., encoding=..., encoding_errors=...,
|
||||
decode_responses=..., retry_on_timeout=..., parser_class=..., socket_read_size=...) -> None: ...
|
||||
|
||||
class ConnectionPool:
|
||||
@classmethod
|
||||
|
||||
Vendored
+2
-1
@@ -7,7 +7,8 @@ def strip_slashes(name): ...
|
||||
|
||||
class SubMapperParent:
|
||||
def submapper(self, **kargs): ...
|
||||
def collection(self, collection_name, resource_name, path_prefix=..., member_prefix=..., controller=..., collection_actions=..., member_actions=..., member_options=..., **kwargs): ...
|
||||
def collection(self, collection_name, resource_name, path_prefix=..., member_prefix=..., controller=...,
|
||||
collection_actions=..., member_actions=..., member_options=..., **kwargs): ...
|
||||
|
||||
class SubMapper(SubMapperParent):
|
||||
kwargs = ... # type: Any
|
||||
|
||||
Vendored
+4
-2
@@ -78,9 +78,11 @@ def assertCountEqual(self: unittest.TestCase, first: Iterable[_T], second: Itera
|
||||
def assertRaisesRegex(self: unittest.TestCase, msg: 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: str = ...) -> None: ...
|
||||
def assertRegex(self: unittest.TestCase, text: AnyStr, expected_regex: Union[AnyStr, Pattern[AnyStr]],
|
||||
msg: str = ...) -> None: ...
|
||||
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException], tb: Optional[types.TracebackType] = ...) -> NoReturn: ...
|
||||
def reraise(tp: Optional[Type[BaseException]], value: Optional[BaseException],
|
||||
tb: Optional[types.TracebackType] = ...) -> NoReturn: ...
|
||||
def exec_(_code_: Union[unicode, types.CodeType], _globs_: Dict[str, Any] = ..., _locs_: Dict[str, Any] = ...): ...
|
||||
def raise_from(value: BaseException, from_value: Optional[BaseException]) -> NoReturn: ...
|
||||
|
||||
|
||||
Vendored
+8
-2
@@ -52,7 +52,12 @@ class HTTPRequest:
|
||||
ssl_options = ... # type: Any
|
||||
expect_100_continue = ... # type: Any
|
||||
start_time = ... # type: Any
|
||||
def __init__(self, url, method=..., headers=..., body=..., auth_username=..., auth_password=..., auth_mode=..., connect_timeout=..., request_timeout=..., if_modified_since=..., follow_redirects=..., max_redirects=..., user_agent=..., use_gzip=..., network_interface=..., streaming_callback=..., header_callback=..., prepare_curl_callback=..., proxy_host=..., proxy_port=..., proxy_username=..., proxy_password=..., allow_nonstandard_methods=..., validate_cert=..., ca_certs=..., allow_ipv6=..., client_key=..., client_cert=..., body_producer=..., expect_100_continue=..., decompress_response=..., ssl_options=...) -> None: ...
|
||||
def __init__(self, url, method=..., headers=..., body=..., auth_username=..., auth_password=..., auth_mode=...,
|
||||
connect_timeout=..., request_timeout=..., if_modified_since=..., follow_redirects=..., max_redirects=...,
|
||||
user_agent=..., use_gzip=..., network_interface=..., streaming_callback=..., header_callback=...,
|
||||
prepare_curl_callback=..., proxy_host=..., proxy_port=..., proxy_username=..., proxy_password=...,
|
||||
allow_nonstandard_methods=..., validate_cert=..., ca_certs=..., allow_ipv6=..., client_key=..., client_cert=...,
|
||||
body_producer=..., expect_100_continue=..., decompress_response=..., ssl_options=...) -> None: ...
|
||||
@property
|
||||
def headers(self): ...
|
||||
@headers.setter
|
||||
@@ -72,7 +77,8 @@ class HTTPResponse:
|
||||
error = ... # type: Any
|
||||
request_time = ... # type: Any
|
||||
time_info = ... # type: Any
|
||||
def __init__(self, request, code, headers=..., buffer=..., effective_url=..., error=..., request_time=..., time_info=..., reason=...) -> None: ...
|
||||
def __init__(self, request, code, headers=..., buffer=..., effective_url=..., error=..., request_time=..., time_info=...,
|
||||
reason=...) -> None: ...
|
||||
body = ... # type: Any
|
||||
def rethrow(self): ...
|
||||
|
||||
|
||||
Vendored
+3
-1
@@ -10,7 +10,9 @@ class HTTPServer(TCPServer, Configurable, httputil.HTTPServerConnectionDelegate)
|
||||
xheaders = ... # type: Any
|
||||
protocol = ... # type: Any
|
||||
conn_params = ... # type: Any
|
||||
def initialize(self, request_callback, no_keep_alive=..., io_loop=..., xheaders=..., ssl_options=..., protocol=..., decompress_request=..., chunk_size=..., max_header_size=..., idle_connection_timeout=..., body_timeout=..., max_body_size=..., max_buffer_size=...): ...
|
||||
def initialize(self, request_callback, no_keep_alive=..., io_loop=..., xheaders=..., ssl_options=..., protocol=...,
|
||||
decompress_request=..., chunk_size=..., max_header_size=..., idle_connection_timeout=..., body_timeout=...,
|
||||
max_body_size=..., max_buffer_size=...): ...
|
||||
@classmethod
|
||||
def configurable_base(cls): ...
|
||||
@classmethod
|
||||
|
||||
Vendored
+2
-1
@@ -42,7 +42,8 @@ class HTTPServerRequest:
|
||||
arguments = ... # type: Any
|
||||
query_arguments = ... # type: Any
|
||||
body_arguments = ... # type: Any
|
||||
def __init__(self, method=..., uri=..., version=..., headers=..., body=..., host=..., files=..., connection=..., start_line=...) -> None: ...
|
||||
def __init__(self, method=..., uri=..., version=..., headers=..., body=..., host=..., files=..., connection=...,
|
||||
start_line=...) -> None: ...
|
||||
def supports_http_1_1(self): ...
|
||||
@property
|
||||
def cookies(self): ...
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
from typing import Optional
|
||||
|
||||
class weekday(object):
|
||||
def __init__(self, weekday: int, n: Optional[int]=...) -> None: ...
|
||||
def __init__(self, weekday: int, n: Optional[int] = ...) -> None: ...
|
||||
|
||||
def __call__(self, n: int) -> weekday: ...
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ class parserinfo(object):
|
||||
PERTAIN = ... # type: List[str]
|
||||
TZOFFSET = ... # type: Dict[str, int]
|
||||
|
||||
def __init__(self, dayfirst: bool=..., yearfirst: bool=...) -> None: ...
|
||||
def __init__(self, dayfirst: bool = ..., yearfirst: bool = ...) -> None: ...
|
||||
def jump(self, name: Text) -> bool: ...
|
||||
def weekday(self, name: Text) -> Optional[int]: ...
|
||||
def month(self, name: Text) -> Optional[int]: ...
|
||||
|
||||
+15
-15
@@ -36,21 +36,21 @@ class relativedelta(object):
|
||||
second: Optional[int]
|
||||
microsecond: Optional[int]
|
||||
def __init__(self,
|
||||
dt1: Optional[date]=...,
|
||||
dt2: Optional[date]=...,
|
||||
years: Optional[int]=..., months: Optional[int]=...,
|
||||
days: Optional[int]=..., leapdays: Optional[int]=...,
|
||||
weeks: Optional[int]=...,
|
||||
hours: Optional[int]=..., minutes: Optional[int]=...,
|
||||
seconds: Optional[int]=..., microseconds: Optional[int]=...,
|
||||
year: Optional[int]=..., month: Optional[int]=...,
|
||||
day: Optional[int]=...,
|
||||
weekday: Optional[Union[int, _weekday]]=...,
|
||||
yearday: Optional[int]=...,
|
||||
nlyearday: Optional[int]=...,
|
||||
hour: Optional[int]=..., minute: Optional[int]=...,
|
||||
second: Optional[int]=...,
|
||||
microsecond: Optional[int]=...) -> None: ...
|
||||
dt1: Optional[date] = ...,
|
||||
dt2: Optional[date] = ...,
|
||||
years: Optional[int] = ..., months: Optional[int] = ...,
|
||||
days: Optional[int] = ..., leapdays: Optional[int] = ...,
|
||||
weeks: Optional[int] = ...,
|
||||
hours: Optional[int] = ..., minutes: Optional[int] = ...,
|
||||
seconds: Optional[int] = ..., microseconds: Optional[int] = ...,
|
||||
year: Optional[int] = ..., month: Optional[int] = ...,
|
||||
day: Optional[int] = ...,
|
||||
weekday: Optional[Union[int, _weekday]] = ...,
|
||||
yearday: Optional[int] = ...,
|
||||
nlyearday: Optional[int] = ...,
|
||||
hour: Optional[int] = ..., minute: Optional[int] = ...,
|
||||
second: Optional[int] = ...,
|
||||
microsecond: Optional[int] = ...) -> None: ...
|
||||
@property
|
||||
def weeks(self) -> int: ...
|
||||
@weeks.setter
|
||||
|
||||
Vendored
+3
-3
@@ -4,13 +4,13 @@ _DEFAULT_DELIMITER = ... # type: str
|
||||
|
||||
def emojize(
|
||||
string: str,
|
||||
use_aliases: bool=...,
|
||||
delimiters: Tuple[str, str]=...
|
||||
use_aliases: bool = ...,
|
||||
delimiters: Tuple[str, str] = ...
|
||||
) -> str: ...
|
||||
|
||||
def demojize(
|
||||
string: str,
|
||||
delimiters: Tuple[str, str]=...
|
||||
delimiters: Tuple[str, str] = ...
|
||||
) -> str: ...
|
||||
|
||||
def get_emoji_regexp() -> Pattern: ...
|
||||
|
||||
+18
-18
@@ -91,8 +91,8 @@ class TestEnumMap(Message):
|
||||
def unknown_map_field(self) -> MutableMapping[int, Proto2MapEnum]: ...
|
||||
|
||||
def __init__(self,
|
||||
known_map_field: Optional[Mapping[int, Proto2MapEnum]]=...,
|
||||
unknown_map_field: Optional[Mapping[int, Proto2MapEnum]]=...,
|
||||
known_map_field: Optional[Mapping[int, Proto2MapEnum]] = ...,
|
||||
unknown_map_field: Optional[Mapping[int, Proto2MapEnum]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -132,8 +132,8 @@ class TestEnumMapPlusExtra(Message):
|
||||
def unknown_map_field(self) -> MutableMapping[int, Proto2MapEnumPlusExtra]: ...
|
||||
|
||||
def __init__(self,
|
||||
known_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]]=...,
|
||||
unknown_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]]=...,
|
||||
known_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]] = ...,
|
||||
unknown_map_field: Optional[Mapping[int, Proto2MapEnumPlusExtra]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -158,7 +158,7 @@ class TestImportEnumMap(Message):
|
||||
def import_enum_amp(self) -> MutableMapping[int, ImportEnumForMap]: ...
|
||||
|
||||
def __init__(self,
|
||||
import_enum_amp: Optional[Mapping[int, ImportEnumForMap]]=...,
|
||||
import_enum_amp: Optional[Mapping[int, ImportEnumForMap]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -183,7 +183,7 @@ class TestIntIntMap(Message):
|
||||
def m(self) -> MutableMapping[int, int]: ...
|
||||
|
||||
def __init__(self,
|
||||
m: Optional[Mapping[int, int]]=...,
|
||||
m: Optional[Mapping[int, int]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -397,18 +397,18 @@ class TestMaps(Message):
|
||||
def m_string(self) -> MutableMapping[Text, TestIntIntMap]: ...
|
||||
|
||||
def __init__(self,
|
||||
m_int32: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_int64: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_uint32: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_uint64: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_sint32: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_sint64: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_fixed32: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_fixed64: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_sfixed32: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_sfixed64: Optional[Mapping[int, TestIntIntMap]]=...,
|
||||
m_bool: Optional[Mapping[bool, TestIntIntMap]]=...,
|
||||
m_string: Optional[Mapping[Text, TestIntIntMap]]=...,
|
||||
m_int32: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_int64: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_uint32: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_uint64: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_sint32: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_sint64: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_fixed32: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_fixed64: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_sfixed32: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_sfixed64: Optional[Mapping[int, TestIntIntMap]] = ...,
|
||||
m_bool: Optional[Mapping[bool, TestIntIntMap]] = ...,
|
||||
m_string: Optional[Mapping[Text, TestIntIntMap]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
|
||||
+44
-44
@@ -340,25 +340,25 @@ class TestMap(Message):
|
||||
def map_int32_all_types(self) -> MutableMapping[int, TestAllTypes]: ...
|
||||
|
||||
def __init__(self,
|
||||
map_int32_int32: Optional[Mapping[int, int]]=...,
|
||||
map_int64_int64: Optional[Mapping[int, int]]=...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]]=...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]]=...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]]=...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]]=...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]]=...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]]=...,
|
||||
map_int32_float: Optional[Mapping[int, float]]=...,
|
||||
map_int32_double: Optional[Mapping[int, float]]=...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]]=...,
|
||||
map_string_string: Optional[Mapping[Text, Text]]=...,
|
||||
map_int32_bytes: Optional[Mapping[int, bytes]]=...,
|
||||
map_int32_enum: Optional[Mapping[int, MapEnum]]=...,
|
||||
map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]]=...,
|
||||
map_string_foreign_message: Optional[Mapping[Text, ForeignMessage1]]=...,
|
||||
map_int32_all_types: Optional[Mapping[int, TestAllTypes]]=...,
|
||||
map_int32_int32: Optional[Mapping[int, int]] = ...,
|
||||
map_int64_int64: Optional[Mapping[int, int]] = ...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]] = ...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]] = ...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]] = ...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_int32_float: Optional[Mapping[int, float]] = ...,
|
||||
map_int32_double: Optional[Mapping[int, float]] = ...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]] = ...,
|
||||
map_string_string: Optional[Mapping[Text, Text]] = ...,
|
||||
map_int32_bytes: Optional[Mapping[int, bytes]] = ...,
|
||||
map_int32_enum: Optional[Mapping[int, MapEnum]] = ...,
|
||||
map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]] = ...,
|
||||
map_string_foreign_message: Optional[Mapping[Text, ForeignMessage1]] = ...,
|
||||
map_int32_all_types: Optional[Mapping[int, TestAllTypes]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -398,7 +398,7 @@ class TestMessageMap(Message):
|
||||
def map_int32_message(self) -> MutableMapping[int, TestAllTypes]: ...
|
||||
|
||||
def __init__(self,
|
||||
map_int32_message: Optional[Mapping[int, TestAllTypes]]=...,
|
||||
map_int32_message: Optional[Mapping[int, TestAllTypes]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -438,8 +438,8 @@ class TestSameTypeMap(Message):
|
||||
def map2(self) -> MutableMapping[int, int]: ...
|
||||
|
||||
def __init__(self,
|
||||
map1: Optional[Mapping[int, int]]=...,
|
||||
map2: Optional[Mapping[int, int]]=...,
|
||||
map1: Optional[Mapping[int, int]] = ...,
|
||||
map2: Optional[Mapping[int, int]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -467,7 +467,7 @@ class TestRequiredMessageMap(Message):
|
||||
def map_field(self) -> MutableMapping[int, TestRequired]: ...
|
||||
|
||||
def __init__(self,
|
||||
map_field: Optional[Mapping[int, TestRequired]]=...,
|
||||
map_field: Optional[Mapping[int, TestRequired]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -757,24 +757,24 @@ class TestArenaMap(Message):
|
||||
self) -> MutableMapping[int, ForeignMessage]: ...
|
||||
|
||||
def __init__(self,
|
||||
map_int32_int32: Optional[Mapping[int, int]]=...,
|
||||
map_int64_int64: Optional[Mapping[int, int]]=...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]]=...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]]=...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]]=...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]]=...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]]=...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]]=...,
|
||||
map_int32_float: Optional[Mapping[int, float]]=...,
|
||||
map_int32_double: Optional[Mapping[int, float]]=...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]]=...,
|
||||
map_string_string: Optional[Mapping[Text, Text]]=...,
|
||||
map_int32_bytes: Optional[Mapping[int, bytes]]=...,
|
||||
map_int32_enum: Optional[Mapping[int, MapEnum]]=...,
|
||||
map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]]=...,
|
||||
map_int32_foreign_message_no_arena: Optional[Mapping[int, ForeignMessage]]=...,
|
||||
map_int32_int32: Optional[Mapping[int, int]] = ...,
|
||||
map_int64_int64: Optional[Mapping[int, int]] = ...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]] = ...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]] = ...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]] = ...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_int32_float: Optional[Mapping[int, float]] = ...,
|
||||
map_int32_double: Optional[Mapping[int, float]] = ...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]] = ...,
|
||||
map_string_string: Optional[Mapping[Text, Text]] = ...,
|
||||
map_int32_bytes: Optional[Mapping[int, bytes]] = ...,
|
||||
map_int32_enum: Optional[Mapping[int, MapEnum]] = ...,
|
||||
map_int32_foreign_message: Optional[Mapping[int, ForeignMessage1]] = ...,
|
||||
map_int32_foreign_message_no_arena: Optional[Mapping[int, ForeignMessage]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -822,7 +822,7 @@ class MessageContainingEnumCalledType(Message):
|
||||
MessageContainingEnumCalledType]: ...
|
||||
|
||||
def __init__(self,
|
||||
type: Optional[Mapping[Text, MessageContainingEnumCalledType]]=...,
|
||||
type: Optional[Mapping[Text, MessageContainingEnumCalledType]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -848,7 +848,7 @@ class MessageContainingMapCalledEntry(Message):
|
||||
def entry(self) -> MutableMapping[int, int]: ...
|
||||
|
||||
def __init__(self,
|
||||
entry: Optional[Mapping[int, int]]=...,
|
||||
entry: Optional[Mapping[int, int]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -875,7 +875,7 @@ class TestRecursiveMapMessage(Message):
|
||||
def a(self) -> MutableMapping[Text, TestRecursiveMapMessage]: ...
|
||||
|
||||
def __init__(self,
|
||||
a: Optional[Mapping[Text, TestRecursiveMapMessage]]=...,
|
||||
a: Optional[Mapping[Text, TestRecursiveMapMessage]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
|
||||
+19
-19
@@ -563,25 +563,25 @@ class TestAllTypesProto2(Message):
|
||||
repeated_foreign_enum: Optional[Iterable[ForeignEnumProto2]] = ...,
|
||||
repeated_string_piece: Optional[Iterable[Text]] = ...,
|
||||
repeated_cord: Optional[Iterable[Text]] = ...,
|
||||
map_int32_int32: Optional[Mapping[int, int]]=...,
|
||||
map_int64_int64: Optional[Mapping[int, int]]=...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]]=...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]]=...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]]=...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]]=...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]]=...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]]=...,
|
||||
map_int32_float: Optional[Mapping[int, float]]=...,
|
||||
map_int32_double: Optional[Mapping[int, float]]=...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]]=...,
|
||||
map_string_string: Optional[Mapping[Text, Text]]=...,
|
||||
map_string_bytes: Optional[Mapping[Text, bytes]]=...,
|
||||
map_string_nested_message: Optional[Mapping[Text, TestAllTypesProto2.NestedMessage]]=...,
|
||||
map_string_foreign_message: Optional[Mapping[Text, ForeignMessageProto2]]=...,
|
||||
map_string_nested_enum: Optional[Mapping[Text, TestAllTypesProto2.NestedEnum]]=...,
|
||||
map_string_foreign_enum: Optional[Mapping[Text, ForeignEnumProto2]]=...,
|
||||
map_int32_int32: Optional[Mapping[int, int]] = ...,
|
||||
map_int64_int64: Optional[Mapping[int, int]] = ...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]] = ...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]] = ...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]] = ...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_int32_float: Optional[Mapping[int, float]] = ...,
|
||||
map_int32_double: Optional[Mapping[int, float]] = ...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]] = ...,
|
||||
map_string_string: Optional[Mapping[Text, Text]] = ...,
|
||||
map_string_bytes: Optional[Mapping[Text, bytes]] = ...,
|
||||
map_string_nested_message: Optional[Mapping[Text, TestAllTypesProto2.NestedMessage]] = ...,
|
||||
map_string_foreign_message: Optional[Mapping[Text, ForeignMessageProto2]] = ...,
|
||||
map_string_nested_enum: Optional[Mapping[Text, TestAllTypesProto2.NestedEnum]] = ...,
|
||||
map_string_foreign_enum: Optional[Mapping[Text, ForeignEnumProto2]] = ...,
|
||||
oneof_uint32: Optional[int] = ...,
|
||||
oneof_nested_message: Optional[TestAllTypesProto2.NestedMessage] = ...,
|
||||
oneof_string: Optional[Text] = ...,
|
||||
|
||||
+19
-19
@@ -607,25 +607,25 @@ class TestAllTypesProto3(Message):
|
||||
repeated_foreign_enum: Optional[Iterable[ForeignEnum]] = ...,
|
||||
repeated_string_piece: Optional[Iterable[Text]] = ...,
|
||||
repeated_cord: Optional[Iterable[Text]] = ...,
|
||||
map_int32_int32: Optional[Mapping[int, int]]=...,
|
||||
map_int64_int64: Optional[Mapping[int, int]]=...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]]=...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]]=...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]]=...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]]=...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]]=...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]]=...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]]=...,
|
||||
map_int32_float: Optional[Mapping[int, float]]=...,
|
||||
map_int32_double: Optional[Mapping[int, float]]=...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]]=...,
|
||||
map_string_string: Optional[Mapping[Text, Text]]=...,
|
||||
map_string_bytes: Optional[Mapping[Text, bytes]]=...,
|
||||
map_string_nested_message: Optional[Mapping[Text, TestAllTypesProto3.NestedMessage]]=...,
|
||||
map_string_foreign_message: Optional[Mapping[Text, ForeignMessage]]=...,
|
||||
map_string_nested_enum: Optional[Mapping[Text, TestAllTypesProto3.NestedEnum]]=...,
|
||||
map_string_foreign_enum: Optional[Mapping[Text, ForeignEnum]]=...,
|
||||
map_int32_int32: Optional[Mapping[int, int]] = ...,
|
||||
map_int64_int64: Optional[Mapping[int, int]] = ...,
|
||||
map_uint32_uint32: Optional[Mapping[int, int]] = ...,
|
||||
map_uint64_uint64: Optional[Mapping[int, int]] = ...,
|
||||
map_sint32_sint32: Optional[Mapping[int, int]] = ...,
|
||||
map_sint64_sint64: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed32_fixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_fixed64_fixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed32_sfixed32: Optional[Mapping[int, int]] = ...,
|
||||
map_sfixed64_sfixed64: Optional[Mapping[int, int]] = ...,
|
||||
map_int32_float: Optional[Mapping[int, float]] = ...,
|
||||
map_int32_double: Optional[Mapping[int, float]] = ...,
|
||||
map_bool_bool: Optional[Mapping[bool, bool]] = ...,
|
||||
map_string_string: Optional[Mapping[Text, Text]] = ...,
|
||||
map_string_bytes: Optional[Mapping[Text, bytes]] = ...,
|
||||
map_string_nested_message: Optional[Mapping[Text, TestAllTypesProto3.NestedMessage]] = ...,
|
||||
map_string_foreign_message: Optional[Mapping[Text, ForeignMessage]] = ...,
|
||||
map_string_nested_enum: Optional[Mapping[Text, TestAllTypesProto3.NestedEnum]] = ...,
|
||||
map_string_foreign_enum: Optional[Mapping[Text, ForeignEnum]] = ...,
|
||||
oneof_uint32: Optional[int] = ...,
|
||||
oneof_nested_message: Optional[TestAllTypesProto3.NestedMessage] = ...,
|
||||
oneof_string: Optional[Text] = ...,
|
||||
|
||||
@@ -253,12 +253,12 @@ class TestMap(Message):
|
||||
def string_map(self) -> MutableMapping[Text, int]: ...
|
||||
|
||||
def __init__(self,
|
||||
bool_map: Optional[Mapping[bool, int]]=...,
|
||||
int32_map: Optional[Mapping[int, int]]=...,
|
||||
int64_map: Optional[Mapping[int, int]]=...,
|
||||
uint32_map: Optional[Mapping[int, int]]=...,
|
||||
uint64_map: Optional[Mapping[int, int]]=...,
|
||||
string_map: Optional[Mapping[Text, int]]=...,
|
||||
bool_map: Optional[Mapping[bool, int]] = ...,
|
||||
int32_map: Optional[Mapping[int, int]] = ...,
|
||||
int64_map: Optional[Mapping[int, int]] = ...,
|
||||
uint32_map: Optional[Mapping[int, int]] = ...,
|
||||
uint64_map: Optional[Mapping[int, int]] = ...,
|
||||
string_map: Optional[Mapping[Text, int]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -375,13 +375,13 @@ class TestNestedMap(Message):
|
||||
def map_map(self) -> MutableMapping[Text, TestNestedMap]: ...
|
||||
|
||||
def __init__(self,
|
||||
bool_map: Optional[Mapping[bool, int]]=...,
|
||||
int32_map: Optional[Mapping[int, int]]=...,
|
||||
int64_map: Optional[Mapping[int, int]]=...,
|
||||
uint32_map: Optional[Mapping[int, int]]=...,
|
||||
uint64_map: Optional[Mapping[int, int]]=...,
|
||||
string_map: Optional[Mapping[Text, int]]=...,
|
||||
map_map: Optional[Mapping[Text, TestNestedMap]]=...,
|
||||
bool_map: Optional[Mapping[bool, int]] = ...,
|
||||
int32_map: Optional[Mapping[int, int]] = ...,
|
||||
int64_map: Optional[Mapping[int, int]] = ...,
|
||||
uint32_map: Optional[Mapping[int, int]] = ...,
|
||||
uint64_map: Optional[Mapping[int, int]] = ...,
|
||||
string_map: Optional[Mapping[Text, int]] = ...,
|
||||
map_map: Optional[Mapping[Text, TestNestedMap]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
@@ -613,7 +613,7 @@ class TestBoolValue(Message):
|
||||
|
||||
def __init__(self,
|
||||
bool_value: Optional[bool] = ...,
|
||||
bool_map: Optional[Mapping[bool, int]]=...,
|
||||
bool_map: Optional[Mapping[bool, int]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
@classmethod
|
||||
|
||||
+34
-11
@@ -20,7 +20,9 @@ class Connection:
|
||||
host: Any
|
||||
region: Any
|
||||
session_cls: Any
|
||||
def __init__(self, region: Optional[Any] = ..., host: Optional[Any] = ..., session_cls: Optional[Any] = ..., request_timeout_seconds: Optional[Any] = ..., max_retry_attempts: Optional[Any] = ..., base_backoff_ms: Optional[Any] = ...) -> None: ...
|
||||
def __init__(self, region: Optional[Any] = ..., host: Optional[Any] = ..., session_cls: Optional[Any] = ...,
|
||||
request_timeout_seconds: Optional[Any] = ..., max_retry_attempts: Optional[Any] = ...,
|
||||
base_backoff_ms: Optional[Any] = ...) -> None: ...
|
||||
def dispatch(self, operation_name, operation_kwargs): ...
|
||||
@property
|
||||
def session(self): ...
|
||||
@@ -29,9 +31,13 @@ class Connection:
|
||||
@property
|
||||
def client(self): ...
|
||||
def get_meta_table(self, table_name: Text, refresh: bool = ...): ...
|
||||
def create_table(self, table_name: Text, attribute_definitions: Optional[Any] = ..., key_schema: Optional[Any] = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_indexes: Optional[Any] = ..., local_secondary_indexes: Optional[Any] = ..., stream_specification: Optional[Any] = ...): ...
|
||||
def create_table(self, table_name: Text, attribute_definitions: Optional[Any] = ..., key_schema: Optional[Any] = ...,
|
||||
read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ...,
|
||||
global_secondary_indexes: Optional[Any] = ..., local_secondary_indexes: Optional[Any] = ...,
|
||||
stream_specification: Optional[Any] = ...): ...
|
||||
def delete_table(self, table_name: Text): ...
|
||||
def update_table(self, table_name: Text, read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ..., global_secondary_index_updates: Optional[Any] = ...): ...
|
||||
def update_table(self, table_name: Text, read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ...,
|
||||
global_secondary_index_updates: Optional[Any] = ...): ...
|
||||
def list_tables(self, exclusive_start_table_name: Optional[Any] = ..., limit: Optional[Any] = ...): ...
|
||||
def describe_table(self, table_name: Text): ...
|
||||
def get_conditional_operator(self, operator): ...
|
||||
@@ -45,11 +51,28 @@ class Connection:
|
||||
def get_return_values_map(self, return_values): ...
|
||||
def get_item_collection_map(self, return_item_collection_metrics): ...
|
||||
def get_exclusive_start_key_map(self, table_name: Text, exclusive_start_key): ...
|
||||
def delete_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ...
|
||||
def update_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., attribute_updates: Optional[Any] = ..., expected: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ..., return_values: Optional[Any] = ...): ...
|
||||
def put_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., attributes: Optional[Any] = ..., expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ...
|
||||
def batch_write_item(self, table_name: Text, put_items: Optional[Any] = ..., delete_items: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ...
|
||||
def batch_get_item(self, table_name: Text, keys, consistent_read: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., attributes_to_get: Optional[Any] = ...): ...
|
||||
def get_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., consistent_read: bool = ..., attributes_to_get: Optional[Any] = ...): ...
|
||||
def scan(self, table_name: Text, attributes_to_get: Optional[Any] = ..., limit: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., scan_filter: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., exclusive_start_key: Optional[Any] = ..., segment: Optional[Any] = ..., total_segments: Optional[Any] = ...): ...
|
||||
def query(self, table_name: Text, hash_key, attributes_to_get: Optional[Any] = ..., consistent_read: bool = ..., exclusive_start_key: Optional[Any] = ..., index_name: Optional[Any] = ..., key_conditions: Optional[Any] = ..., query_filters: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., limit: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ..., scan_index_forward: Optional[Any] = ..., select: Optional[Any] = ...): ...
|
||||
def delete_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., expected: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ...
|
||||
def update_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., attribute_updates: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ..., return_consumed_capacity: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...,
|
||||
return_values: Optional[Any] = ...): ...
|
||||
def put_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., attributes: Optional[Any] = ...,
|
||||
expected: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., return_values: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ...
|
||||
def batch_write_item(self, table_name: Text, put_items: Optional[Any] = ..., delete_items: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ..., return_item_collection_metrics: Optional[Any] = ...): ...
|
||||
def batch_get_item(self, table_name: Text, keys, consistent_read: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ..., attributes_to_get: Optional[Any] = ...): ...
|
||||
def get_item(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., consistent_read: bool = ...,
|
||||
attributes_to_get: Optional[Any] = ...): ...
|
||||
def scan(self, table_name: Text, attributes_to_get: Optional[Any] = ..., limit: Optional[Any] = ...,
|
||||
conditional_operator: Optional[Any] = ..., scan_filter: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ..., exclusive_start_key: Optional[Any] = ...,
|
||||
segment: Optional[Any] = ..., total_segments: Optional[Any] = ...): ...
|
||||
def query(self, table_name: Text, hash_key, attributes_to_get: Optional[Any] = ..., consistent_read: bool = ...,
|
||||
exclusive_start_key: Optional[Any] = ..., index_name: Optional[Any] = ..., key_conditions: Optional[Any] = ...,
|
||||
query_filters: Optional[Any] = ..., conditional_operator: Optional[Any] = ..., limit: Optional[Any] = ...,
|
||||
return_consumed_capacity: Optional[Any] = ..., scan_index_forward: Optional[Any] = ...,
|
||||
select: Optional[Any] = ...): ...
|
||||
|
||||
Vendored
+3
-3
@@ -34,7 +34,7 @@ def get(url: Union[_Text, bytes],
|
||||
**kwargs) -> Response: ...
|
||||
def options(url: _Text, **kwargs) -> Response: ...
|
||||
def head(url: _Text, **kwargs) -> Response: ...
|
||||
def post(url: _Text, data: _Data=..., json=..., **kwargs) -> Response: ...
|
||||
def put(url: _Text, data: _Data=..., json=..., **kwargs) -> Response: ...
|
||||
def patch(url: _Text, data: _Data=..., json=..., **kwargs) -> Response: ...
|
||||
def post(url: _Text, data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def put(url: _Text, data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def patch(url: _Text, data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def delete(url: _Text, **kwargs) -> Response: ...
|
||||
|
||||
Vendored
+4
-4
@@ -22,10 +22,10 @@ def safe_load_all(stream: Union[str, IO[str]]) -> Iterator[Any]: ...
|
||||
def emit(events, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=...): ...
|
||||
def serialize_all(nodes, stream=..., Dumper=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...): ...
|
||||
def serialize(node, stream=..., Dumper=..., **kwds): ...
|
||||
def dump_all(documents: Sequence[Any], stream: IO[str]=..., Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> Any: ...
|
||||
def dump(data: Any, stream: IO[str]=..., Dumper=..., **kwds) -> Any: ...
|
||||
def safe_dump_all(documents: Sequence[Any], stream: IO[str]=..., **kwds) -> Any: ...
|
||||
def safe_dump(data: Any, stream: IO[str]=..., **kwds) -> Any: ...
|
||||
def dump_all(documents: Sequence[Any], stream: IO[str] = ..., Dumper=..., default_style=..., default_flow_style=..., canonical=..., indent=..., width=..., allow_unicode=..., line_break=..., encoding=..., explicit_start=..., explicit_end=..., version=..., tags=...) -> Any: ...
|
||||
def dump(data: Any, stream: IO[str] = ..., Dumper=..., **kwds) -> Any: ...
|
||||
def safe_dump_all(documents: Sequence[Any], stream: IO[str] = ..., **kwds) -> Any: ...
|
||||
def safe_dump(data: Any, stream: IO[str] = ..., **kwds) -> Any: ...
|
||||
def add_implicit_resolver(tag, regexp, first=..., Loader=..., Dumper=...): ...
|
||||
def add_path_resolver(tag, path, kind=..., Loader=..., Dumper=...): ...
|
||||
def add_constructor(tag, constructor, Loader=...): ...
|
||||
|
||||
Vendored
+10
-9
@@ -22,7 +22,7 @@ def dataclass(_cls: Type[_T]) -> Type[_T]: ...
|
||||
|
||||
@overload
|
||||
def dataclass(*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ...,
|
||||
unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
unsafe_hash: bool = ..., frozen: bool = ...) -> Callable[[Type[_T]], Type[_T]]: ...
|
||||
|
||||
|
||||
class Field(Generic[_T]):
|
||||
@@ -41,18 +41,18 @@ class Field(Generic[_T]):
|
||||
# to understand the magic that happens at runtime.
|
||||
@overload # `default` and `default_factory` are optional and mutually exclusive.
|
||||
def field(*, default: _T,
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
|
||||
@overload
|
||||
def field(*, default_factory: Callable[[], _T],
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> _T: ...
|
||||
|
||||
@overload
|
||||
def field(*,
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> Any: ...
|
||||
init: bool = ..., repr: bool = ..., hash: Optional[bool] = ..., compare: bool = ...,
|
||||
metadata: Optional[Mapping[str, Any]] = ...) -> Any: ...
|
||||
|
||||
|
||||
def fields(class_or_instance: Any) -> Tuple[Field[Any], ...]: ...
|
||||
@@ -64,7 +64,8 @@ class FrozenInstanceError(AttributeError): ...
|
||||
class InitVar(Generic[_T]): ...
|
||||
|
||||
def make_dataclass(cls_name: str, fields: Iterable[Union[str, Tuple[str, type], Tuple[str, type, Field[Any]]]], *,
|
||||
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ..., frozen: bool = ...): ...
|
||||
bases: Tuple[type, ...] = ..., namespace: Optional[Dict[str, Any]] = ...,
|
||||
init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., hash: bool = ...,
|
||||
frozen: bool = ...): ...
|
||||
|
||||
def replace(obj: _T, **changes: Any) -> _T: ...
|
||||
|
||||
Vendored
+1
-1
@@ -129,7 +129,7 @@ class JSONWebSignatureSerializer(Serializer):
|
||||
def make_algorithm(self, algorithm_name: str) -> SigningAlgorithm: ...
|
||||
def make_signer(self, salt: Optional[_can_become_bytes] = ..., algorithm_name: Optional[str] = ...) -> Signer: ...
|
||||
def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ...
|
||||
def dumps(self, obj: Any, salt: Optional[_can_become_bytes] = ..., header_fields: Optional[MutableMapping]=...) -> str: ...
|
||||
def dumps(self, obj: Any, salt: Optional[_can_become_bytes] = ..., header_fields: Optional[MutableMapping] = ...) -> str: ...
|
||||
def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., return_header: bool = ...) -> Any: ...
|
||||
def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., return_header: bool = ...) -> Tuple[bool, Any]: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user