Temporary workaround for pallets/werkzeug#1052

Starting with python/mypy#2521 mypy is performing stricter function signature
checks.

This makes the stubs diverge from the actual implementation but makes the stubs
internally consistent.  Since this is an actual typing issue in the base
implementation, we need to defer to the original authors to fix it.
This commit is contained in:
Lukasz Langa
2016-12-22 14:53:04 -08:00
parent 27f4185d06
commit 576ada74c6

View File

@@ -94,7 +94,7 @@ class BaseResponse:
def close(self): ...
def __enter__(self): ...
def __exit__(self, exc_type, exc_value, tb): ...
def freeze(self, **kwargs): ...
def freeze(self): ...
def get_wsgi_headers(self, environ): ...
def get_app_iter(self, environ): ...
def get_wsgi_response(self, environ): ...
@@ -191,4 +191,4 @@ class WWWAuthenticateMixin:
class Request(BaseRequest, AcceptMixin, ETagRequestMixin, UserAgentMixin, AuthorizationMixin, CommonRequestDescriptorsMixin): ...
class PlainRequest(StreamOnlyMixin, Request): ...
class Response(BaseResponse, ETagResponseMixin, ResponseStreamMixin, CommonResponseDescriptorsMixin, WWWAuthenticateMixin): ...
class Response(ETagResponseMixin, BaseResponse, ResponseStreamMixin, CommonResponseDescriptorsMixin, WWWAuthenticateMixin): ... # FIXME: This is invalid but works around https://github.com/pallets/werkzeug/issues/1052