Skip to content

Commit 46d2ce6

Browse files
authored
Reinstate tox -e lint (#2482)
1 parent eabceff commit 46d2ce6

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ You can run `tox` with the following arguments:
6767
`black` and `isort` are executed when `tox -e lint` is run. The reported errors can be tedious to fix manually.
6868
An easier way to do so is:
6969

70-
1. Run `.tox/lint-some-package/bin/black .`
71-
2. Run `.tox/lint-some-package/bin/isort .`
70+
1. Run `.tox/lint/bin/black .`
71+
2. Run `.tox/lint/bin/isort .`
7272

7373
Or you can call formatting and linting in one command by [pre-commit](https://pre-commit.com/):
7474

tox.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,17 @@ changedir = docs
11891189
commands =
11901190
sphinx-build -E -a -W -b html -T . _build/html
11911191

1192+
[testenv:lint]
1193+
basepython: python3
1194+
recreate = True
1195+
deps =
1196+
-r dev-requirements.txt
1197+
1198+
commands =
1199+
black --config {toxinidir}/pyproject.toml {{toxinidir}} --diff --check
1200+
isort --settings-path {toxinidir}/.isort.cfg {{toxinidir}} --diff --check-only
1201+
flake8 --config {toxinidir}/.flake8 {toxinidir}
1202+
11921203
[testenv:spellcheck]
11931204
basepython: python3
11941205
recreate = True

0 commit comments

Comments
 (0)