Add black to lint job
And rename tox' "mypy" env to "lint".
This commit is contained in:
parent
164d6ead03
commit
698d8fb387
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -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 }}
|
||||
|
@ -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
2
pyproject.toml
Normal file
@ -0,0 +1,2 @@
|
||||
[tool.black]
|
||||
target-version = ["py37"]
|
5
tox.ini
5
tox.ini
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user