Skip to content

Commit

Permalink
instead of checking if item is list or tuple, just check if it's iter…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
dieser-niko committed Oct 13, 2024
1 parent ef69d4d commit 77b2bd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spotipy/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import logging
from types import TracebackType
from collections.abc import Iterable

import urllib3

Expand Down Expand Up @@ -48,7 +49,8 @@ def normalize_scope(scope):
if scope:
if isinstance(scope, str):
scopes = scope.split(',')
elif isinstance(scope, list) or isinstance(scope, tuple):

elif isinstance(scope, Iterable):
scopes = scope
else:
raise Exception(
Expand Down

0 comments on commit 77b2bd9

Please sign in to comment.