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: Improve the way command line options are handled by plugins #17657

Merged
merged 10 commits into from
Apr 14, 2022

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Apr 11, 2022

Description of Changes

  • Add a new API method for plugins to access command line options.
  • Use it to simplify how different plugins handle those options (i.e. Projects, Internal console and Working directory).
  • Fix the --workdir/-w cli option
  • Remove some dead code in MainWindow.
  • Add tests wherever possible.

Issue(s) Resolved

Fixes #17589

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 v5.3.1 milestone Apr 11, 2022
@ccordoba12 ccordoba12 self-assigned this Apr 11, 2022
@ccordoba12 ccordoba12 force-pushed the issue-17589 branch 2 times, most recently from 1c5b27e to 1c83f0b Compare April 12, 2022 15:53
@ccordoba12 ccordoba12 changed the title PR: Improve the way command line options are handled PR: Improve the way command line options are handled by plugins Apr 12, 2022
@ccordoba12 ccordoba12 force-pushed the issue-17589 branch 2 times, most recently from 1a0c252 to 97d60d4 Compare April 12, 2022 17:13
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

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

Thanks @ccordoba ! Left a comment regarding the handling of the new get_command_line_options with try-excepts. Otherwise this LGTM 👍

spyder/api/plugins/new_api.py Outdated Show resolved Hide resolved
- This can happen in our tests.
- In case the plugin doesn't have a parent, we return our default
cli options.
- Also fix failures in a couple of tests related to cli options.
Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

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

👍

@dalthviz dalthviz merged commit a62c47c into spyder-ide:5.x Apr 14, 2022
dalthviz added a commit that referenced this pull request Apr 14, 2022
@ccordoba12 ccordoba12 deleted the issue-17589 branch April 14, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants