Skip to content

Commit

Permalink
Add config and CI for formatting with yapf.
Browse files Browse the repository at this point in the history
  • Loading branch information
nafur authored and mpreiner committed Jan 21, 2021
1 parent 2ea7dc6 commit aad0dc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ jobs:
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install flake8 pytest yapf
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: lint with flake8
run: flake8 . --exit-zero
- name: formatting with yapf
continue-on-error: true
run: yapf -r -d .
- name: test with pytest
run: pytest

Expand Down
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ max-complexity = 15
max-line-length = 140
show-source = True
statistics = True

[yapf]
based_on_style = pep8
split_before_arithmetic_operator = true
split_before_bitwise_operator = true
split_before_logical_operator = true

0 comments on commit aad0dc2

Please sign in to comment.