From 180d22e2a00d9e3a17849e8ed5ea8a42ec2f961b Mon Sep 17 00:00:00 2001 From: Lucy Liu Date: Tue, 10 Oct 2023 13:06:46 +1100 Subject: [PATCH 1/5] add doc in command reg --- src/npe2/_command_registry.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/npe2/_command_registry.py b/src/npe2/_command_registry.py index 82a0c89e..41bba140 100644 --- a/src/npe2/_command_registry.py +++ b/src/npe2/_command_registry.py @@ -39,6 +39,12 @@ def resolve(self) -> Callable: class CommandRegistry: + """Registry of commands, updated when `PluginManager.activate` run. + + `PluginManager.activate` is only run on `CommandRegistry.get` (when we get the + callable object for a command). This means that commmands from enabled plugins are + not added to `CommandRegistry` until a command from that plugin is executed. + """ command_registered = Signal(str) command_unregistered = Signal(str) From d6f437eafb6259c11ecf8aa6fce10d745cd507a0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 02:08:49 +0000 Subject: [PATCH 2/5] style: [pre-commit.ci] auto fixes [...] --- src/npe2/_command_registry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/npe2/_command_registry.py b/src/npe2/_command_registry.py index 41bba140..6dffb292 100644 --- a/src/npe2/_command_registry.py +++ b/src/npe2/_command_registry.py @@ -45,6 +45,7 @@ class CommandRegistry: callable object for a command). This means that commmands from enabled plugins are not added to `CommandRegistry` until a command from that plugin is executed. """ + command_registered = Signal(str) command_unregistered = Signal(str) From 252df54241f0362545e85a99f5ceffb56e1ebe8a Mon Sep 17 00:00:00 2001 From: Lucy Liu Date: Tue, 10 Oct 2023 13:10:48 +1100 Subject: [PATCH 3/5] typo --- src/npe2/_command_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/npe2/_command_registry.py b/src/npe2/_command_registry.py index 6dffb292..ba0b3785 100644 --- a/src/npe2/_command_registry.py +++ b/src/npe2/_command_registry.py @@ -42,7 +42,7 @@ class CommandRegistry: """Registry of commands, updated when `PluginManager.activate` run. `PluginManager.activate` is only run on `CommandRegistry.get` (when we get the - callable object for a command). This means that commmands from enabled plugins are + callable object for a command). This means that commands from enabled plugins are not added to `CommandRegistry` until a command from that plugin is executed. """ From 684355b432039258dec71e1d320a343561e91e1b Mon Sep 17 00:00:00 2001 From: Lucy Liu Date: Wed, 11 Oct 2023 17:33:54 +1100 Subject: [PATCH 4/5] Update src/npe2/_command_registry.py Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com> --- src/npe2/_command_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/npe2/_command_registry.py b/src/npe2/_command_registry.py index ba0b3785..d82b111b 100644 --- a/src/npe2/_command_registry.py +++ b/src/npe2/_command_registry.py @@ -39,7 +39,7 @@ def resolve(self) -> Callable: class CommandRegistry: - """Registry of commands, updated when `PluginManager.activate` run. + """Registry of commands, updated on `PluginManager.activate`. `PluginManager.activate` is only run on `CommandRegistry.get` (when we get the callable object for a command). This means that commands from enabled plugins are From 196ee601b2c37d13ac31067ef46ddd15cbb4ac48 Mon Sep 17 00:00:00 2001 From: Lucy Liu Date: Wed, 11 Oct 2023 17:34:06 +1100 Subject: [PATCH 5/5] Update src/npe2/_command_registry.py Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com> --- src/npe2/_command_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/npe2/_command_registry.py b/src/npe2/_command_registry.py index d82b111b..5694bf23 100644 --- a/src/npe2/_command_registry.py +++ b/src/npe2/_command_registry.py @@ -41,7 +41,7 @@ def resolve(self) -> Callable: class CommandRegistry: """Registry of commands, updated on `PluginManager.activate`. - `PluginManager.activate` is only run on `CommandRegistry.get` (when we get the + `PluginManager.activate` is only run on `CommandRegistry.get` (when we resolve the callable object for a command). This means that commands from enabled plugins are not added to `CommandRegistry` until a command from that plugin is executed. """