Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Initial Editor migration to the new API #21353

Merged
merged 78 commits into from
Mar 21, 2024

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Sep 19, 2023

Description of Changes

Move Editor to use newest plugins API

Issue(s) Resolved

Fixes #12193
Part of #17468

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: dalthviz

@pep8speaks
Copy link

pep8speaks commented Sep 19, 2023

Hello @dalthviz! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 36:80: E501 line too long (88 > 79 characters)

Line 485:80: E501 line too long (92 > 79 characters)
Line 487:80: E501 line too long (81 > 79 characters)

Line 3012:80: E501 line too long (81 > 79 characters)

Line 43:80: E501 line too long (88 > 79 characters)
Line 132:80: E501 line too long (84 > 79 characters)
Line 133:80: E501 line too long (81 > 79 characters)
Line 136:1: W293 blank line contains whitespace

Line 274:80: E501 line too long (81 > 79 characters)
Line 293:80: E501 line too long (80 > 79 characters)
Line 317:80: E501 line too long (80 > 79 characters)
Line 321:80: E501 line too long (80 > 79 characters)
Line 336:80: E501 line too long (80 > 79 characters)

Line 1750:80: E501 line too long (83 > 79 characters)

Line 1887:13: E731 do not assign a lambda expression, use a def
Line 2072:9: E731 do not assign a lambda expression, use a def

Line 145:80: E501 line too long (80 > 79 characters)

Comment last updated at 2024-02-27 20:31:48 UTC

@dalthviz dalthviz requested a review from ccordoba12 March 1, 2024 20:04
Also, remove unused imports.
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dalthviz for your hard work on this one!

@@ -3268,14 +3267,14 @@ def test_preferences_empty_shortcut_regression(main_window, qtbot):
base_run_cell_advance = CONF.get_shortcut(
'editor', 'run cell and advance') # Should be Shift+Return
base_run_selection = CONF.get_shortcut(
'_', 'run selection') # Should be F9
'editor', 'run selection and advance') # Should be F9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this shortcut is not global anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this shortcut is defined under editor (and it has been like that from even before the changes done in this PR):

'editor/run selection and advance': "F9",

I think I did this test change most probabIy since I have been running the tests locally and I stumbled across this one failing. Also, cheking this test definition more closely, I think is not being run on the CI. Most probably the reason is that the shortcut change (from _ to editor + the shortcut string/name change) was done in the past but the test was not updated and instead skipped?. Should I also remove the CI skip for the test?

spyder/plugins/editor/plugin.py Show resolved Hide resolved
spyder/plugins/editor/plugin.py Outdated Show resolved Hide resolved
spyder/plugins/editor/plugin.py Outdated Show resolved Hide resolved
spyder/plugins/editor/plugin.py Outdated Show resolved Hide resolved
spyder/plugins/editor/widgets/editorstack/editorstack.py Outdated Show resolved Hide resolved
spyder/plugins/editor/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/editor/widgets/main_widget.py Outdated Show resolved Hide resolved
@ccordoba12 ccordoba12 changed the title PR: Initial Editor migration PR: Initial Editor migration to the new API Mar 12, 2024
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dalthviz for your hard work and patience to finally migrate the Editor to the new API!

Note: The failure in our tests is unrelated to this.

@ccordoba12 ccordoba12 merged commit 00986c1 into spyder-ide:master Mar 21, 2024
13 of 14 checks passed
jitseniesen added a commit to jitseniesen/spyder-unittest that referenced this pull request Apr 12, 2024
jitseniesen added a commit to jitseniesen/spyder-unittest that referenced this pull request Apr 12, 2024
jitseniesen added a commit to jitseniesen/spyder-unittest that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move Editor plugin to use new API
4 participants