From 5969be9e0c3a107f83386ff0f582f4d91cb56ebc Mon Sep 17 00:00:00 2001 From: ilan Date: Tue, 20 Feb 2018 14:06:23 +0100 Subject: [PATCH] Linting --- django_q/core_signing.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/django_q/core_signing.py b/django_q/core_signing.py index c433c83..d882880 100644 --- a/django_q/core_signing.py +++ b/django_q/core_signing.py @@ -4,19 +4,20 @@ import datetime import time import zlib +from django.core.signing import BadSignature, SignatureExpired, b64_decode, JSONSerializer, \ + Signer as Sgnr, TimestampSigner as TsS, dumps from django.utils import baseconv from django.utils.crypto import constant_time_compare from django.utils.encoding import force_bytes, force_str, force_text -from django.core.signing import BadSignature, SignatureExpired, b64_decode, JSONSerializer, \ - Signer as Sgnr, TimestampSigner as TsS, dumps dumps = dumps - """ The loads function is the same as the `django.core.signing.loads` function The difference is that `this` loads function calls `TimestampSigner` and `Signer` """ + + def loads(s, key=None, salt='django.core.signing', serializer=JSONSerializer, max_age=None): """ Reverse of dumps(), raise BadSignature if signature fails. @@ -55,6 +56,8 @@ class Signer(Sgnr): TimestampSigner is also the same as `django.core.signing.TimestampSigner` but is calling `this` Signer. """ + + class TimestampSigner(Signer, TsS): def unsign(self, value, max_age=None):