Skip to content

Commit 2373aed

Browse files
authored
Remove flake8 from auto-disable dict
flake8 plugin is disabled by default. If it's been enabled in the pylsp configuration then it's not possible for another plugin to disable it. The other four plugins (pycodestyle, pyflakes, mccabe, pyls_isort) are all enabled by default so the ruff plugin can disable them, provided they're not explicitly enabled in the configuration. Closes #46
1 parent 6a2bf7f commit 2373aed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ There also exists an [AUR package](https://aur.archlinux.org/packages/python-lsp
1919

2020
# Usage
2121

22-
This plugin will disable `flake8`, `pycodestyle`, `pyflakes`, `mccabe` and `pyls_isort` by default.
22+
This plugin will disable `pycodestyle`, `pyflakes`, `mccabe` and `pyls_isort` by default, unless they are explicitly enabled in the client configuration.
2323
When enabled, all linting diagnostics will be provided by `ruff`.
2424
Sorting of the imports through `ruff` when formatting is enabled by default.
2525
The list of code fixes can be changed via the `pylsp.plugins.ruff.format` option.

pylsp_ruff/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@
6464
@hookimpl
6565
def pylsp_settings():
6666
log.debug("Initializing pylsp_ruff")
67-
# this plugin disables flake8, mccabe, and pycodestyle by default
67+
# This plugin disables some enabled-by-default plugins that duplicate Ruff
68+
# functionality
6869
settings = {
6970
"plugins": {
7071
"ruff": PluginSettings(),
7172
"pyflakes": {"enabled": False},
72-
"flake8": {"enabled": False},
7373
"mccabe": {"enabled": False},
7474
"pycodestyle": {"enabled": False},
7575
"pyls_isort": {"enabled": False},

0 commit comments

Comments
 (0)