Skip to content

Commit 5cd6a39

Browse files
committed
Edited changelog and fixed an issue with plugin loading.
1 parent 04f0339 commit 5cd6a39

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

beets/plugins.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import traceback
2424
from collections import defaultdict
2525
from functools import wraps
26+
from types import GenericAlias
2627
from typing import TYPE_CHECKING, Any, Callable, Sequence, TypeVar
2728

2829
import mediafile
@@ -298,6 +299,7 @@ def load_plugins(names: Sequence[str] = ()) -> None:
298299
for obj in getattr(namespace, name).__dict__.values():
299300
if (
300301
inspect.isclass(obj)
302+
and not isinstance(obj, GenericAlias)
301303
and issubclass(obj, BeetsPlugin)
302304
and obj != BeetsPlugin
303305
and not inspect.isabstract(obj)

docs/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ For plugin developers:
7272
#. :class:`beets.metadata_plugin.MetadataSourcePlugin`
7373
allows plugins to act like metadata sources. E.g. used by the MusicBrainz plugin. All plugins
7474
in the beets repo are opted into this class where applicable. If you are maintaining a plugin
75-
that acts like a metadata source, i.e. you expose any of `track_for_id,
76-
album_for_id, candidates, item_candidates, album_distance, track_distance` methods,
75+
that acts like a metadata source, i.e. you expose any of ``track_for_id``,
76+
``album_for_id``, ``candidates``, ``item_candidates``, ``album_distance``, ``track_distance`` methods,
7777
please update your plugin to inherit from the new baseclass, as otherwise it will
7878
not be registered as a metadata source and wont be usable going forward.
7979

0 commit comments

Comments
 (0)