-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: Move Pylint plugin to new API #12160
Conversation
8aadfd1
to
ba5ebea
Compare
8bfc4cc
to
82cc8b8
Compare
679c0dc
to
3eb922f
Compare
8496338
to
a547980
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goanpeca left a question and also I think this plugin should use the spinner. Besides that LGTM 👍
bdd6f9f
to
bfdcfd4
Compare
/show binder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goanpeca one last comment, please unify the use of "
to enclose strings, there is a mix (as an example the pylint main_widget.py
in the setup of the actions) and using just "
could improve future readability of the code. Thanks!
Edit: As an example the code of the setup method:
spyder/spyder/plugins/pylint/main_widget.py
Lines 418 to 440 in bfdcfd4
def setup(self, options): | |
change_history_depth_action = self.create_action( | |
PylintWidgetActions.ChangeHistory, | |
text=_("History..."), | |
tip=_("Set history maximum entries"), | |
icon=self.create_icon('history'), | |
triggered=self.change_history_depth, | |
) | |
self.code_analysis_action = self.create_action( | |
PylintWidgetActions.RunCodeAnalysis, | |
icon_text=_("Analyze"), | |
text=_("Run code analysis"), | |
tip=_("Run code analysis"), | |
icon=self.create_icon('run'), | |
triggered=lambda: self.sig_start_analysis_requested.emit(), | |
context=Qt.ApplicationShortcut, | |
) | |
self.browse_action = self.create_action( | |
PylintWidgetActions.BrowseFile, | |
text=_('Select Python file'), | |
tip=_('Select Python file'), | |
icon=self.create_icon('fileopen'), | |
triggered=self.select_file, |
bfdcfd4
to
e670ea6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goanpeca seems like no change regarding the mix of '
and "
was added with the rebase, could you check what happen?
e670ea6
to
a47cca4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goanpeca a comment pointing were the CIs are failing
spyder/plugins/pylint/main_widget.py
Outdated
"pylint", | ||
"--output-format=text", | ||
"--msg-template=" | ||
""{msg_id}:{symbol}:{line:3d},{column}: {msg}"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the replace needs some changes here (this is causing the error in the CIs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will Fix...!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, some PEP8 errors raised. I know these kind of things are kind of a pain to change so thanks for the effort 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries @dalthviz, it is how it goes.
Thanks for all the reviewing. You are all doing a great job, and practice makes perfect :-) !
a47cca4
to
64bf06a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goanpeca checking seems like the selected path in the combobox is not being taken in to account unless you use the Select python file
button to update it:
Edit: Seems like the Analyze
button always triggers the action using the current filename in the Editor
Bug! Will fix. |
Hey @dalthviz, is this one ready for merge? |
@ccordoba12 I would say that some testing could be nice, otherwise the missing thing is a squash |
a119d34
to
a62de3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of Changes
Took the opportunity to simplify the buttons so that it is similar to find in files (start/stop are the same button)
Issue(s) Resolved
Depends on #11741
Fixes #12183
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: @goanpeca