Skip to content

Commit 7da84e9

Browse files
committed
tox: Add 'lint' target
This simply runs the same commands as the GitHub CI workflows. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 479d91b commit 7da84e9

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ env:
1616
FORCE_COLOR: "1"
1717

1818
jobs:
19+
# If you update any of these commands, don't forget to update the equivalent
20+
# tox environment
1921
ruff:
2022
runs-on: ubuntu-latest
2123

tox.ini

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ setenv =
2828
commands=
2929
python -X dev -X warn_default_encoding -m pytest --durations 25 {posargs}
3030

31+
[testenv:lint]
32+
description =
33+
Run linters.
34+
extras =
35+
lint
36+
# If you update any of these commands, don't forget to update the equivalent
37+
# GitHub Workflow step
38+
commands =
39+
ruff . --diff --format github
40+
flake8 .
41+
isort --check-only --diff .
42+
mypy sphinx/
43+
3144
[testenv:docs]
3245
description =
3346
Build documentation.
@@ -70,4 +83,5 @@ description =
7083
extras =
7184
lint
7285
test
73-
commands = mypy {posargs}
86+
commands =
87+
mypy {posargs}

0 commit comments

Comments
 (0)