mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
lastgenre: Hint mypy to Album.items()
instead of obj.items()
This commit is contained in:
parent
bb30a44107
commit
d877362a9e
1 changed files with 1 additions and 0 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue