diff --git a/third_party/2/werkzeug/wrappers.pyi b/third_party/2/werkzeug/wrappers.pyi index 97cdc2c2f..620fdd723 100644 --- a/third_party/2/werkzeug/wrappers.pyi +++ b/third_party/2/werkzeug/wrappers.pyi @@ -4,7 +4,7 @@ from typing import ( Tuple, Type, TypeVar, Union, ) -from wsgiref.types import WSGIEnvironment +from wsgiref.types import WSGIEnvironment, InputStream from .datastructures import ( CombinedMultiDict, EnvironHeaders, Headers, ImmutableMultiDict, @@ -37,8 +37,9 @@ class BaseRequest: def close(self) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_value, tb): ... - def stream(self): ... - input_stream = ... # type: Any + @property + def stream(self) -> InputStream: ... + input_stream: InputStream args = ... # type: ImmutableMultiDict @property def data(self) -> bytes: ... @@ -169,7 +170,8 @@ class ResponseStream: def encoding(self): ... class ResponseStreamMixin: - def stream(self): ... + @property + def stream(self) -> ResponseStream: ... class CommonRequestDescriptorsMixin: @property diff --git a/third_party/2/werkzeug/wsgi.pyi b/third_party/2/werkzeug/wsgi.pyi index 77722edf4..5adc153cc 100644 --- a/third_party/2/werkzeug/wsgi.pyi +++ b/third_party/2/werkzeug/wsgi.pyi @@ -1,11 +1,12 @@ -from typing import Any +from typing import Any, Optional +from wsgiref.types import WSGIEnvironment, InputStream def responder(f): ... def get_current_url(environ, root_only=False, strip_querystring=False, host_only=False, trusted_hosts=None): ... def host_is_trusted(hostname, trusted_list): ... def get_host(environ, trusted_hosts=None): ... -def get_content_length(environ): ... -def get_input_stream(environ, safe_fallback=True): ... +def get_content_length(environ: WSGIEnvironment) -> Optional[int]: ... +def get_input_stream(environ: WSGIEnvironment, safe_fallback: bool = ...) -> InputStream: ... def get_query_string(environ): ... def get_path_info(environ, charset='', errors=''): ... def get_script_name(environ, charset='', errors=''): ... diff --git a/third_party/3/werkzeug/wrappers.pyi b/third_party/3/werkzeug/wrappers.pyi index c3cb32e5a..c6c5389fb 100644 --- a/third_party/3/werkzeug/wrappers.pyi +++ b/third_party/3/werkzeug/wrappers.pyi @@ -3,7 +3,7 @@ from typing import ( Any, Callable, Iterable, Iterator, Mapping, MutableMapping, Optional, Sequence, Text, Tuple, Type, TypeVar, Union, ) -from wsgiref.types import WSGIEnvironment +from wsgiref.types import WSGIEnvironment, InputStream from .datastructures import ( CombinedMultiDict, EnvironHeaders, Headers, ImmutableMultiDict, @@ -36,8 +36,9 @@ class BaseRequest: def close(self) -> None: ... def __enter__(self): ... def __exit__(self, exc_type, exc_value, tb): ... - def stream(self): ... - input_stream = ... # type: Any + @property + def stream(self) -> InputStream: ... + input_stream: InputStream args = ... # type: ImmutableMultiDict @property def data(self) -> bytes: ... @@ -168,7 +169,8 @@ class ResponseStream: def encoding(self): ... class ResponseStreamMixin: - def stream(self): ... + @property + def stream(self) -> ResponseStream: ... class CommonRequestDescriptorsMixin: @property diff --git a/third_party/3/werkzeug/wsgi.pyi b/third_party/3/werkzeug/wsgi.pyi index 77722edf4..5adc153cc 100644 --- a/third_party/3/werkzeug/wsgi.pyi +++ b/third_party/3/werkzeug/wsgi.pyi @@ -1,11 +1,12 @@ -from typing import Any +from typing import Any, Optional +from wsgiref.types import WSGIEnvironment, InputStream def responder(f): ... def get_current_url(environ, root_only=False, strip_querystring=False, host_only=False, trusted_hosts=None): ... def host_is_trusted(hostname, trusted_list): ... def get_host(environ, trusted_hosts=None): ... -def get_content_length(environ): ... -def get_input_stream(environ, safe_fallback=True): ... +def get_content_length(environ: WSGIEnvironment) -> Optional[int]: ... +def get_input_stream(environ: WSGIEnvironment, safe_fallback: bool = ...) -> InputStream: ... def get_query_string(environ): ... def get_path_info(environ, charset='', errors=''): ... def get_script_name(environ, charset='', errors=''): ...