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 Aug 15, 2022
1 parent cee893f commit 942e080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avatar/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def cached_func(user, width=None, height=None, **kwargs):
result = func(user, width or default_size, height, **kwargs)
cache_set(key, result)
# add image size to set of cached sizes so we can invalidate them later
sizes_key = get_cache_key(user, '', prefix='cached_sizes')
sizes_key = get_cache_key(user, "", prefix="cached_sizes")
sizes = cache.get(sizes_key, set())
sizes.add((width or default_size, height or width))
cache_set(sizes_key, sizes)
Expand All @@ -83,7 +83,7 @@ def invalidate_cache(user, width=None, height=None):
"""
Function to be called when saving or changing a user's avatars.
"""
sizes_key = get_cache_key(user, '', prefix='cached_sizes')
sizes_key = get_cache_key(user, "", prefix="cached_sizes")
sizes = cache.get(sizes_key, set())
if width is not None:
sizes.add((width, height or width))
Expand Down

0 comments on commit 942e080

Please sign in to comment.