mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 13:07:09 +01:00
use new kind of type annotations
This commit is contained in:
parent
56232864ce
commit
f3bfd8a47a
1 changed files with 3 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ releases and tracks.
|
|||
"""
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import datetime
|
||||
import re
|
||||
from typing import (
|
||||
|
|
@ -78,7 +79,7 @@ class Recommendation(OrderedEnum):
|
|||
|
||||
|
||||
class Proposal(NamedTuple):
|
||||
candidates: Sequence[Union[AlbumMatch, TrackMatch]]
|
||||
candidates: Sequence[AlbumMatch | TrackMatch]
|
||||
recommendation: Recommendation
|
||||
|
||||
|
||||
|
|
@ -354,7 +355,7 @@ def match_by_id(items: Iterable[Item]):
|
|||
|
||||
|
||||
def _recommendation(
|
||||
results: Sequence[Union[AlbumMatch, TrackMatch]],
|
||||
results: Sequence[AlbumMatch | TrackMatch],
|
||||
) -> Recommendation:
|
||||
"""Given a sorted list of AlbumMatch or TrackMatch objects, return a
|
||||
recommendation based on the results' distances.
|
||||
|
|
|
|||
Loading…
Reference in a new issue