add autoflake, isort and black checks to tox
This commit is contained in:
parent
db415d8f91
commit
6ff3e16279
|
@ -23,6 +23,12 @@ jobs:
|
||||||
uses: pdm-project/setup-pdm@v3
|
uses: pdm-project/setup-pdm@v3
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pdm install -d -G lint -G test
|
run: pdm install -d -G lint -G test
|
||||||
|
- name: Run autoflake check
|
||||||
|
run: pdm run tox -e autoflake
|
||||||
|
- name: Run isort check
|
||||||
|
run: pdm run tox -e isort
|
||||||
|
- name: Run black check
|
||||||
|
run: pdm run tox -e black
|
||||||
- name: Run pylint
|
- name: Run pylint
|
||||||
run: pdm run tox -e pylint
|
run: pdm run tox -e pylint
|
||||||
- name: Run mypy
|
- name: Run mypy
|
||||||
|
|
|
@ -38,6 +38,9 @@ lint = [
|
||||||
"autoflake>=2.2.0",
|
"autoflake>=2.2.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
|
|
||||||
[tool.pylint.main]
|
[tool.pylint.main]
|
||||||
ignore-patterns = ["^\\.#"]
|
ignore-patterns = ["^\\.#"]
|
||||||
|
|
||||||
|
|
20
tox.ini
20
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = pylint, mypy, bandit, py{39,310,311,py39}
|
envlist = autoflake, isort, black, pylint, mypy, bandit, py{39,310,311,py39}
|
||||||
isolated_build = True
|
isolated_build = True
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
|
@ -14,6 +14,24 @@ groups =
|
||||||
commands =
|
commands =
|
||||||
pytest --cov-report term-missing --cov-fail-under=100 --cov=operator_repo -v tests/
|
pytest --cov-report term-missing --cov-fail-under=100 --cov=operator_repo -v tests/
|
||||||
|
|
||||||
|
[testenv:autoflake]
|
||||||
|
groups =
|
||||||
|
lint
|
||||||
|
commands =
|
||||||
|
autoflake --check src tests
|
||||||
|
|
||||||
|
[testenv:isort]
|
||||||
|
groups =
|
||||||
|
lint
|
||||||
|
commands =
|
||||||
|
isort --check src tests
|
||||||
|
|
||||||
|
[testenv:black]
|
||||||
|
groups =
|
||||||
|
lint
|
||||||
|
commands =
|
||||||
|
black --check src tests
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
groups =
|
groups =
|
||||||
lint
|
lint
|
||||||
|
|
Loading…
Reference in New Issue