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
|
- name: Install packages
|
||||||
run: pip install tox
|
run: pip install tox
|
||||||
- name: Run Tox
|
- name: Run Tox
|
||||||
run: tox -e mypy,package_readme
|
run: tox -e lint,package_readme
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
@ -3,3 +3,6 @@ tox>=2.5
|
|||||||
bump2version>=0.5.6
|
bump2version>=0.5.6
|
||||||
sphinx>=1.5.5
|
sphinx>=1.5.5
|
||||||
mypy>=0.782
|
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]
|
[tox]
|
||||||
minversion = 3.0
|
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
|
skip_missing_interpreters=true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -41,11 +41,12 @@ commands =
|
|||||||
coverage combine
|
coverage combine
|
||||||
coverage html
|
coverage html
|
||||||
|
|
||||||
[testenv:mypy]
|
[testenv:lint]
|
||||||
deps =
|
deps =
|
||||||
-r dev-requirements.txt
|
-r dev-requirements.txt
|
||||||
skip_install = true
|
skip_install = true
|
||||||
commands =
|
commands =
|
||||||
|
black --check --diff .
|
||||||
mypy
|
mypy
|
||||||
|
|
||||||
[testenv:codecov]
|
[testenv:codecov]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user