From 6862434eae32232d2341ce8face4b5105e3e7ce2 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 9 Apr 2018 12:00:41 -0700 Subject: [PATCH] fix return type for itsdangerous.Signer.unsign (#2029) Fixes #2011 Also fixed the argument type (it doesn't accept str). --- third_party/3/itsdangerous.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/3/itsdangerous.pyi b/third_party/3/itsdangerous.pyi index 445c998b3..96d7ccfee 100644 --- a/third_party/3/itsdangerous.pyi +++ b/third_party/3/itsdangerous.pyi @@ -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):