From e5455d96cf8bcbf2bb75cfa65315cb39730db7a3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 18:15:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- more/itsdangerous/identity_policy.py | 6 +++--- more/itsdangerous/tests/test_identity_policy.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/more/itsdangerous/identity_policy.py b/more/itsdangerous/identity_policy.py index 07eb945..362a13a 100644 --- a/more/itsdangerous/identity_policy.py +++ b/more/itsdangerous/identity_policy.py @@ -49,7 +49,7 @@ def secret(self): @property def identity_class(self): - """ The identity class to use. """ + """The identity class to use.""" return morepath.Identity @property @@ -104,13 +104,13 @@ def identify(self, request): return self.identity_class(userid, **signatures) def remember(self, response, request, identity): - """ Stores the given identity in the cookies of the response. """ + """Stores the given identity in the cookies of the response.""" for key in self.required_keys: signed_value = self.sign(getattr(identity, key), salt=key) response.set_cookie(key, signed_value, **self.cookie_settings) def forget(self, response, request): - """ Removes the identity from the cookies, basically forgetting it. """ + """Removes the identity from the cookies, basically forgetting it.""" for key in self.required_keys: response.delete_cookie(key) diff --git a/more/itsdangerous/tests/test_identity_policy.py b/more/itsdangerous/tests/test_identity_policy.py index 4477f1e..7630b44 100644 --- a/more/itsdangerous/tests/test_identity_policy.py +++ b/more/itsdangerous/tests/test_identity_policy.py @@ -30,7 +30,6 @@ def test_signatures(): def test_expired_signature(): - ip = IdentityPolicy(max_age=0.1) signed = ip.sign("admin", "username")