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: Add validations before doing operations with the current editor (Editor) #20664

Merged
merged 2 commits into from
Mar 10, 2023

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Mar 9, 2023

Description of Changes

Methods connected to signals that use the current editor can get evaluated while no editor is available. Add a validation for the current editor value returned to prevent errors.

Issue(s) Resolved

Fixes #20643

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

@dalthviz dalthviz added this to the v5.4.3 milestone Mar 9, 2023
@dalthviz dalthviz self-assigned this Mar 9, 2023
@dalthviz dalthviz requested a review from ccordoba12 March 9, 2023 23:47
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! I tested it locally and works like a charm.

I left two small stylistic suggestions for you, the rest looks good to me.

spyder/plugins/editor/plugin.py Outdated Show resolved Hide resolved
spyder/plugins/editor/plugin.py Outdated Show resolved Hide resolved
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
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!

@ccordoba12 ccordoba12 merged commit 2197aa7 into spyder-ide:5.x Mar 10, 2023
ccordoba12 added a commit that referenced this pull request Mar 10, 2023
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.

2 participants