Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 12, 2023
1 parent 75c19ec commit e5455d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions more/itsdangerous/identity_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion more/itsdangerous/tests/test_identity_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def test_signatures():


def test_expired_signature():

ip = IdentityPolicy(max_age=0.1)
signed = ip.sign("admin", "username")

Expand Down

0 comments on commit e5455d9

Please sign in to comment.