From 4c6c2737b073b31f0fc053b32f3f9fc9f8e13ea2 Mon Sep 17 00:00:00 2001 From: Lukasz Langa Date: Thu, 22 Dec 2016 14:26:29 -0800 Subject: [PATCH] Temporary workaround for pallets/itsdangerous#74 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. --- third_party/2/itsdangerous.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/2/itsdangerous.pyi b/third_party/2/itsdangerous.pyi index 186d53184..35ed9a709 100644 --- a/third_party/2/itsdangerous.pyi +++ b/third_party/2/itsdangerous.pyi @@ -143,7 +143,7 @@ class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer): def now(self) -> int: ... class URLSafeSerializerMixin: - def load_payload(self, payload: Any, **kwargs) -> Any: ... + def load_payload(self, payload: Any, serializer=None, return_header=False, **kwargs) -> Any: ... # FIXME: This is invalid but works around https://github.com/pallets/itsdangerous/issues/74 def dump_payload(self, *args, **kwargs) -> str: ... class URLSafeSerializer(URLSafeSerializerMixin, Serializer):