mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 04:52:23 +08:00
Replace non-ellipsis default arguments (#2550)
This commit is contained in:
committed by
Jelle Zijlstra
parent
b7d6bab83f
commit
cd75801aa5
8
third_party/2/itsdangerous.pyi
vendored
8
third_party/2/itsdangerous.pyi
vendored
@@ -40,7 +40,7 @@ class BadTimeSignature(BadSignature):
|
||||
class BadHeader(BadSignature):
|
||||
header = ... # type: Any
|
||||
original_error = ... # type: Any
|
||||
def __init__(self, message, payload=None, header=None, original_error=None) -> None: ...
|
||||
def __init__(self, message, payload: Optional[Any] = ..., header: Optional[Any] = ..., original_error: Optional[Any] = ...) -> None: ...
|
||||
|
||||
class SignatureExpired(BadTimeSignature): ...
|
||||
|
||||
@@ -129,7 +129,7 @@ class JSONWebSignatureSerializer(Serializer):
|
||||
def dump_payload(self, *args, **kwargs) -> bytes: ...
|
||||
def make_algorithm(self, algorithm_name: str) -> SigningAlgorithm: ...
|
||||
def make_signer(self, salt: Optional[bytes_like] = ..., algorithm_name: Optional[str] = ...) -> Signer: ...
|
||||
def make_header(self, header_fields: Optional[MutableMapping] = ...) -> MutableMapping: ...
|
||||
def make_header(self, header_fields: Optional[MutableMapping]) -> MutableMapping: ...
|
||||
def dumps(self, obj: Any, salt: Optional[bytes_like] = ..., header_fields: Optional[MutableMapping] = ...) -> str: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like] = ..., return_header: bool = ...) -> Any: ...
|
||||
def loads_unsafe(self, s, salt: Optional[bytes_like] = ..., return_header: bool = ...) -> Tuple[bool, Any]: ...
|
||||
@@ -138,13 +138,13 @@ class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer):
|
||||
DEFAULT_EXPIRES_IN = ... # type: int
|
||||
expires_in = ... # type: int
|
||||
def __init__(self, secret_key: bytes_like, expires_in: Optional[int] = ..., **kwargs) -> None: ...
|
||||
def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ...
|
||||
def make_header(self, header_fields: Optional[MutableMapping]) -> MutableMapping: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like] = ..., return_header: bool = ...) -> Any: ...
|
||||
def get_issue_date(self, header: MutableMapping) -> Optional[datetime]: ...
|
||||
def now(self) -> int: ...
|
||||
|
||||
class URLSafeSerializerMixin:
|
||||
def load_payload(self, payload: Any, serializer=None, return_header=False, **kwargs) \
|
||||
def load_payload(self, payload: Any, serializer: Optional[Any] = ..., return_header: bool = ..., **kwargs) \
|
||||
-> Any: ... # FIXME: This is invalid but works around https://github.com/pallets/itsdangerous/issues/74
|
||||
def dump_payload(self, *args, **kwargs) -> str: ...
|
||||
|
||||
|
||||
16
third_party/2/tornado/locks.pyi
vendored
16
third_party/2/tornado/locks.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, Optional
|
||||
|
||||
class _TimeoutGarbageCollector:
|
||||
def __init__(self): ...
|
||||
@@ -6,8 +6,8 @@ class _TimeoutGarbageCollector:
|
||||
class Condition(_TimeoutGarbageCollector):
|
||||
io_loop = ... # type: Any
|
||||
def __init__(self): ...
|
||||
def wait(self, timeout=None): ...
|
||||
def notify(self, n=1): ...
|
||||
def wait(self, timeout: Optional[Any] = ...): ...
|
||||
def notify(self, n: int = ...): ...
|
||||
def notify_all(self): ...
|
||||
|
||||
class Event:
|
||||
@@ -15,7 +15,7 @@ class Event:
|
||||
def is_set(self): ...
|
||||
def set(self): ...
|
||||
def clear(self): ...
|
||||
def wait(self, timeout=None): ...
|
||||
def wait(self, timeout: Optional[Any] = ...): ...
|
||||
|
||||
class _ReleasingContextManager:
|
||||
def __init__(self, obj): ...
|
||||
@@ -23,21 +23,21 @@ class _ReleasingContextManager:
|
||||
def __exit__(self, exc_type, exc_val, exc_tb): ...
|
||||
|
||||
class Semaphore(_TimeoutGarbageCollector):
|
||||
def __init__(self, value=1): ...
|
||||
def __init__(self, value: int = ...): ...
|
||||
def release(self): ...
|
||||
def acquire(self, timeout=None): ...
|
||||
def acquire(self, timeout: Optional[Any] = ...): ...
|
||||
def __enter__(self): ...
|
||||
__exit__ = ... # type: Any
|
||||
def __aenter__(self): ...
|
||||
def __aexit__(self, typ, value, tb): ...
|
||||
|
||||
class BoundedSemaphore(Semaphore):
|
||||
def __init__(self, value=1): ...
|
||||
def __init__(self, value: int = ...): ...
|
||||
def release(self): ...
|
||||
|
||||
class Lock:
|
||||
def __init__(self): ...
|
||||
def acquire(self, timeout=None): ...
|
||||
def acquire(self, timeout: Optional[Any] = ...): ...
|
||||
def release(self): ...
|
||||
def __enter__(self): ...
|
||||
__exit__ = ... # type: Any
|
||||
|
||||
12
third_party/2/tornado/testing.pyi
vendored
12
third_party/2/tornado/testing.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from typing import Any, Optional
|
||||
import unittest
|
||||
import logging
|
||||
|
||||
@@ -18,9 +18,9 @@ class AsyncTestCase(unittest.TestCase):
|
||||
def setUp(self): ...
|
||||
def tearDown(self): ...
|
||||
def get_new_ioloop(self): ...
|
||||
def run(self, result=None): ...
|
||||
def stop(self, _arg=None, **kwargs): ...
|
||||
def wait(self, condition=None, timeout=5): ...
|
||||
def run(self, result: Optional[Any] = ...): ...
|
||||
def stop(self, _arg: Optional[Any] = ..., **kwargs): ...
|
||||
def wait(self, condition: Optional[Any] = ..., timeout: float = ...): ...
|
||||
|
||||
class AsyncHTTPTestCase(AsyncTestCase):
|
||||
http_client = ... # type: Any
|
||||
@@ -45,14 +45,14 @@ class AsyncHTTPSTestCase(AsyncHTTPTestCase):
|
||||
def gen_test(f): ...
|
||||
|
||||
class LogTrapTestCase(unittest.TestCase):
|
||||
def run(self, result=None): ...
|
||||
def run(self, result: Optional[Any] = ...): ...
|
||||
|
||||
class ExpectLog(logging.Filter):
|
||||
logger = ... # type: Any
|
||||
regex = ... # type: Any
|
||||
required = ... # type: Any
|
||||
matched = ... # type: Any
|
||||
def __init__(self, logger, regex, required=True): ...
|
||||
def __init__(self, logger, regex, required: bool = ...): ...
|
||||
def filter(self, record): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, typ, value, tb): ...
|
||||
|
||||
Reference in New Issue
Block a user