Skip to content
Snippets Groups Projects
Commit f20fd33d authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] #54 rename "black" command and stage to "format"

Add check-format command to Makefile
Fix format command to check only in gitlab-ci
parent d1f8a4a6
No related branches found
No related tags found
1 merge request!63Black
stages:
- prepare
- black
- format
- test
- build
- release
......@@ -48,14 +48,14 @@ push_to_github:
- setup.py
- tests/**/*.py
black:
format:
<<: *pyenv
<<: *changes
stage: black
stage: format
script:
- pyenv shell 3.6.4 # black install and run needs python 3.6.x minimum
- pip install -r requirements_dev.txt
- make black
- make check-format
test:
<<: *pyenv
......
.PHONY: docs tests check mypy pylint black
.PHONY: docs tests check check-format mypy pylint format
# generate documentation
docs:
......@@ -9,7 +9,7 @@ tests:
python3 -m unittest ${TESTS_FILTER}
# check
check: mypy pylint black
check: mypy pylint check-format
# check static typing
mypy:
......@@ -19,6 +19,10 @@ mypy:
pylint:
pylint --disable=C,R0913,R0903,R0902,R0914,R0912,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/
# check format
check-format:
black --check duniterpy
# format code
black:
format:
black duniterpy
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment