mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-12 05:01:40 +08:00
Change more defaults to ... (#1729)
* codemod ': Any = None' ': Any = ...' * codemod ': (Union|Optional)([^=]+)\s+=\s+-?\d+' ': \1\2 = ...' * codemod ': (Union|Optional)([^=]+)\s*=\s*-?(None|False|True)' ': \1\2 = ...' * codemod ': (int|float|bool)\s*=\s*-?\d+' ': \1 = ...' * codemod ': (bool)\s*=\s*(False|True)' ': \1 = ...' * codemod ': Any\s*=\s*(False|True|None)' ': Any = ...'
This commit is contained in:
committed by
Matthias Kramm
parent
0080017d02
commit
83ca997140
52
third_party/2/itsdangerous.pyi
vendored
52
third_party/2/itsdangerous.pyi
vendored
@@ -26,15 +26,15 @@ class BadData(Exception):
|
||||
|
||||
class BadPayload(BadData):
|
||||
original_error = ... # type: Optional[Exception]
|
||||
def __init__(self, message: str, original_error: Optional[Exception]=None) -> None: ...
|
||||
def __init__(self, message: str, original_error: Optional[Exception] = ...) -> None: ...
|
||||
|
||||
class BadSignature(BadData):
|
||||
payload = ... # type: Optional[Any]
|
||||
def __init__(self, message: str, payload: Optional[Any]=None) -> None: ...
|
||||
def __init__(self, message: str, payload: Optional[Any] = ...) -> None: ...
|
||||
|
||||
class BadTimeSignature(BadSignature):
|
||||
date_signed = ... # type: Optional[int]
|
||||
def __init__(self, message, payload: Optional[Any]=None, date_signed: Optional[int]=None) -> None: ...
|
||||
def __init__(self, message, payload: Optional[Any] = ..., date_signed: Optional[int] = ...) -> None: ...
|
||||
|
||||
class BadHeader(BadSignature):
|
||||
header = ... # type: Any
|
||||
@@ -58,7 +58,7 @@ class NoneAlgorithm(SigningAlgorithm):
|
||||
class HMACAlgorithm(SigningAlgorithm):
|
||||
default_digest_method = ... # type: Callable
|
||||
digest_method = ... # type: Callable
|
||||
def __init__(self, digest_method: Optional[Callable]=None) -> None: ...
|
||||
def __init__(self, digest_method: Optional[Callable] = ...) -> None: ...
|
||||
def get_signature(self, key: bytes_like, value: bytes_like) -> str: ...
|
||||
|
||||
class Signer:
|
||||
@@ -70,10 +70,10 @@ class Signer:
|
||||
key_derivation = ... # type: str
|
||||
digest_method = ... # type: Callable
|
||||
algorithm = ... # type: SigningAlgorithm
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like]=None, sep: Optional[str]='',
|
||||
key_derivation: Optional[str]=None,
|
||||
digest_method: Optional[Callable]=None,
|
||||
algorithm: Optional[SigningAlgorithm]=None) -> None: ...
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like] = ..., sep: Optional[str]='',
|
||||
key_derivation: Optional[str] = ...,
|
||||
digest_method: Optional[Callable] = ...,
|
||||
algorithm: Optional[SigningAlgorithm] = ...) -> None: ...
|
||||
def derive_key(self) -> str: ...
|
||||
def get_signature(self, value: bytes_like) -> str: ...
|
||||
def sign(self, value: bytes_like) -> str: ...
|
||||
@@ -85,8 +85,8 @@ class TimestampSigner(Signer):
|
||||
def get_timestamp(self) -> int: ...
|
||||
def timestamp_to_datetime(self, ts: int) -> datetime: ...
|
||||
def sign(self, value: bytes_like) -> str: ...
|
||||
def unsign(self, value: str, max_age: Optional[int]=None, return_timestamp=False) -> Any: ...
|
||||
def validate(self, signed_value: str, max_age: Optional[int]=None) -> bool: ...
|
||||
def unsign(self, value: str, max_age: Optional[int] = ..., return_timestamp=False) -> Any: ...
|
||||
def validate(self, signed_value: str, max_age: Optional[int] = ...) -> bool: ...
|
||||
|
||||
class Serializer:
|
||||
default_serializer = ... # type: Any
|
||||
@@ -97,21 +97,21 @@ 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]=b'', serializer=None, signer: Optional[Callable[..., Signer]]=None, signer_kwargs: Optional[MutableMapping]=None) -> None: ...
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like]=b'', serializer=None, signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ...) -> None: ...
|
||||
def load_payload(self, payload: Any, serializer=None) -> Any: ...
|
||||
def dump_payload(self, *args, **kwargs) -> str: ...
|
||||
def make_signer(self, salt: Optional[bytes_like]=None) -> Signer: ...
|
||||
def dumps(self, obj: Any, salt: Optional[bytes_like]=None) -> str: ...
|
||||
def dump(self, obj: Any, f: IO[str], salt: Optional[bytes_like]=None) -> None: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like]=None) -> Any: ...
|
||||
def load(self, f: IO[str], salt: Optional[bytes_like]=None): ...
|
||||
def loads_unsafe(self, s, salt: Optional[bytes_like]=None) -> Tuple[bool, Any]: ...
|
||||
def make_signer(self, salt: Optional[bytes_like] = ...) -> Signer: ...
|
||||
def dumps(self, obj: Any, salt: Optional[bytes_like] = ...) -> str: ...
|
||||
def dump(self, obj: Any, f: IO[str], salt: Optional[bytes_like] = ...) -> None: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like] = ...) -> Any: ...
|
||||
def load(self, f: IO[str], salt: Optional[bytes_like] = ...): ...
|
||||
def loads_unsafe(self, s, salt: Optional[bytes_like] = ...) -> Tuple[bool, Any]: ...
|
||||
def load_unsafe(self, f: IO[str], *args, **kwargs) -> Tuple[bool, Any]: ...
|
||||
|
||||
class TimedSerializer(Serializer):
|
||||
default_signer = ... # type: Callable[..., TimestampSigner]
|
||||
def loads(self, s: str, salt: Optional[bytes_like]=None, max_age: Optional[int]=None, return_timestamp=False) -> Any: ...
|
||||
def loads_unsafe(self, s: str, salt: Optional[bytes_like]=None, max_age: Optional[int]=None) -> Tuple[bool, Any]: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like] = ..., max_age: Optional[int] = ..., return_timestamp=False) -> Any: ...
|
||||
def loads_unsafe(self, s: str, salt: Optional[bytes_like] = ..., max_age: Optional[int] = ...) -> Tuple[bool, Any]: ...
|
||||
|
||||
class JSONWebSignatureSerializer(Serializer):
|
||||
jws_algorithms = ... # type: MutableMapping[str, SigningAlgorithm]
|
||||
@@ -119,22 +119,22 @@ 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]=None, serializer=None, signer: Optional[Callable[..., Signer]]=None, signer_kwargs: Optional[MutableMapping]=None, algorithm_name: Optional[str]=None) -> None: ...
|
||||
def __init__(self, secret_key: bytes_like, salt: Optional[bytes_like] = ..., serializer=None, signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ..., algorithm_name: Optional[str] = ...) -> None: ...
|
||||
def load_payload(self, payload: Any, return_header=False) -> Any: ...
|
||||
def dump_payload(self, *args, **kwargs) -> str: ...
|
||||
def make_algorithm(self, algorithm_name: str) -> SigningAlgorithm: ...
|
||||
def make_signer(self, salt: Optional[bytes_like]=None, algorithm_name: Optional[str]=None) -> Signer: ...
|
||||
def make_signer(self, salt: Optional[bytes_like] = ..., algorithm_name: Optional[str] = ...) -> Signer: ...
|
||||
def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ...
|
||||
def dumps(self, obj: Any, salt: Optional[bytes_like]=None, header_fields=Optional[MutableMapping]) -> str: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like]=None, return_header=False) -> Any: ...
|
||||
def loads_unsafe(self, s, salt: Optional[bytes_like]=None, return_header=False) -> Tuple[bool, Any]: ...
|
||||
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=False) -> Any: ...
|
||||
def loads_unsafe(self, s, salt: Optional[bytes_like] = ..., return_header=False) -> Tuple[bool, Any]: ...
|
||||
|
||||
class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer):
|
||||
DEFAULT_EXPIRES_IN = ... # type: int
|
||||
expires_in = ... # type: int
|
||||
def __init__(self, secret_key: bytes_like, expires_in: Optional[int]=None, **kwargs) -> None: ...
|
||||
def __init__(self, secret_key: bytes_like, expires_in: Optional[int] = ..., **kwargs) -> None: ...
|
||||
def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like]=None, return_header=False) -> Any: ...
|
||||
def loads(self, s: str, salt: Optional[bytes_like] = ..., return_header=False) -> Any: ...
|
||||
def get_issue_date(self, header: MutableMapping) -> Optional[datetime]: ...
|
||||
def now(self) -> int: ...
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class WebDriver:
|
||||
desired_capabilities: Capabilities=None,
|
||||
browser_profile=None,
|
||||
proxy=None,
|
||||
keep_alive: bool=False
|
||||
keep_alive: bool = ...
|
||||
) -> None: ...
|
||||
@property
|
||||
def mobile(self) -> Mobile: ...
|
||||
@@ -29,7 +29,7 @@ class WebDriver:
|
||||
w3c = ... # type: Any
|
||||
def start_session(self, desired_capabilities, browser_profile=None): ...
|
||||
def create_web_element(self, element_id: basestring) -> WebElement: ...
|
||||
def execute(self, driver_command: basestring, params: Optional[Dict[basestring, Any]]=None) -> ExecuteResult: ...
|
||||
def execute(self, driver_command: basestring, params: Optional[Dict[basestring, Any]] = ...) -> ExecuteResult: ...
|
||||
def get(self, url: basestring) -> None: ...
|
||||
@property
|
||||
def title(self) -> basestring: ...
|
||||
|
||||
@@ -5,7 +5,7 @@ SizeDict = Dict[str, int] # containing "height", "width"
|
||||
PointDict = Dict[str, int] # containing "x", "y"
|
||||
|
||||
class WebElement:
|
||||
def __init__(self, parent: WebDriver, id_: Optional[basestring], w3c: bool=False) -> None: ...
|
||||
def __init__(self, parent: WebDriver, id_: Optional[basestring], w3c: bool = ...) -> None: ...
|
||||
@property
|
||||
def tag_name(self) -> basestring: ...
|
||||
@property
|
||||
|
||||
4
third_party/2/werkzeug/wrappers.pyi
vendored
4
third_party/2/werkzeug/wrappers.pyi
vendored
@@ -20,7 +20,7 @@ class BaseRequest:
|
||||
disable_data_descriptor = ... # type: Any
|
||||
environ = ... # type: Mapping[str, object]
|
||||
shallow = ... # type: Any
|
||||
def __init__(self, environ: Mapping[basestring, object], populate_request: bool=True, shallow: bool=False) -> None: ...
|
||||
def __init__(self, environ: Mapping[basestring, object], populate_request: bool = ..., shallow: bool = ...) -> None: ...
|
||||
@property
|
||||
def url_charset(self) -> str: ...
|
||||
@classmethod
|
||||
@@ -37,7 +37,7 @@ class BaseRequest:
|
||||
input_stream = ... # type: Any
|
||||
args = ... # type: ImmutableMultiDict
|
||||
def data(self): ...
|
||||
def get_data(self, cache: bool=True, as_text: bool=False, parse_form_data: bool=False) -> str: ...
|
||||
def get_data(self, cache: bool = ..., as_text: bool = ..., parse_form_data: bool = ...) -> str: ...
|
||||
form = ... # type: ImmutableMultiDict
|
||||
values = ... # type: CombinedMultiDict
|
||||
files = ... # type: MultiDict
|
||||
|
||||
Reference in New Issue
Block a user