mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-30 14:45:23 +08:00
Replace non-ellipsis default arguments (#2550)
This commit is contained in:
committed by
Jelle Zijlstra
parent
b7d6bab83f
commit
cd75801aa5
27
third_party/3/itsdangerous.pyi
vendored
27
third_party/3/itsdangerous.pyi
vendored
@@ -43,7 +43,8 @@ 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): ...
|
||||
|
||||
@@ -74,7 +75,8 @@ class Signer:
|
||||
key_derivation = ... # type: str
|
||||
digest_method = ... # type: Callable
|
||||
algorithm = ... # type: SigningAlgorithm
|
||||
def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., sep: Optional[_can_become_bytes] = ...,
|
||||
def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ...,
|
||||
sep: Optional[_can_become_bytes] = ...,
|
||||
key_derivation: Optional[str] = ...,
|
||||
digest_method: Optional[Callable] = ...,
|
||||
algorithm: Optional[SigningAlgorithm] = ...) -> None: ...
|
||||
@@ -101,7 +103,9 @@ class Serializer:
|
||||
is_text_serializer = ... # type: bool
|
||||
signer = ... # type: Signer
|
||||
signer_kwargs = ... # type: MutableMapping
|
||||
def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ...) -> None: ...
|
||||
def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ...,
|
||||
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) -> bytes: ...
|
||||
def make_signer(self, salt: Optional[_can_become_bytes] = ...) -> Signer: ...
|
||||
@@ -114,8 +118,10 @@ class Serializer:
|
||||
|
||||
class TimedSerializer(Serializer):
|
||||
default_signer = ... # type: Callable[..., TimestampSigner]
|
||||
def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., max_age: Optional[int] = ..., return_timestamp: bool = ...) -> Any: ...
|
||||
def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., max_age: Optional[int] = ...) -> Tuple[bool, Any]: ...
|
||||
def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., max_age: Optional[int] = ...,
|
||||
return_timestamp: bool = ...) -> Any: ...
|
||||
def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ...,
|
||||
max_age: Optional[int] = ...) -> Tuple[bool, Any]: ...
|
||||
|
||||
class JSONWebSignatureSerializer(Serializer):
|
||||
jws_algorithms = ... # type: MutableMapping[str, SigningAlgorithm]
|
||||
@@ -123,21 +129,24 @@ class JSONWebSignatureSerializer(Serializer):
|
||||
default_serializer = ... # type: Any
|
||||
algorithm_name = ... # type: str
|
||||
algorithm = ... # type: Any
|
||||
def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ..., algorithm_name: Optional[str] = ...) -> None: ...
|
||||
def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ...,
|
||||
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: ...
|
||||
def make_signer(self, salt: Optional[_can_become_bytes] = ..., 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[_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]: ...
|
||||
def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ...,
|
||||
return_header: bool = ...) -> Tuple[bool, Any]: ...
|
||||
|
||||
class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer):
|
||||
DEFAULT_EXPIRES_IN = ... # type: int
|
||||
expires_in = ... # type: int
|
||||
def __init__(self, secret_key: _can_become_bytes, 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: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., return_header: bool = ...) -> Any: ...
|
||||
def get_issue_date(self, header: MutableMapping) -> Optional[datetime]: ...
|
||||
def now(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user