Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit 608737c

Browse files
author
Marlon (esolitos) Saglia
committed
fix: C0209: Formatting a regular string which could be a f-string
1 parent 5f11ef5 commit 608737c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

swa/spotifyoauthredis.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,8 @@ def spotify_oauth(email: str) -> spotipy.SpotifyOAuth:
4343
'-'.join(('swa-user', email)),
4444
)
4545
else:
46-
cache_handler = spotipy.oauth2.CacheFileHandler(
47-
cache_path='.cache/user-%s' %
48-
hashlib.sha1(
49-
email.encode(),
50-
usedforsecurity=False).hexdigest())
46+
cache_path = f'.cache/user-{hashlib.sha1(email.encode()).hexdigest()}'
47+
cache_handler = spotipy.oauth2.CacheFileHandler(cache_path)
5148

5249
return spotipy.SpotifyOAuth(
5350
client_id=client_id,

0 commit comments

Comments
 (0)