mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
add return type
This commit is contained in:
parent
942ddf7a3c
commit
b55c8196bd
@ -2252,13 +2252,13 @@ class Spotify:
|
|||||||
# TODO change to a ValueError in v3
|
# TODO change to a ValueError in v3
|
||||||
raise SpotifyException(400, -1, "Unsupported URL / URI.")
|
raise SpotifyException(400, -1, "Unsupported URL / URI.")
|
||||||
|
|
||||||
def _get_uri(self, type, id: str):
|
def _get_uri(self, type, id: str) -> str:
|
||||||
if self._is_uri(id):
|
if self._is_uri(id):
|
||||||
return id
|
return id
|
||||||
else:
|
else:
|
||||||
return "spotify:" + type + ":" + self._get_id(type, id)
|
return "spotify:" + type + ":" + self._get_id(type, id)
|
||||||
|
|
||||||
def _is_uri(self, uri: str):
|
def _is_uri(self, uri: str) -> bool:
|
||||||
return re.search(Spotify._regex_spotify_uri, uri) is not None
|
return re.search(Spotify._regex_spotify_uri, uri) is not None
|
||||||
|
|
||||||
def _search_multiple_markets(
|
def _search_multiple_markets(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user