Rewrite "_*_changed" static trait handler methods to use "observe"#401
Merged
Conversation
added 2 commits
April 16, 2021 10:04
This commit updates most, but not all, of the _*_changed trait handler methods to use observe instead modified: envisage/application.py modified: envisage/composite_plugin_manager.py modified: envisage/core_plugin.py modified: envisage/egg_basket_plugin_manager.py modified: envisage/package_plugin_manager.py modified: envisage/plugin_extension_registry.py modified: envisage/plugin_manager.py modified: envisage/plugins/text_editor/editor/text_editor.py modified: envisage/tests/event_tracker.py modified: envisage/tests/test_plugin.py modified: envisage/ui/action/abstract_action_manager_builder.py modified: envisage/ui/tasks/action/task_window_launch_group.py modified: examples/legacy/plugins/tasks/ipython_kernel/python_editor.py modified: examples/legacy/plugins/workbench/Lorenz/acme/lorenz/lorenz.py
modified: envisage/composite_plugin_manager.py
aaronayres35
approved these changes
Apr 16, 2021
Contributor
aaronayres35
left a comment
There was a problem hiding this comment.
LGTM
Just a few comments
Co-authored-by: aaronayres35 <36972686+aaronayres35@users.noreply.github.com>
the method names will hopefully better convey what the methods will do - instead of conveying what the methods are reacting to modified: envisage/plugin_manager.py modified: envisage/plugins/text_editor/editor/text_editor.py modified: envisage/tests/event_tracker.py
Contributor
Author
|
@aaronayres35 can you take another look at this PR? |
aaronayres35
approved these changes
May 11, 2021
Contributor
aaronayres35
left a comment
There was a problem hiding this comment.
Still LGTM, I have one more possible name suggestion but don't hesitate to ignore it
![]()
|
|
||
| def __plugins_items_changed(self, trait_name, old, new): | ||
| @observe("_plugins:items") | ||
| def _update_application_on_changed_plugins(self, event): |
Contributor
There was a problem hiding this comment.
nit: maybe _update_application_on_plugins_contents?
I'm not sure thats really any clearer though. Feel free to ignore
Contributor
Author
There was a problem hiding this comment.
i can't think of a better name but i don't think _update_application_on_plugins_contents is better 😅 sorry. im going to merge for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates most, but not all, of the
_*_changedstatic trait handler methods to use traitsobserveinstead. See related PR #400