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]"
|
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?
|
### How to run a linter?
|
||||||
|
|
||||||
Run [Flake8](https://flake8.pycqa.org/):
|
Run [Flake8](https://flake8.pycqa.org/):
|
||||||
|
|
|
@ -10,3 +10,6 @@ extend-ignore =
|
||||||
# https://github.com/PyCQA/pycodestyle/issues/373 is closed.
|
# https://github.com/PyCQA/pycodestyle/issues/373 is closed.
|
||||||
# https://www.flake8rules.com/rules/E203.html
|
# https://www.flake8rules.com/rules/E203.html
|
||||||
E203,
|
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 = [
|
dev_requirements = [
|
||||||
|
"black",
|
||||||
"flake8",
|
"flake8",
|
||||||
"pip-tools",
|
"pip-tools",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue