Skip to content

Commit

Permalink
Add isort and activate CI fail for black/isort.
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Oct 20, 2022
1 parent 922b3a5 commit 6d1eec5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,11 @@ jobs:
- name: flake8
tox: flake8
# continue_on_error: true
- name: isort
tox: isort_CI
# continue_on_error: true
- name: black
tox: black
tox: black_CI
# continue_on_error: true
- name: Docs
tox: docs
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pep8==1.7.1
pyflakes==2.4.0
pydocstyle==6.1.1
pycodestyle==2.8.0
pylint==2.14.5
pylint==2.15.4
pytest==7.1.2
pytest-asyncio==0.18.3
pytest-cov==3.0.0
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ omit =
[isort]
py_version=38
profile=black
line_length = 80
line_length = 79
lines_after_imports = 2
known_local_folder =
common
Expand Down
17 changes: 15 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ commands =
deps = -r requirements.txt
ignore_errors = false
commands =
isort examples pymodbus test
isort --recursive examples pymodbus test

[testenv:isort_CI]
deps = -r requirements.txt
ignore_errors = false
commands =
isort --check --recursive examples pymodbus test

[testenv:bandit]
deps = -r requirements.txt
Expand All @@ -44,14 +50,22 @@ commands =

[testenv:flake8]
deps = -r requirements.txt
ignore_errors = false
commands =
flake8 doc/ examples/ pymodbus/ test/

[testenv:black]
deps = -r requirements.txt
ignore_errors = false
commands =
black --safe --quiet examples/ pymodbus/ test/

[testenv:black_CI]
deps = -r requirements.txt
ignore_errors = false
commands =
black --check --safe --quiet examples/ pymodbus/ test/

[testenv:docs]
allowlist_externals =
make
Expand All @@ -68,4 +82,3 @@ commands =
ls -la coverage_reports
coverage combine coverage_reports
coverage report --fail-under=60 --ignore-errors

0 comments on commit 6d1eec5

Please sign in to comment.