Initial commit of Black as a development requirement
This commit is contained in:
parent
2a75a71ba2
commit
e95820a2fd
3 changed files with 16 additions and 0 deletions
|
@ -20,6 +20,18 @@ python -m piptools compile --output-file=requirements.txt
|
|||
python -m pip install -e ".[dev]"
|
||||
```
|
||||
|
||||
### How to run a code formatter?
|
||||
|
||||
Run [Black](https://black.readthedocs.io/):
|
||||
|
||||
```sh
|
||||
# Dry-run, showing what should be rewritten:
|
||||
python -m black --target-version=py36 --diff .
|
||||
|
||||
# Run code format:
|
||||
python -m black --target-version=py36 .
|
||||
```
|
||||
|
||||
### How to run a linter?
|
||||
|
||||
Run [Flake8](https://flake8.pycqa.org/):
|
||||
|
|
|
@ -10,3 +10,6 @@ extend-ignore =
|
|||
# https://github.com/PyCQA/pycodestyle/issues/373 is closed.
|
||||
# https://www.flake8rules.com/rules/E203.html
|
||||
E203,
|
||||
# Let Black manage line length by ignoring “Line too long (E203)”
|
||||
# https://www.flake8rules.com/rules/E501.html
|
||||
E501,
|
||||
|
|
1
setup.py
1
setup.py
|
@ -5,6 +5,7 @@ requirements = [
|
|||
]
|
||||
|
||||
dev_requirements = [
|
||||
"black",
|
||||
"flake8",
|
||||
"pip-tools",
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue