-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reformat codebase using python/black (#87)
* reformat codebase using python/black * black -l 80 * run black --check * mention coding style * just use black without options * run black only on py3 * use yaml merge key to define a few special steps for py3 * lists cannot be merged ... my YAML foo is weak :-( * maybe conditions do the trick * bad old copy & paste * define a new job, only for style checks * fix typo; add link to black editor integration * blacken setup.py * remove accidentally added test_script
- Loading branch information
1 parent
378c10a
commit 6fcd7f6
Showing
45 changed files
with
3,811 additions
and
2,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,44 @@ | ||
version: 2.0 | ||
|
||
my-steps: &steps | ||
build_and_test: &build_and_test_steps | ||
- checkout | ||
- run: sudo pip install -r requirements.txt | ||
- run: sudo pip install flake8 pytest | ||
- run: python --version ; pip --version ; pwd ; ls -l | ||
- run: pip install --user . | ||
# stop the build if there are Python syntax errors or undefined names | ||
- run: flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
- run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- run: sudo pip install pytest | ||
- run: python --version ; pip --version ; pwd ; ls -l | ||
- run: pytest | ||
|
||
|
||
jobs: | ||
StyleCheck: | ||
docker: | ||
- image: circleci/python:3.7 | ||
steps: | ||
- checkout | ||
- run: sudo pip install flake8 black | ||
- run: python --version ; pip --version ; pwd ; ls -l | ||
# stop the build if there are Python syntax errors or undefined names | ||
- run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
- run: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- run: black . --check | ||
|
||
|
||
Python2: | ||
docker: | ||
- image: circleci/python:2.7.15 | ||
steps: *steps | ||
steps: *build_and_test_steps | ||
|
||
Python3: | ||
docker: | ||
- image: circleci/python:3.7 | ||
steps: *steps | ||
steps: *build_and_test_steps | ||
|
||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- StyleCheck | ||
- Python2 | ||
- Python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.