-
Notifications
You must be signed in to change notification settings - Fork 213
Flake8 plugins issues #140
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
Comments
Hey @ivan94fi, thanks for reporting. My comments:
Ok, I didn't know that. Thanks for mentioning it.
I agree with this, given what you said about the external plugin.
I think this should be handled by clients and not here. It's fairly simple for clients to send a request to disable the other plugins when flake8 is enabled.
Agreed. Please submit a pull request with your suggested changes. |
I don't understand what this means? What constitutes a "client" of pylsp? |
@michaelaye, the editors or IDEs that connect to this server, i.e. Neovim, Emacs, Sublime, Spyder, etc. |
Hi, currently there are two options for flake8 functionality:
pylsp/plugins/flake8_lint.py
, which is not advertised in the documentationI would like to report some issues with these plugins.
First issue: two functionally equivalent plugins (mostly)
The first issue I would like to point out is that the two plugins are equivalent: the internal one should be preferred, and the suggestion for the third party one removed.
Actually the pip version of the external plugin is buggy as it does not respect the boolean options passed to flake8's executable. I submitted a pull request to the repository to fix this issue and it was merged, but it is not published on pypi yet. Also, some functionality is missing with respect to the inner plugin, and overall it seems a bit more crude.
Second issue: flake8 support not explicitly stated in readme
While the "Configuration" section in the readme explains how to use configuration from flake8, the "Installation" section does not mention flake8 in the "list of optional providers that will be available (if the respective dependencies are found)". I think it should be explicitly stated, as at first it is not clear.
Third issue: flake8 vs pyflakes + pycodestyle + mccabe
As flake8 is a composition of pyflakes, pycodestyle and mccabe (plus various other flake8 plugins, if installed) I think it should be the default to disable the individual components if flake8 is run, as to avoid duplicated runtimes and reports. A simpler solution might be to advertise flake8 in the readme, as per the previous issue, and explicitly state something along the lines of "Flake8: linter to detect various errors (composition of pyflakes, pycodestyle and mccabe: use a combination of the components or flake8 alone to avoid duplicated error reports)."
This is an example of duplicated messages from pylsp, using atom client:
Click to view image
The text was updated successfully, but these errors were encountered: