mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
return Scope.make_string(scope) if all values in scope are Scope objects
This commit is contained in:
parent
77b2bd90bc
commit
d140d1a4b6
@ -1,5 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from spotipy import Scope
|
||||
|
||||
""" Shows a user's playlists. This needs to be authenticated via OAuth. """
|
||||
|
||||
__all__ = ["CLIENT_CREDS_ENV_VARS", "get_host_port", "normalize_scope", "Retry"]
|
||||
@ -51,6 +53,8 @@ def normalize_scope(scope):
|
||||
scopes = scope.split(',')
|
||||
|
||||
elif isinstance(scope, Iterable):
|
||||
if all(isinstance(s, Scope) for s in scope):
|
||||
return Scope.make_string(scope)
|
||||
scopes = scope
|
||||
else:
|
||||
raise Exception(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user