Skip to content

Commit 89fc26f

Browse files
chore: rename the "mypy" workflow to "tox" and enable pep8
Rename the "mypy" workflow to "tox" Add "pep8" to the list of tox tests to run in addition to "mypy". Also update list of ignores for flake8. Stop ignoring H501 and H803. H501: No errors were reported H803: Has been removed as a check from 'hacking' https://github.com/openstack/hacking/blob/master/setup.cfg
1 parent 70f3dae commit 89fc26f

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

.github/workflows/lint.yml

+7-10
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ env:
1212
PY_COLORS: 1
1313

1414
jobs:
15-
black:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions/setup-python@v2
20-
- uses: psf/black@stable
21-
with:
22-
black_args: ". --check"
2315
commitlint:
2416
runs-on: ubuntu-latest
2517
steps:
@@ -28,10 +20,15 @@ jobs:
2820
fetch-depth: 0
2921
- uses: wagoid/commitlint-github-action@v3
3022

31-
mypy:
23+
linters:
3224
runs-on: ubuntu-latest
3325
steps:
3426
- uses: actions/checkout@v2
3527
- uses: actions/setup-python@v2
3628
- run: pip install --upgrade tox
37-
- run: tox -e mypy
29+
- name: Run black code formatter (https://black.readthedocs.io/en/stable/)
30+
run: tox -e black -- --check
31+
- name: Run flake8 (https://flake8.pycqa.org/en/latest/)
32+
run: tox -e pep8
33+
- name: Run mypy static typing checker (http://mypy-lang.org/)
34+
run: tox -e mypy

tox.ini

+5-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ commands = {posargs}
5252
[flake8]
5353
exclude = .git,.venv,.tox,dist,doc,*egg,build,
5454
max-line-length = 88
55-
ignore = E501,H501,H803,W503
55+
# We ignore the following because we use black to handle code-formatting
56+
# E203: Whitespace before ':'
57+
# E501: Line too long
58+
# W503: Line break occurred before a binary operator
59+
ignore = E203,E501,W503
5660

5761
[testenv:docs]
5862
deps = -r{toxinidir}/rtd-requirements.txt

0 commit comments

Comments
 (0)