Skip to content

Commit

Permalink
🩹 Fix load_plugins deprecation warning (#1383)
Browse files Browse the repository at this point in the history
* 🩹 Fix load_plugins deprecation warning

'SelectableGroups dict interface is deprecated. Use select.'

* 🧹 Remove duplicated call of load_plugins
  • Loading branch information
s-weigand authored Oct 22, 2023
1 parent af9b42c commit 40b3d5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion glotaran/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

__version__ = "0.8.0.dev0"

load_plugins()

examples = deprecate_submodule(
deprecated_module_name="glotaran.examples",
Expand Down
4 changes: 3 additions & 1 deletion glotaran/plugin_system/base_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def load_plugins():
"glotaran.plugins.project_io",
]
entry_points = metadata.entry_points()
for entry_points in [entry_points[p] for p in plugin_names]: # type:ignore[assignment]
for entry_points in [ # type:ignore[assignment]
entry_points.select(group=plugin_name) for plugin_name in plugin_names
]:
for entry_point in entry_points:
entry_point.load() # type:ignore[attr-defined]

Expand Down

0 comments on commit 40b3d5e

Please sign in to comment.