-
-
Notifications
You must be signed in to change notification settings - Fork 228
Closed
Milestone
Description
Mypy recently introduced stricter checks for function signature compatibility (python/mypy#2521). Since itsdangerous
is included in the typeshed library with typing stubs, it found an issue with the signatures of load_payload
. Consider:
class Serializer:
def load_payload(self, payload, serializer=None): ...
vs.
class JSONWebSignatureSerializer(Serializer):
def load_payload(self, payload, return_header=False): ...
vs.
class URLSafeSerializerMixin(object):
def load_payload(self, payload): ...
class URLSafeSerializer(URLSafeSerializerMixin, Serializer): ...
class TimedSerializer(Serializer): ...
class URLSafeTimedSerializer(URLSafeSerializerMixin, TimedSerializer): ...
Basically, it's invalid to replace load_payload()
accepting an optional kwarg with an implementation that doesn't.
Metadata
Metadata
Assignees
Labels
No labels