Skip to content

Disable mccabe too since ruff provides this functionality #7

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

Merged
merged 2 commits into from
Jan 2, 2023

Conversation

gav451
Copy link
Contributor

@gav451 gav451 commented Jan 1, 2023

It is preferable to disable the mccabe plugin in pylsp too, because ruff and therefore pylsp-ruff provides mccabe-like checking. Leaving the mccabe plugin enabled in pylsp may lead to confusing error messages.

@jhossbach
Copy link
Member

Mccabe support in ruff is not enabled by default so wouldn't it be better to not disable mccabe checking in pylsp?

@gav451
Copy link
Contributor Author

gav451 commented Jan 2, 2023

I really like Ruff's clear policy of keeping all project configuration in each project's pyproject.toml file and was a bit surprised to get conflicting (different) error messages after enabling McCabe support in my pyproject.toml files. It took me some time to track down the reason and configure my Emacs (eglot) setup.

Ruff's README also suggests to disable McCabe in pylsp itself, see:
Language Server Protocol (Unofficial).

Letting pylsp-ruff disable McCabe support in pylsp looks more in line with Ruff's configuration policy, but it is your decision.

By the way: your project made me discover Ruff, and I really like it. Thanks a lot for pylsp-ruff.

@jhossbach
Copy link
Member

Sounds reasonable 👍 I'll also mention it somewhere in the README to avoid unnecessary headaches.

By the way: your project made me discover Ruff, and I really like it. Thanks a lot for pylsp-ruff.

Glad to hear people using the plugin! Many thanks for the input:)

@jhossbach jhossbach merged commit faa07d9 into python-lsp:main Jan 2, 2023
@ryankask ryankask mentioned this pull request Jan 5, 2023
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.

2 participants