Add RET507 mypy rule (#2961)
authorOzGav <gavnosp@hotmail.com>
Wed, 14 Jan 2026 12:54:43 +0000 (21:54 +0900)
committerGitHub <noreply@github.com>
Wed, 14 Jan 2026 12:54:43 +0000 (13:54 +0100)
music_assistant/providers/theaudiodb/__init__.py
pyproject.toml

index 4fb37165d3ddbbbec32dec1c764c9cda11d820b7..5c7cae2cc7da7dbdba1373e61fb67527d91e8c94 100644 (file)
@@ -207,14 +207,14 @@ class AudioDbMetadataProvider(MetadataProvider):
                             continue
                     elif not compare_strings(track_artist.name, item["strArtist"]):
                         continue
-                    if (  # noqa: SIM114
+                    if (
                         track.album
                         and (mb_rgid := track.album.get_external_id(ExternalID.MB_RELEASEGROUP))
                         # AudioDb swapped MB Album ID and ReleaseGroup ID ?!
                         and mb_rgid != item["strMusicBrainzAlbumID"]
                     ):
                         continue
-                    elif track.album and not compare_strings(
+                    if track.album and not compare_strings(
                         track.album.name, item["strAlbum"], strict=False
                     ):
                         continue
index d5c6e2b40f1aa1a1829c854ec442c9731326205d..cb009d2e0c7edfd3977d65837f98ca011cb63b85 100644 (file)
@@ -242,7 +242,6 @@ ignore = [
   "PTH116",
   "RUF012",
   "S304",
-  "RET507",
   "RUF006",
   "TRY300",
   "S608",