fix return type for itsdangerous.Signer.unsign (#2029)

Fixes #2011

Also fixed the argument type (it doesn't accept str).
This commit is contained in:
Jelle Zijlstra
2018-04-09 12:00:41 -07:00
committed by Guido van Rossum
parent b472130201
commit 6862434eae

View File

@@ -1,7 +1,7 @@
from datetime import datetime
from typing import Any, Callable, IO, MutableMapping, Optional, Text, Tuple, TypeVar, Union
PY2 = ... # type: bool
PY2: bool
text_type = str
int_to_byte = Callable[[int], bytes]
number_types = (int, float)
@@ -82,7 +82,7 @@ class Signer:
def get_signature(self, value: _bytes_like) -> bytes: ...
def sign(self, value: _bytes_like) -> bytes: ...
def verify_signature(self, value: _bytes_like, sig: _can_become_bytes) -> bool: ...
def unsign(self, signed_value: _can_become_bytes) -> str: ...
def unsign(self, signed_value: _bytes_like) -> bytes: ...
def validate(self, signed_value: _can_become_bytes) -> bool: ...
class TimestampSigner(Signer):