From: OzGav Date: Wed, 14 Jan 2026 12:54:43 +0000 (+0900) Subject: Add RET507 mypy rule (#2961) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=fca8a423c433aa89c2399ff1e541de1ea09a2d5b;p=music-assistant-server.git Add RET507 mypy rule (#2961) --- 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",