diff --git a/stdlib/2/shelve.pyi b/stdlib/2/shelve.pyi index b387a0cad..d7d9b8c60 100644 --- a/stdlib/2/shelve.pyi +++ b/stdlib/2/shelve.pyi @@ -9,7 +9,7 @@ class Shelf(collections.MutableMapping): def __len__(self) -> int: ... def has_key(self, key: Any) -> bool: ... def __contains__(self, key: Any) -> bool: ... - def get(self, key: Any, default: Any = None) -> Any: ... + def get(self, key: Any, default: Any = ...) -> Any: ... def __getitem__(self, key: Any) -> Any: ... def __setitem__(self, key: Any, value: Any) -> None: ... def __delitem__(self, key: Any) -> None: ... diff --git a/stdlib/2/typing.pyi b/stdlib/2/typing.pyi index 6caffbbf7..43a66bfdc 100644 --- a/stdlib/2/typing.pyi +++ b/stdlib/2/typing.pyi @@ -115,7 +115,7 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]): @abstractmethod def throw(self, typ: Type[BaseException], val: Optional[BaseException] = ..., # TODO: tb should be TracebackType but that's defined in types - tb: Any = None) -> _T_co: ... + tb: Any = ...) -> _T_co: ... @abstractmethod def close(self) -> None: ... diff --git a/stdlib/2/urllib2.pyi b/stdlib/2/urllib2.pyi index d278badfc..64ee2021a 100644 --- a/stdlib/2/urllib2.pyi +++ b/stdlib/2/urllib2.pyi @@ -128,7 +128,7 @@ class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler): def http_error_407(self, req, fp, code, msg, headers): ... class AbstractHTTPHandler(BaseHandler): - def __init__(self, debuglevel: int=0) -> None: ... + def __init__(self, debuglevel: int = ...) -> None: ... def do_request_(self, request): ... def do_open(self, http_class, req): ... diff --git a/stdlib/2and3/fractions.pyi b/stdlib/2and3/fractions.pyi index d98166077..e02b5e767 100644 --- a/stdlib/2and3/fractions.pyi +++ b/stdlib/2and3/fractions.pyi @@ -25,8 +25,8 @@ def gcd(a: Integral, b: Integral) -> Integral: ... class Fraction(Rational): @overload def __init__(self, - numerator: Union[int, Rational] = 0, - denominator: Optional[Union[int, Rational]] = 0, + numerator: Union[int, Rational] = ..., + denominator: Optional[Union[int, Rational]] = ..., *, _normalize: bool = ...) -> None: ... @overload diff --git a/stdlib/3/_importlib_modulespec.pyi b/stdlib/3/_importlib_modulespec.pyi index 1480ced46..4ce627836 100644 --- a/stdlib/3/_importlib_modulespec.pyi +++ b/stdlib/3/_importlib_modulespec.pyi @@ -12,7 +12,7 @@ from typing import Any, Dict, List, Optional if sys.version_info >= (3, 4): class ModuleSpec: def __init__(self, name: str, loader: Optional['Loader'], *, - origin: Optional[str] = ..., loader_state: Any = None, + origin: Optional[str] = ..., loader_state: Any = ..., is_package: Optional[bool] = ...) -> None: ... name = ... # type: str loader = ... # type: Optional[Loader] diff --git a/stdlib/3/shelve.pyi b/stdlib/3/shelve.pyi index 8680fd13c..4a339692c 100644 --- a/stdlib/3/shelve.pyi +++ b/stdlib/3/shelve.pyi @@ -7,7 +7,7 @@ class Shelf(collections.MutableMapping): def __iter__(self) -> Iterator[str]: ... def __len__(self) -> int: ... def __contains__(self, key: Any) -> bool: ... # key should be str, but it would conflict with superclass's type signature - def get(self, key: str, default: Any = None) -> Any: ... + def get(self, key: str, default: Any = ...) -> Any: ... def __getitem__(self, key: str) -> Any: ... def __setitem__(self, key: str, value: Any) -> None: ... def __delitem__(self, key: str) -> None: ... diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index 414ce466c..2d59d88d9 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -181,7 +181,7 @@ if sys.version_info >= (3, 6): @abstractmethod def athrow(self, typ: Type[BaseException], val: Optional[BaseException] = ..., - tb: Any = None) -> Awaitable[_T_co]: ... + tb: Any = ...) -> Awaitable[_T_co]: ... @abstractmethod def aclose(self) -> Awaitable[_T_co]: ... diff --git a/stdlib/3/unittest/mock.pyi b/stdlib/3/unittest/mock.pyi index 88c8bfa80..48093255d 100644 --- a/stdlib/3/unittest/mock.pyi +++ b/stdlib/3/unittest/mock.pyi @@ -38,9 +38,9 @@ if sys.version_info >= (3, 3): # expecting other classes (as is Mock's purpose) class NonCallableMock(Any): # type: ignore def __new__(cls, *args: Any, **kw: Any) -> Any: ... - def __init__(self, spec: Optional[Any] = ..., wraps: Optional[Any] = ..., name: Optional[Any] = ..., spec_set: Optional[Any] = ..., parent: Optional[Any] = ..., _spec_state: Optional[Any] = ..., _new_name: Any = ..., _new_parent: Optional[Any] = ..., _spec_as_instance: Any = False, _eat_self: Optional[Any] = ..., unsafe: Any = False, **kwargs: Any) -> None: ... + def __init__(self, spec: Optional[Any] = ..., wraps: Optional[Any] = ..., name: Optional[Any] = ..., spec_set: Optional[Any] = ..., parent: Optional[Any] = ..., _spec_state: Optional[Any] = ..., _new_name: Any = ..., _new_parent: Optional[Any] = ..., _spec_as_instance: Any = ..., _eat_self: Optional[Any] = ..., unsafe: Any = ..., **kwargs: Any) -> None: ... def attach_mock(self, mock: Any, attribute: Any) -> Any: ... - def mock_add_spec(self, spec: Any, spec_set: Any = False) -> Any: ... + def mock_add_spec(self, spec: Any, spec_set: Any = ...) -> Any: ... return_value = ... # type: Any __class__ = ... # type: type called = ... # type: Any @@ -108,7 +108,7 @@ if sys.version_info >= (3, 3): in_dict = ... # type: Any values = ... # type: Any clear = ... # type: Any - def __init__(self, in_dict: Any, values: Any = ..., clear: Any = False, **kwargs: Any) -> None: ... + def __init__(self, in_dict: Any, values: Any = ..., clear: Any = ..., **kwargs: Any) -> None: ... def __call__(self, f: Any) -> Any: ... def decorate_class(self, klass: Any) -> Any: ... def __enter__(self) -> Any: ... @@ -121,11 +121,11 @@ if sys.version_info >= (3, 3): class NonCallableMagicMock(MagicMixin, NonCallableMock): def __init__(self) -> None: ... - def mock_add_spec(self, spec: Any, spec_set: Any = False) -> Any: ... + def mock_add_spec(self, spec: Any, spec_set: Any = ...) -> Any: ... class MagicMock(MagicMixin, Mock): def __init__(self, spec: Any = ..., spec_set: Any = ..., side_effect: Any = ..., return_value: Any = ..., wraps: Any = ..., name: Any = ..., **kwargs: Any) -> None: ... - def mock_add_spec(self, spec: Any, spec_set: Any = False) -> Any: ... + def mock_add_spec(self, spec: Any, spec_set: Any = ...) -> Any: ... class MagicProxy: name = ... # type: Any @@ -157,7 +157,7 @@ if sys.version_info >= (3, 3): call = ... # type: Any - def create_autospec(spec: Any, spec_set: Any = False, instance: Any = False, _parent: Optional[Any] = ..., _name: Optional[Any] = ..., **kwargs: Any) -> Any: ... + def create_autospec(spec: Any, spec_set: Any = ..., instance: Any = ..., _parent: Optional[Any] = ..., _name: Optional[Any] = ..., **kwargs: Any) -> Any: ... class _SpecState: spec = ... # type: Any @@ -166,7 +166,7 @@ if sys.version_info >= (3, 3): parent = ... # type: Any instance = ... # type: Any name = ... # type: Any - def __init__(self, spec: Any, spec_set: Any = False, parent: Optional[Any] = ..., name: Optional[Any] = ..., ids: Optional[Any] = ..., instance: Any = False) -> None: ... + def __init__(self, spec: Any, spec_set: Any = ..., parent: Optional[Any] = ..., name: Optional[Any] = ..., ids: Optional[Any] = ..., instance: Any = ...) -> None: ... def mock_open(mock: Optional[Any] = ..., read_data: Any = ...) -> Any: ... diff --git a/third_party/2/itsdangerous.pyi b/third_party/2/itsdangerous.pyi index 075a2e402..0f656366b 100644 --- a/third_party/2/itsdangerous.pyi +++ b/third_party/2/itsdangerous.pyi @@ -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: ... diff --git a/third_party/2/selenium/webdriver/remote/webdriver.pyi b/third_party/2/selenium/webdriver/remote/webdriver.pyi index c8e565cfb..66c6e3995 100644 --- a/third_party/2/selenium/webdriver/remote/webdriver.pyi +++ b/third_party/2/selenium/webdriver/remote/webdriver.pyi @@ -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: ... diff --git a/third_party/2/selenium/webdriver/remote/webelement.pyi b/third_party/2/selenium/webdriver/remote/webelement.pyi index fd94c56f1..6cc6d72f5 100644 --- a/third_party/2/selenium/webdriver/remote/webelement.pyi +++ b/third_party/2/selenium/webdriver/remote/webelement.pyi @@ -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 diff --git a/third_party/2/werkzeug/wrappers.pyi b/third_party/2/werkzeug/wrappers.pyi index 47f138cd9..98b258241 100644 --- a/third_party/2/werkzeug/wrappers.pyi +++ b/third_party/2/werkzeug/wrappers.pyi @@ -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 diff --git a/third_party/2and3/atomicwrites/__init__.pyi b/third_party/2and3/atomicwrites/__init__.pyi index 34224a735..3ec566a4f 100644 --- a/third_party/2and3/atomicwrites/__init__.pyi +++ b/third_party/2and3/atomicwrites/__init__.pyi @@ -6,7 +6,7 @@ from typing import Any, AnyStr, Callable, ContextManager, IO, Iterator, Optional def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ... def move_atomic(src: AnyStr, dst: AnyStr) -> None: ... class AtomicWriter(object): - def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool=False) -> None: ... + def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool = ...) -> None: ... def open(self) -> ContextManager[IO]: ... def _open(self, get_fileobject: Callable) -> ContextManager[IO]: ... def get_fileobject(self, dir: Optional[AnyStr] = ..., **kwargs) -> IO: ... diff --git a/third_party/2and3/click/core.pyi b/third_party/2and3/click/core.pyi index 0a8fa8e17..417a98609 100644 --- a/third_party/2and3/click/core.pyi +++ b/third_party/2and3/click/core.pyi @@ -121,7 +121,7 @@ class Context: def abort(self) -> None: ... - def exit(self, code: Union[int, str] = 0) -> None: + def exit(self, code: Union[int, str] = ...) -> None: ... def get_usage(self) -> str: diff --git a/third_party/2and3/click/termui.pyi b/third_party/2and3/click/termui.pyi index edbd34762..abe49b124 100644 --- a/third_party/2and3/click/termui.pyi +++ b/third_party/2and3/click/termui.pyi @@ -107,7 +107,7 @@ def unstyle(text: str) -> str: def secho( text: str, file: Optional[IO] = ..., - nl: bool =True, + nl: bool = ..., err: bool = ..., color: Optional[bool] = ..., fg: Optional[str] = ..., diff --git a/third_party/2and3/pymysql/connections.pyi b/third_party/2and3/pymysql/connections.pyi index dd8b5e01f..098c17708 100644 --- a/third_party/2and3/pymysql/connections.pyi +++ b/third_party/2and3/pymysql/connections.pyi @@ -96,7 +96,7 @@ class Connection: def rollback(self): ... def escape(self, obj): ... def literal(self, obj): ... - def cursor(self, cursor: Optional[Type[Cursor]]=None): ... + def cursor(self, cursor: Optional[Type[Cursor]] = ...): ... def __enter__(self): ... def __exit__(self, exc, value, traceback): ... def query(self, sql): ... diff --git a/third_party/2and3/requests/adapters.pyi b/third_party/2and3/requests/adapters.pyi index 7e6167c38..fe7e1162b 100644 --- a/third_party/2and3/requests/adapters.pyi +++ b/third_party/2and3/requests/adapters.pyi @@ -44,10 +44,10 @@ DEFAULT_RETRIES = ... # type: Any class BaseAdapter: def __init__(self) -> None: ... - def send(self, request: PreparedRequest, stream: bool=False, - timeout: Union[None, float, Tuple[float, float]]=None, - verify: bool=False, - cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]]=None + def send(self, request: PreparedRequest, stream: bool = ..., + timeout: Union[None, float, Tuple[float, float]] = ..., + verify: bool = ..., + cert: Union[None, Union[bytes, Text], Container[Union[bytes, Text]]] = ... ) -> Response: ... def close(self) -> None: ... class HTTPAdapter(BaseAdapter): diff --git a/third_party/3/itsdangerous.pyi b/third_party/3/itsdangerous.pyi index 4ed0402e9..097f98316 100644 --- a/third_party/3/itsdangerous.pyi +++ b/third_party/3/itsdangerous.pyi @@ -30,15 +30,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: str, payload: Optional[Any]=None, date_signed: Optional[int]=None) -> None: ... + def __init__(self, message: str, payload: Optional[Any] = ..., date_signed: Optional[int] = ...) -> None: ... class BadHeader(BadSignature): header = ... # type: Any @@ -62,7 +62,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) -> bytes: ... class Signer: @@ -74,10 +74,10 @@ 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]=None, sep: Optional[_can_become_bytes]='', - key_derivation: Optional[str]=None, - digest_method: Optional[Callable]=None, - algorithm: Optional[SigningAlgorithm]=None) -> None: ... + 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: ... def derive_key(self) -> bytes: ... def get_signature(self, value: _bytes_like) -> bytes: ... def sign(self, value: _bytes_like) -> bytes: ... @@ -89,8 +89,8 @@ class TimestampSigner(Signer): def get_timestamp(self) -> int: ... def timestamp_to_datetime(self, ts: int) -> datetime: ... def sign(self, value: _bytes_like) -> bytes: ... - def unsign(self, value: _can_become_bytes, max_age: Optional[int]=None, return_timestamp: bool=False) -> Any: ... - def validate(self, signed_value: _can_become_bytes, max_age: Optional[int]=None) -> bool: ... + def unsign(self, value: _can_become_bytes, max_age: Optional[int] = ..., return_timestamp: bool = ...) -> Any: ... + def validate(self, signed_value: _can_become_bytes, max_age: Optional[int] = ...) -> bool: ... class Serializer: default_serializer = ... # type: _serializer @@ -101,21 +101,21 @@ 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]=b'', serializer: _serializer=None, signer: Optional[Callable[..., Signer]]=None, signer_kwargs: Optional[MutableMapping]=None) -> None: ... + def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes]=b'', serializer: _serializer=None, signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ...) -> None: ... def load_payload(self, payload: Any, serializer: _serializer=None) -> Any: ... def dump_payload(self, *args, **kwargs) -> bytes: ... - def make_signer(self, salt: Optional[_can_become_bytes]=None) -> Signer: ... - def dumps(self, obj: Any, salt: Optional[_can_become_bytes]=None) -> _str_like: ... - def dump(self, obj: Any, f: IO, salt: Optional[_can_become_bytes]=None) -> None: ... - def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes]=None) -> Any: ... - def load(self, f: IO, salt: Optional[_can_become_bytes]=None): ... - def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes]=None) -> Tuple[bool, Any]: ... + def make_signer(self, salt: Optional[_can_become_bytes] = ...) -> Signer: ... + def dumps(self, obj: Any, salt: Optional[_can_become_bytes] = ...) -> _str_like: ... + def dump(self, obj: Any, f: IO, salt: Optional[_can_become_bytes] = ...) -> None: ... + def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ...) -> Any: ... + def load(self, f: IO, salt: Optional[_can_become_bytes] = ...): ... + def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ...) -> Tuple[bool, Any]: ... def load_unsafe(self, f: IO, *args, **kwargs) -> Tuple[bool, Any]: ... class TimedSerializer(Serializer): default_signer = ... # type: Callable[..., TimestampSigner] - def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes]=None, max_age: Optional[int]=None, return_timestamp: bool=False) -> Any: ... - def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes]=None, max_age: Optional[int]=None) -> 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,22 +123,22 @@ 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]=None, serializer: _serializer=None, signer: Optional[Callable[..., Signer]]=None, signer_kwargs: Optional[MutableMapping]=None, algorithm_name: Optional[str]=None) -> None: ... - def load_payload(self, payload: Any, serializer: _serializer = None, return_header: bool=False) -> Any: ... + def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., serializer: _serializer=None, signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ..., algorithm_name: Optional[str] = ...) -> None: ... + def load_payload(self, payload: Any, serializer: _serializer = None, 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]=None, algorithm_name: Optional[str]=None) -> Signer: ... + 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]=None, header_fields: Optional[MutableMapping]=...) -> str: ... - def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes]=None, return_header: bool=False) -> Any: ... - def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes]=None, return_header: bool=False) -> Tuple[bool, Any]: ... + 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]: ... class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer): DEFAULT_EXPIRES_IN = ... # type: int expires_in = ... # type: int - def __init__(self, secret_key: _can_become_bytes, expires_in: Optional[int]=None, **kwargs) -> None: ... + def __init__(self, secret_key: _can_become_bytes, expires_in: Optional[int] = ..., **kwargs) -> None: ... def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ... - def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes]=None, return_header: bool=False) -> Any: ... + 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: ... diff --git a/third_party/3/werkzeug/wrappers.pyi b/third_party/3/werkzeug/wrappers.pyi index 5333d7ce4..676d1be4c 100644 --- a/third_party/3/werkzeug/wrappers.pyi +++ b/third_party/3/werkzeug/wrappers.pyi @@ -20,7 +20,7 @@ class BaseRequest: disable_data_descriptor = ... # type: Any environ = ... # type: Mapping[str, object] shallow = ... # type: Any - def __init__(self, environ: Mapping[str, object], populate_request: bool=True, shallow: bool=False) -> None: ... + def __init__(self, environ: Mapping[str, 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) -> bytes: ... + def get_data(self, cache: bool = ..., as_text: bool = ..., parse_form_data: bool = ...) -> bytes: ... form = ... # type: ImmutableMultiDict values = ... # type: CombinedMultiDict files = ... # type: MultiDict @@ -76,14 +76,14 @@ class BaseResponse: status = ... # type: str direct_passthrough = ... # type: bool response = ... # type: Iterable[bytes] - def __init__(self, response: Optional[Union[Iterable[bytes], bytes]]=None, - status: Optional[Union[str, int]]=None, + def __init__(self, response: Optional[Union[Iterable[bytes], bytes]] = ..., + status: Optional[Union[str, int]] = ..., headers: Optional[Union[Headers, Mapping[str, str], Sequence[Tuple[str, str]]]]=None, mimetype: Optional[str] = ..., content_type: Optional[str] = ..., - direct_passthrough: bool=False) -> None: ... + direct_passthrough: bool = ...) -> None: ... def call_on_close(self, func): ... @classmethod def force_type(cls, response, environ=None): ...