mirror of
https://github.com/beetbox/beets.git
synced 2026-01-07 00:15:20 +01:00
Use inspect instead of isclass in load_plugin function to fix import
issues.
This commit is contained in:
parent
24295d6844
commit
5fe8431a65
1 changed files with 1 additions and 5 deletions
|
|
@ -44,8 +44,6 @@ if TYPE_CHECKING:
|
|||
|
||||
from confuse import ConfigView
|
||||
|
||||
from beets.autotag import AlbumInfo, TrackInfo
|
||||
from beets.autotag.distance import Distance
|
||||
from beets.dbcore import Query
|
||||
from beets.dbcore.db import FieldQueryType
|
||||
from beets.dbcore.types import Type
|
||||
|
|
@ -299,7 +297,7 @@ def load_plugins(names: Sequence[str] = ()) -> None:
|
|||
else:
|
||||
for obj in getattr(namespace, name).__dict__.values():
|
||||
if (
|
||||
isinstance(obj, type)
|
||||
inspect.isclass(obj)
|
||||
and issubclass(obj, BeetsPlugin)
|
||||
and obj != BeetsPlugin
|
||||
and not inspect.isabstract(obj)
|
||||
|
|
@ -520,8 +518,6 @@ def feat_tokens(for_artist: bool = True) -> str:
|
|||
)
|
||||
|
||||
|
||||
|
||||
|
||||
def apply_item_changes(
|
||||
lib: Library, item: Item, move: bool, pretend: bool, write: bool
|
||||
) -> None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue