mirror of
https://github.com/beetbox/beets.git
synced 2026-01-08 00:45:55 +01:00
Fixed circular import issue introduced in last commit
This commit is contained in:
parent
90254bb511
commit
287c7228af
1 changed files with 6 additions and 2 deletions
|
|
@ -36,7 +36,6 @@ import mediafile
|
|||
|
||||
import beets
|
||||
from beets import logging
|
||||
from beets.library import Album, Item, Library
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Iterable
|
||||
|
|
@ -45,6 +44,7 @@ if TYPE_CHECKING:
|
|||
|
||||
from beets.autotag import AlbumInfo, Distance, TrackInfo
|
||||
from beets.dbcore import Query
|
||||
from beets.library import Album, Item, Library
|
||||
from beets.ui import Subcommand
|
||||
|
||||
|
||||
|
|
@ -520,7 +520,11 @@ def import_stages():
|
|||
|
||||
|
||||
# New-style (lazy) plugin-provided fields.
|
||||
F = TypeVar("F", Callable[[Item], str], Callable[[Album], str])
|
||||
|
||||
if (
|
||||
TYPE_CHECKING
|
||||
): # Needed because Item, Album circular introduce circular import
|
||||
F = TypeVar("F", Callable[[Item], str], Callable[[Album], str])
|
||||
|
||||
|
||||
def _check_conflicts_and_merge(
|
||||
|
|
|
|||
Loading…
Reference in a new issue