Skip to content

Commit bea2594

Browse files
committed
lastgenre: Hint mypy to Album.items()
instead of obj.items()
1 parent 2fedef4 commit bea2594

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

beetsplug/lastgenre/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ def _try_resolve_stage(stage_label: str, keep_genres, new_genres):
436436
else:
437437
# For "Various Artists", pick the most popular track genre.
438438
item_genres = []
439+
assert isinstance(obj, Album) # Type narrowing for mypy
439440
for item in obj.items():
440441
item_genre = None
441442
if "track" in self.sources:

0 commit comments

Comments
 (0)