Skip to content

Allow ruff 0.2.x; disable default enabled formatters #80

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 3 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Python](https://github.com/python-lsp/python-lsp-ruff/actions/workflows/python.yml/badge.svg)](https://github.com/python-lsp/python-lsp-ruff/actions/workflows/python.yml)

`python-lsp-ruff` is a plugin for `python-lsp-server` that adds linting, code action and formatting capabilities that are provided by [ruff](https://github.com/charliermarsh/ruff),
an extremely fast Python linter written in Rust.
an extremely fast Python linter and formatter written in Rust.

## Install

Expand All @@ -26,8 +26,8 @@ pip install "ruff<0.1.0" "python-lsp-ruff==1.5.3"

## Usage

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`.
This plugin will disable `pycodestyle`, `pyflakes`, `mccabe`, `autopep8`, and `yapf` by default, unless they are explicitly enabled in the client configuration.
When `python-lsp-ruff` is enabled, all linting diagnostics and formatting capabilities will be provided by `ruff`.

Any codes given in the `format` option will only be marked as `fixable` for ruff during the formatting operation, the user has to make sure that these codes are also in the list of codes that ruff checks!

Expand All @@ -38,7 +38,7 @@ Configuration options can be passed to the python-language-server. If a `pyproje
file is present in the project, `python-lsp-ruff` will ignore specific options (see below).

The plugin follows [python-lsp-server's configuration](https://github.com/python-lsp/python-lsp-server/#configuration).
This example configuration using for `neovim` shows the possible optionsL
This example configuration using for `neovim` shows the possible options:

```lua
pylsp = {
Expand Down
3 changes: 2 additions & 1 deletion pylsp_ruff/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def pylsp_settings():
"pyflakes": {"enabled": False},
"mccabe": {"enabled": False},
"pycodestyle": {"enabled": False},
"pyls_isort": {"enabled": False},
"yapf": {"enabled": False},
"autopep8": {"enabled": False},
}
}
return converter.unstructure(settings)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
dependencies = [
"ruff>=0.1.5, <0.2.0",
"ruff>=0.2.0, <0.3.0",
"python-lsp-server",
"cattrs!=23.2.1",
"lsprotocol>=2022.0.0a1",
Expand Down