Commit b33f8fa3 authored by Moul's avatar Moul

[enh] #263: Add Black dev dependency installable with Py ≥ 3.6

- Update the documentation accordingly
parent 4d1d7dc6
......@@ -36,18 +36,9 @@ poetry add ../duniterpy
```
## Formatting
We are using [Black](https://github.com/python/black) as a formatter tool.
Black is not in the development dependencies in order to keep Python 3.5 support.
There is three way you can install Black:
- From your package manager. i.e. Debian Buster: `sudo apt install black`
- On your machine via `pip`: `pip3 install black --user`
- In your Poetry virtualenv:
To have it installed in your Poetry virtualenv, you need Python v3.6 or greater.
In the `pyproject.toml` pass the Python requirement version from "3.5.x" to "3.6".
Then, install it with `poetry add black --dev`.
Once installed in your development environement, run Black on a Python file to format it:
We are using [Black](https://github.com/python/black) formatter tool.
To have Black installed in your Poetry virtualenv, you will need Python v3.6 or greater.
Run Black on a Python file to format it:
```bash
poetry run black silkaj/cli.py
```
......
This diff is collapsed.
......@@ -21,6 +21,7 @@ texttable = "^1.6"
PyNaCl = "^1.3"
[tool.poetry.dev-dependencies]
black = {version = "^19.10b0", allow-prereleases = true, python = "3.6"}
pre-commit = "^1.18"
pytest = "^5.1"
pytest-cov = "^2.7"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment