From 1515ef2ade06b482791883d18f8fe355c350a1f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 01:47:29 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20dependency=20?= =?UTF-8?q?ruff=20to=20v0.15.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- poetry.lock | 41 ++++++++++++++++++++--------------------- pyproject.toml | 2 +- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/poetry.lock b/poetry.lock index ddd85d1..0b9a3a5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2459,30 +2459,29 @@ oldlibyaml = ["ruamel.yaml.clib"] [[package]] name = "ruff" -version = "0.14.14" +version = "0.15.2" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.14.14-py3-none-linux_armv6l.whl", hash = "sha256:7cfe36b56e8489dee8fbc777c61959f60ec0f1f11817e8f2415f429552846aed"}, - {file = "ruff-0.14.14-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6006a0082336e7920b9573ef8a7f52eec837add1265cc74e04ea8a4368cd704c"}, - {file = "ruff-0.14.14-py3-none-macosx_11_0_arm64.whl", hash = "sha256:026c1d25996818f0bf498636686199d9bd0d9d6341c9c2c3b62e2a0198b758de"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f666445819d31210b71e0a6d1c01e24447a20b85458eea25a25fe8142210ae0e"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3c0f18b922c6d2ff9a5e6c3ee16259adc513ca775bcf82c67ebab7cbd9da5bc8"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1629e67489c2dea43e8658c3dba659edbfd87361624b4040d1df04c9740ae906"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:27493a2131ea0f899057d49d303e4292b2cae2bb57253c1ed1f256fbcd1da480"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:01ff589aab3f5b539e35db38425da31a57521efd1e4ad1ae08fc34dbe30bd7df"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1cc12d74eef0f29f51775f5b755913eb523546b88e2d733e1d701fe65144e89b"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb8481604b7a9e75eff53772496201690ce2687067e038b3cc31aaf16aa0b974"}, - {file = "ruff-0.14.14-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:14649acb1cf7b5d2d283ebd2f58d56b75836ed8c6f329664fa91cdea19e76e66"}, - {file = "ruff-0.14.14-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:e8058d2145566510790eab4e2fad186002e288dec5e0d343a92fe7b0bc1b3e13"}, - {file = "ruff-0.14.14-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e651e977a79e4c758eb807f0481d673a67ffe53cfa92209781dfa3a996cf8412"}, - {file = "ruff-0.14.14-py3-none-musllinux_1_2_i686.whl", hash = "sha256:cc8b22da8d9d6fdd844a68ae937e2a0adf9b16514e9a97cc60355e2d4b219fc3"}, - {file = "ruff-0.14.14-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:16bc890fb4cc9781bb05beb5ab4cd51be9e7cb376bf1dd3580512b24eb3fda2b"}, - {file = "ruff-0.14.14-py3-none-win32.whl", hash = "sha256:b530c191970b143375b6a68e6f743800b2b786bbcf03a7965b06c4bf04568167"}, - {file = "ruff-0.14.14-py3-none-win_amd64.whl", hash = "sha256:3dde1435e6b6fe5b66506c1dff67a421d0b7f6488d466f651c07f4cab3bf20fd"}, - {file = "ruff-0.14.14-py3-none-win_arm64.whl", hash = "sha256:56e6981a98b13a32236a72a8da421d7839221fa308b223b9283312312e5ac76c"}, - {file = "ruff-0.14.14.tar.gz", hash = "sha256:2d0f819c9a90205f3a867dbbd0be083bee9912e170fd7d9704cc8ae45824896b"}, + {file = "ruff-0.15.2-py3-none-linux_armv6l.whl", hash = "sha256:120691a6fdae2f16d65435648160f5b81a9625288f75544dc40637436b5d3c0d"}, + {file = "ruff-0.15.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a89056d831256099658b6bba4037ac6dd06f49d194199215befe2bb10457ea5e"}, + {file = "ruff-0.15.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e36dee3a64be0ebd23c86ffa3aa3fd3ac9a712ff295e192243f814a830b6bd87"}, + {file = "ruff-0.15.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9fb47b6d9764677f8c0a193c0943ce9a05d6763523f132325af8a858eadc2b9"}, + {file = "ruff-0.15.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f376990f9d0d6442ea9014b19621d8f2aaf2b8e39fdbfc79220b7f0c596c9b80"}, + {file = "ruff-0.15.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2dcc987551952d73cbf5c88d9fdee815618d497e4df86cd4c4824cc59d5dd75f"}, + {file = "ruff-0.15.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:42a47fd785cbe8c01b9ff45031af875d101b040ad8f4de7bbb716487c74c9a77"}, + {file = "ruff-0.15.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cbe9f49354866e575b4c6943856989f966421870e85cd2ac94dccb0a9dcb2fea"}, + {file = "ruff-0.15.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7a672c82b5f9887576087d97be5ce439f04bbaf548ee987b92d3a7dede41d3a"}, + {file = "ruff-0.15.2-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:72ecc64f46f7019e2bcc3cdc05d4a7da958b629a5ab7033195e11a438403d956"}, + {file = "ruff-0.15.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:8dcf243b15b561c655c1ef2f2b0050e5d50db37fe90115507f6ff37d865dc8b4"}, + {file = "ruff-0.15.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:dab6941c862c05739774677c6273166d2510d254dac0695c0e3f5efa1b5585de"}, + {file = "ruff-0.15.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1b9164f57fc36058e9a6806eb92af185b0697c9fe4c7c52caa431c6554521e5c"}, + {file = "ruff-0.15.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:80d24fcae24d42659db7e335b9e1531697a7102c19185b8dc4a028b952865fd8"}, + {file = "ruff-0.15.2-py3-none-win32.whl", hash = "sha256:fd5ff9e5f519a7e1bd99cbe8daa324010a74f5e2ebc97c6242c08f26f3714f6f"}, + {file = "ruff-0.15.2-py3-none-win_amd64.whl", hash = "sha256:d20014e3dfa400f3ff84830dfb5755ece2de45ab62ecea4af6b7262d0fb4f7c5"}, + {file = "ruff-0.15.2-py3-none-win_arm64.whl", hash = "sha256:cabddc5822acdc8f7b5527b36ceac55cc51eec7b1946e60181de8fe83ca8876e"}, + {file = "ruff-0.15.2.tar.gz", hash = "sha256:14b965afee0969e68bb871eba625343b8673375f457af4abe98553e8bbb98342"}, ] [[package]] @@ -2854,4 +2853,4 @@ propcache = ">=0.2.1" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "5f34dec915b1868b9ac767cfd3fd56f79c4d88121a1d57b654deaf1fc8f12026" +content-hash = "4f40c7a451e49f1aae102c6f2f2df08c92269a1ab0c23dc81e7d96917ec7675c" diff --git a/pyproject.toml b/pyproject.toml index ed2944b..de4da9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ pylint = "4.0.4" pytest = "9.0.2" pytest-asyncio = "1.3.0" pytest-cov = "7.0.0" -ruff = "0.14.14" +ruff = "0.15.2" safety = "3.7.0" yamllint = "1.38.0" syrupy = "5.1.0" From a36282c6e00f0746ee21da18f6a7cb2bf871aaf7 Mon Sep 17 00:00:00 2001 From: Joostlek Date: Wed, 25 Feb 2026 20:55:46 +0100 Subject: [PATCH 2/2] fix --- src/spotifyaio/spotify.py | 16 ++++++++-------- src/spotifyaio/util.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/spotifyaio/spotify.py b/src/spotifyaio/spotify.py index 82a1e9f..1f8e521 100644 --- a/src/spotifyaio/spotify.py +++ b/src/spotifyaio/spotify.py @@ -292,7 +292,7 @@ async def get_new_releases(self) -> list[SimplifiedAlbum]: @catch_json_decode_error async def get_artist(self, artist_id: str) -> Artist: """Get artist.""" - identifier = artist_id.split(":")[-1] + identifier = artist_id.rsplit(":", maxsplit=1)[-1] response = await self._get(f"v1/artists/{identifier}") return Artist.from_json(response) @@ -314,14 +314,14 @@ async def get_artists(self, artist_ids: list[str]) -> list[Artist]: async def get_artist_albums(self, artist_id: str) -> list[SimplifiedAlbum]: """Get artist albums.""" params: dict[str, Any] = {"limit": 48} - identifier = artist_id.split(":")[-1] + identifier = artist_id.rsplit(":", maxsplit=1)[-1] response = await self._get(f"v1/artists/{identifier}/albums", params=params) return NewReleasesResponseInner.from_json(response).items @catch_json_decode_error async def get_artist_top_tracks(self, artist_id: str) -> list[Track]: """Get artist top tracks.""" - identifier = artist_id.split(":")[-1] + identifier = artist_id.rsplit(":", maxsplit=1)[-1] response = await self._get(f"v1/artists/{identifier}/top-tracks") return ArtistTopTracksResponse.from_json(response).tracks @@ -413,7 +413,7 @@ async def get_category(self, category_id: str) -> Category: @catch_json_decode_error async def get_chapter(self, chapter_id: str) -> Chapter: """Get chapter.""" - identifier = chapter_id.split(":")[-1] + identifier = chapter_id.rsplit(":", maxsplit=1)[-1] response = await self._get(f"v1/chapters/{identifier}") return Chapter.from_json(response) @@ -434,7 +434,7 @@ async def get_chapters(self, chapter_ids: list[str]) -> list[Chapter]: @catch_json_decode_error async def get_episode(self, episode_id: str) -> Episode: """Get episode.""" - identifier = episode_id.split(":")[-1] + identifier = episode_id.rsplit(":", maxsplit=1)[-1] response = await self._get(f"v1/episodes/{identifier}") return Episode.from_json(response) @@ -638,7 +638,7 @@ async def add_to_queue(self, uri: str, device_id: str | None = None) -> None: @catch_json_decode_error async def get_playlist(self, playlist_id: str) -> Playlist: """Get playlist.""" - identifier = playlist_id.split(":")[-1] + identifier = playlist_id.rsplit(":", maxsplit=1)[-1] response = await self._get( f"v1/playlists/{identifier}", params={"additional_types": "track,episode"} ) @@ -810,7 +810,7 @@ async def search( @catch_json_decode_error async def get_show(self, show_id: str) -> Show: """Get show.""" - identifier = show_id.split(":")[-1] + identifier = show_id.rsplit(":", maxsplit=1)[-1] response = await self._get(f"v1/shows/{identifier}") return Show.from_json(response) @@ -819,7 +819,7 @@ async def get_show(self, show_id: str) -> Show: @catch_json_decode_error async def get_show_episodes(self, show_id: str) -> list[SimplifiedEpisode]: """Get show episodes.""" - identifier = show_id.split(":")[-1] + identifier = show_id.rsplit(":", maxsplit=1)[-1] params: dict[str, Any] = {"limit": 48} response = await self._get(f"v1/shows/{identifier}/episodes", params=params) return ShowEpisodesResponse.from_json(response).items diff --git a/src/spotifyaio/util.py b/src/spotifyaio/util.py index 8e5b2de..4efab30 100644 --- a/src/spotifyaio/util.py +++ b/src/spotifyaio/util.py @@ -3,4 +3,4 @@ def get_identifier(identifier: str) -> str: """Get the identifier from a Spotify URI.""" - return identifier.split(":")[-1] + return identifier.rsplit(":", maxsplit=1)[-1]