Add black to lint job

And rename tox' "mypy" env to "lint".
This commit is contained in:
Nikolaus Waxweiler 2022-12-13 11:26:00 +00:00
parent 164d6ead03
commit 698d8fb387
4 changed files with 9 additions and 3 deletions

View File

@ -27,7 +27,7 @@ jobs:
- name: Install packages
run: pip install tox
- name: Run Tox
run: tox -e mypy,package_readme
run: tox -e lint,package_readme
test:
runs-on: ${{ matrix.platform }}

View File

@ -3,3 +3,6 @@ tox>=2.5
bump2version>=0.5.6
sphinx>=1.5.5
mypy>=0.782
# Pin black as each version could change formatting, breaking CI randomly.
black==22.12.0

2
pyproject.toml Normal file
View File

@ -0,0 +1,2 @@
[tool.black]
target-version = ["py37"]

View File

@ -1,6 +1,6 @@
[tox]
minversion = 3.0
envlist = mypy, py3{7,8,9,10,11}-cov, htmlcov
envlist = lint, py3{7,8,9,10,11}-cov, htmlcov
skip_missing_interpreters=true
[testenv]
@ -41,11 +41,12 @@ commands =
coverage combine
coverage html
[testenv:mypy]
[testenv:lint]
deps =
-r dev-requirements.txt
skip_install = true
commands =
black --check --diff .
mypy
[testenv:codecov]