Skip to content

Commit 091560f

Browse files
committed
fix
1 parent 80b1dee commit 091560f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/spotifyaio/spotify.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import asyncio
66
from dataclasses import dataclass
77
from importlib import metadata
8-
from typing import TYPE_CHECKING, Any, Callable, Concatenate, Self
8+
from typing import TYPE_CHECKING, Any, Concatenate, Self
99

1010
from aiohttp import ClientSession
1111
from aiohttp.hdrs import METH_DELETE, METH_GET, METH_POST, METH_PUT
@@ -79,7 +79,7 @@
7979
from spotifyaio.util import get_identifier
8080

8181
if TYPE_CHECKING:
82-
from collections.abc import Awaitable
82+
from collections.abc import Awaitable, Callable
8383

8484
from spotifyaio import SimplifiedAlbum, SimplifiedTrack, Track
8585

@@ -275,7 +275,7 @@ async def are_albums_saved(self, album_ids: list[str]) -> dict[str, bool]:
275275
params: dict[str, Any] = {"ids": ",".join(identifiers)}
276276
response = await self._get("v1/me/albums/contains", params=params)
277277
body: list[bool] = orjson.loads(response) # pylint: disable=no-member
278-
return dict(zip(identifiers, body))
278+
return dict(zip(identifiers, body, strict=False))
279279

280280
async def is_album_saved(self, album_id: str) -> bool:
281281
"""Check if album is saved."""
@@ -395,7 +395,7 @@ async def are_audiobooks_saved(self, audiobook_ids: list[str]) -> dict[str, bool
395395
params: dict[str, Any] = {"ids": ",".join(identifiers)}
396396
response = await self._get("v1/me/audiobooks/contains", params=params)
397397
body: list[bool] = orjson.loads(response) # pylint: disable=no-member
398-
return dict(zip(identifiers, body))
398+
return dict(zip(identifiers, body, strict=False))
399399

400400
@catch_json_decode_error
401401
async def get_categories(self) -> list[Category]:
@@ -495,7 +495,7 @@ async def are_episodes_saved(self, episode_ids: list[str]) -> dict[str, bool]:
495495
params: dict[str, Any] = {"ids": ",".join(identifiers)}
496496
response = await self._get("v1/me/episodes/contains", params=params)
497497
body: list[bool] = orjson.loads(response) # pylint: disable=no-member
498-
return dict(zip(identifiers, body))
498+
return dict(zip(identifiers, body, strict=False))
499499

500500
async def is_episode_saved(self, episode_id: str) -> bool:
501501
"""Check if episode is saved."""
@@ -868,7 +868,7 @@ async def are_shows_saved(self, show_ids: list[str]) -> dict[str, bool]:
868868
params: dict[str, Any] = {"ids": ",".join(identifiers)}
869869
response = await self._get("v1/me/shows/contains", params=params)
870870
body: list[bool] = orjson.loads(response) # pylint: disable=no-member
871-
return dict(zip(identifiers, body))
871+
return dict(zip(identifiers, body, strict=False))
872872

873873
async def is_show_saved(self, show_id: str) -> bool:
874874
"""Check if show is saved."""
@@ -922,7 +922,7 @@ async def are_tracks_saved(self, track_ids: list[str]) -> dict[str, bool]:
922922
params: dict[str, Any] = {"ids": ",".join(identifiers)}
923923
response = await self._get("v1/me/tracks/contains", params=params)
924924
body: list[bool] = orjson.loads(response) # pylint: disable=no-member
925-
return dict(zip(identifiers, body))
925+
return dict(zip(identifiers, body, strict=False))
926926

927927
async def is_track_saved(self, track_id: str) -> bool:
928928
"""Check if track is saved."""
@@ -1019,7 +1019,7 @@ async def are_accounts_followed(
10191019
params: dict[str, Any] = {"type": follow_type, "ids": ",".join(identifiers)}
10201020
response = await self._get("v1/me/following/contains", params=params)
10211021
body: list[bool] = orjson.loads(response) # pylint: disable=no-member
1022-
return dict(zip(identifiers, body))
1022+
return dict(zip(identifiers, body, strict=False))
10231023

10241024
@catch_json_decode_error
10251025
async def is_following_playlist(self, playlist_id: str) -> bool:

0 commit comments

Comments
 (0)