File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1
1
# python-lsp-ruff
2
+
3
+ [ ![ PyPi] ( https://img.shields.io/pypi/v/python-lsp-ruff.svg )] ( https://pypi.org/project/python-lsp-ruff/1.0.0/ )
4
+ [ ![ 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 )
5
+
2
6
Linter plugin for pylsp based using ruff.
7
+ Formatting via ` ruff ` 's ` --fix ` option will be available soon.
8
+
9
+ ## Install
10
+
11
+ In the same ` virtualenv ` as ` python-lsp-server ` :
12
+
13
+ ``` shell
14
+ pip install python-lsp-ruff
15
+ ```
16
+
17
+ # Usage
18
+
19
+ This plugin will disable ` flake8 ` and ` pycodestyle ` by default.
20
+ When enabled, all linting diagnostics will be provided by ` ruff ` .
21
+
22
+ # Configuration
23
+
24
+ Configuration options can be passed to the python-language-server. If a ` pyproject.toml `
25
+ file is present in the project, ` python-lsp-ruff ` will use these configuration options.
26
+
27
+ The plugin follows [ python-lsp-server's
28
+ configuration] ( https://github.com/python-lsp/python-lsp-server/#configuration ) . These are
29
+ the valid configuration keys:
30
+
31
+ - ` pylsp.plugins.ruff.enabled ` : boolean to enable/disable the plugin. ` true ` by default.
32
+ - ` pylsp.plugins.ruff.config ` : Path to optional ` pyproject.toml ` file.
33
+ - ` pylsp.plugins.ruff.exclude ` : Exclude files from being checked by ` ruff ` .
34
+ - ` pylsp.plugins.ruff.executable ` : Path to the ` ruff ` executable. Assumed to be in PATH by default.
35
+ - ` pylsp.plugins.ruff.ignore ` : Error codes to ignore.
36
+ - ` pylsp.plugins.ruff.lineLength ` : Set the line-length for length checks.
37
+ - ` pylsp.plugins.ruff.perFileIgnores ` : File-specific error codes to be ignored.
38
+ - ` pylsp.plugins.ruff.select ` : List of error codes to enable.
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ dev = ["pytest", "pre-commit"]
24
24
[project .entry-points .pylsp ]
25
25
pylsp_ruff = " pylsp_ruff.ruff_lint"
26
26
27
+ [project .urls ]
28
+ "Homepage" = " https://github.com/python-lsp/python-lsp-ruff"
29
+ "Bug Tracker" = " https://github.com/python-lsp/python-lsp-ruff/issues"
30
+
27
31
[tool .pytest .ini_options ]
28
32
pythonpath = [" ." ]
29
33
You can’t perform that action at this time.
0 commit comments