From fca8a423c433aa89c2399ff1e541de1ea09a2d5b Mon Sep 17 00:00:00 2001 From: OzGav Date: Wed, 14 Jan 2026 21:54:43 +0900 Subject: [PATCH] Add RET507 mypy rule (#2961) --- music_assistant/providers/theaudiodb/__init__.py | 4 ++-- pyproject.toml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/music_assistant/providers/theaudiodb/__init__.py b/music_assistant/providers/theaudiodb/__init__.py index 4fb37165..5c7cae2c 100644 --- a/music_assistant/providers/theaudiodb/__init__.py +++ b/music_assistant/providers/theaudiodb/__init__.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index d5c6e2b4..cb009d2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -242,7 +242,6 @@ ignore = [ "PTH116", "RUF012", "S304", - "RET507", "RUF006", "TRY300", "S608", -- 2.34.1