Skip to content

Commit

Permalink
fix: Use the in keyword (#210)
Browse files Browse the repository at this point in the history
Using the `in` keyword is faster than having multiple equality statements

Co-authored-by: Sathyajith Bhat <sathya@sathyasays.com>
  • Loading branch information
arnu515 and SathyaBhat committed Oct 17, 2021
1 parent 30db186 commit 8346f98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spotify_dl/spotify_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def spotify_dl():
config = json.loads(file.read())

for key, value in config.items():
if value and (value.lower() == 'true' or value.lower() == 't'):
if value and (value.lower() in ['true', 't']):
setattr(args, key, True)
else:
setattr(args, key, value)
Expand Down

0 comments on commit 8346f98

Please sign in to comment.