lastgenre: Hint mypy to Album.items()

instead of obj.items()
This commit is contained in:
J0J0 Todos 2025-11-19 07:16:26 +01:00 committed by j0j0
parent bb30a44107
commit d877362a9e

View file

@ -438,6 +438,7 @@ class LastGenrePlugin(plugins.BeetsPlugin):
else: else:
# For "Various Artists", pick the most popular track genre. # For "Various Artists", pick the most popular track genre.
item_genres = [] item_genres = []
assert isinstance(obj, Album) # Type narrowing for mypy
for item in obj.items(): for item in obj.items():
item_genre = None item_genre = None
if "track" in self.sources: if "track" in self.sources: