File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 66
77> [ Black] ( https://github.com/ambv/black ) plugin for the [ Python LSP Server] ( https://github.com/python-lsp/python-lsp-server ) .
88
9+ ## Install
10+
911In the same ` virtualenv ` as ` python-lsp-server ` :
1012
1113``` shell
1214pip install python-lsp-black
1315```
1416
17+ # Usage
18+
1519To avoid unexpected results you should make sure ` yapf ` and ` autopep8 ` are not installed.
1620
1721* ` python-lsp-black ` can either format an entire file or just the selected text.
1822* The code will only be formatted if it is syntactically valid Python.
1923* Text selections are treated as if they were a separate Python file.
2024 Unfortunately this means you can't format an indented block of code.
2125* ` python-lsp-black ` will use your project's [ pyproject.toml] ( https://github.com/ambv/black#pyprojecttoml ) if it has one.
26+
27+ # Development
28+
29+ To install the project for development you need to specify the dev optional dependencies:
30+
31+ ``` shell
32+ python -m venv .venv
33+ . .venv/bin/activate
34+ pip install -e .[dev]
35+ ```
36+
37+ To run tests:
38+
39+ ``` shell
40+ make test
41+ ```
42+
43+ To run linters (flake8, black, isort, mypy...)
44+
45+ ``` shell
46+ make lint
47+ ```
You can’t perform that action at this time.
0 commit comments