Skip to content

Commit

Permalink
fix: C0209: Formatting a regular string which could be a f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
esolitos committed Jan 3, 2024
1 parent 5f11ef5 commit 608737c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions swa/spotifyoauthredis.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ def spotify_oauth(email: str) -> spotipy.SpotifyOAuth:
'-'.join(('swa-user', email)),
)
else:
cache_handler = spotipy.oauth2.CacheFileHandler(
cache_path='.cache/user-%s' %
hashlib.sha1(
email.encode(),
usedforsecurity=False).hexdigest())
cache_path = f'.cache/user-{hashlib.sha1(email.encode()).hexdigest()}'
cache_handler = spotipy.oauth2.CacheFileHandler(cache_path)

return spotipy.SpotifyOAuth(
client_id=client_id,
Expand Down

0 comments on commit 608737c

Please sign in to comment.