Skip to content

Commit

Permalink
Initialize plugins before validating widget in napari -w {plugin} (n…
Browse files Browse the repository at this point in the history
…apari#4948)

* Initialize plugins before validating widget

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
DragaDoncila and pre-commit-ci[bot] authored Aug 17, 2022
1 parent 9ea0159 commit 79916e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion napari/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,11 @@ def _run():

else:
if args.with_:
from .plugins import _npe2, plugin_manager
from .plugins import _initialize_plugins, _npe2, plugin_manager

# if a plugin widget has been requested, this will fail immediately
# if the requested plugin/widget is not available.
_initialize_plugins()
plugin_manager.discover_widgets()
pname, *wnames = args.with_
if wnames:
Expand Down

0 comments on commit 79916e0

Please sign in to comment.