Skip to content

Commit

Permalink
Remove flake8 from auto-disable dict
Browse files Browse the repository at this point in the history
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
  • Loading branch information
projectgus committed Oct 18, 2023
1 parent 6a2bf7f commit 2373aed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ There also exists an [AUR package](https://aur.archlinux.org/packages/python-lsp

# Usage

This plugin will disable `flake8`, `pycodestyle`, `pyflakes`, `mccabe` and `pyls_isort` by default.
This plugin will disable `pycodestyle`, `pyflakes`, `mccabe` and `pyls_isort` by default, unless they are explicitly enabled in the client configuration.
When enabled, all linting diagnostics will be provided by `ruff`.
Sorting of the imports through `ruff` when formatting is enabled by default.
The list of code fixes can be changed via the `pylsp.plugins.ruff.format` option.
Expand Down
4 changes: 2 additions & 2 deletions pylsp_ruff/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
@hookimpl
def pylsp_settings():
log.debug("Initializing pylsp_ruff")
# this plugin disables flake8, mccabe, and pycodestyle by default
# This plugin disables some enabled-by-default plugins that duplicate Ruff
# functionality
settings = {
"plugins": {
"ruff": PluginSettings(),
"pyflakes": {"enabled": False},
"flake8": {"enabled": False},
"mccabe": {"enabled": False},
"pycodestyle": {"enabled": False},
"pyls_isort": {"enabled": False},
Expand Down

0 comments on commit 2373aed

Please sign in to comment.