Skip to content

Commit

Permalink
Fix JSONWebSignatureSerializer.load_dangerous() signature to satisfy …
Browse files Browse the repository at this point in the history
…mypy. (#1135)

The latest mypy complained that the signature didn't match that in the
superclass: Serializer.load_payload() has a serializer argument.  I
don't know this project but I think it's best to just add that
argument (rather than adding `# type: ignore`).
  • Loading branch information
gvanrossum authored and JelleZijlstra committed Apr 4, 2017
1 parent 35b6795 commit 3594b0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/3/itsdangerous.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class JSONWebSignatureSerializer(Serializer):
algorithm_name = ... # type: str
algorithm = ... # type: Any
def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes]=None, serializer: _serializer=None, signer: Optional[Callable[..., Signer]]=None, signer_kwargs: Optional[MutableMapping]=None, algorithm_name: Optional[str]=None) -> None: ...
def load_payload(self, payload: Any, return_header: bool=False) -> Any: ...
def load_payload(self, payload: Any, serializer: _serializer = None, return_header: bool=False) -> Any: ...
def dump_payload(self, *args, **kwargs) -> bytes: ...
def make_algorithm(self, algorithm_name: str) -> SigningAlgorithm: ...
def make_signer(self, salt: Optional[_can_become_bytes]=None, algorithm_name: Optional[str]=None) -> Signer: ...
Expand Down

0 comments on commit 3594b0e

Please sign in to comment.