mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add tox `lint` target (#11602)
Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -16,6 +16,8 @@ env:
|
||||
FORCE_COLOR: "1"
|
||||
|
||||
jobs:
|
||||
# If you update any of these commands, don't forget to update the equivalent
|
||||
# tox environment
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
21
tox.ini
21
tox.ini
@@ -1,7 +1,6 @@
|
||||
[tox]
|
||||
minversion = 2.4.0
|
||||
minversion = 4.2.0
|
||||
envlist = py{39,310,311,312,313}
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
@@ -29,8 +28,20 @@ setenv =
|
||||
commands=
|
||||
python -X dev -X warn_default_encoding -m pytest --durations 25 {posargs}
|
||||
|
||||
[testenv:lint]
|
||||
description =
|
||||
Run linters.
|
||||
extras =
|
||||
lint
|
||||
# If you update any of these commands, don't forget to update the equivalent
|
||||
# GitHub Workflow step
|
||||
commands =
|
||||
ruff . --diff --format github
|
||||
flake8 .
|
||||
isort --check-only --diff .
|
||||
mypy sphinx/
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
description =
|
||||
Build documentation.
|
||||
extras =
|
||||
@@ -40,7 +51,6 @@ commands =
|
||||
sphinx-build -M {env:BUILDER:html} ./doc ./build/sphinx -nW --keep-going {posargs}
|
||||
|
||||
[testenv:docs-live]
|
||||
basepython = python3
|
||||
description =
|
||||
Build documentation.
|
||||
extras =
|
||||
@@ -73,4 +83,5 @@ description =
|
||||
extras =
|
||||
lint
|
||||
test
|
||||
commands = mypy {posargs}
|
||||
commands =
|
||||
mypy {posargs}
|
||||
|
||||
Reference in New Issue
Block a user