Skip to content

Commit 4c1c499

Browse files
authored
Merge pull request #11 from haplo/readme-development
Add Development section to README
2 parents 9a0b469 + 6ad0bd1 commit 4c1c499

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,42 @@
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+
911
In the same `virtualenv` as `python-lsp-server`:
1012

1113
```shell
1214
pip install python-lsp-black
1315
```
1416

17+
# Usage
18+
1519
To 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+
```

0 commit comments

Comments
 (0)