Skip to content

Comments

PR: Remove CONF usage in MouseShortcutEditor (Editor)#24250

Merged
ccordoba12 merged 1 commit intospyder-ide:masterfrom
ccordoba12:remove-conf-in-MouseShortcutEditor
Apr 20, 2025
Merged

PR: Remove CONF usage in MouseShortcutEditor (Editor)#24250
ccordoba12 merged 1 commit intospyder-ide:masterfrom
ccordoba12:remove-conf-in-MouseShortcutEditor

Conversation

@ccordoba12
Copy link
Member

Description of Changes

I missed this in my review of PR #23463.

Issue(s) Resolved

Fixes #

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: @ccordoba12

@ccordoba12 ccordoba12 added this to the v6.1.0a2 milestone Apr 20, 2025
@ccordoba12 ccordoba12 self-assigned this Apr 20, 2025
@ccordoba12 ccordoba12 merged commit 76bbd5d into spyder-ide:master Apr 20, 2025
20 checks passed
@ccordoba12 ccordoba12 deleted the remove-conf-in-MouseShortcutEditor branch April 20, 2025 05:52
@athompson673
Copy link
Contributor

@ccordoba12 Just looking this over, it looks like I initially also used set_option from spyder.widgets.config.ConfigAccessMixin by accessing the parent. Is this also depricated in favor of SpyderConfigurationAccessor? We could get rid of self.editor_config_page which is the link back to the parent if so.


mouse_shortcuts.py 109

    def apply_mouse_shortcuts(self):
        """Set new config to CONF"""
        self.editor_config_page.set_option(
            'mouse_shortcuts', self.mouse_shortcuts
        )

@ccordoba12
Copy link
Member Author

We could get rid of self.editor_config_page which is the link back to the parent if so.

Yeah, that's right! Thanks for checking @athompson673.

That code should be instead:

    def apply_mouse_shortcuts(self):
        """Set new config to CONF"""
        self.set_conf('mouse_shortcuts', self.mouse_shortcuts)

Could you open another PR for it?

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