Skip to content

Commit

Permalink
Temporary workaround for pallets/werkzeug#1052
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Lukasz Langa committed Dec 22, 2016
1 parent 27f4185 commit 576ada7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions third_party/2/werkzeug/wrappers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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): ...
Expand Down Expand Up @@ -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

0 comments on commit 576ada7

Please sign in to comment.