Skip to content

Commit 4c6c273

Browse files
author
Lukasz Langa
committed
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.
1 parent 7c706e1 commit 4c6c273

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/2/itsdangerous.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer):
143143
def now(self) -> int: ...
144144

145145
class URLSafeSerializerMixin:
146-
def load_payload(self, payload: Any, **kwargs) -> Any: ...
146+
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
147147
def dump_payload(self, *args, **kwargs) -> str: ...
148148

149149
class URLSafeSerializer(URLSafeSerializerMixin, Serializer):

0 commit comments

Comments
 (0)