Skip to content

Commit

Permalink
Reinstate tox -e lint (#2482)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx authored May 10, 2024
1 parent eabceff commit 46d2ce6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ You can run `tox` with the following arguments:
`black` and `isort` are executed when `tox -e lint` is run. The reported errors can be tedious to fix manually.
An easier way to do so is:

1. Run `.tox/lint-some-package/bin/black .`
2. Run `.tox/lint-some-package/bin/isort .`
1. Run `.tox/lint/bin/black .`
2. Run `.tox/lint/bin/isort .`

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

Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,17 @@ changedir = docs
commands =
sphinx-build -E -a -W -b html -T . _build/html

[testenv:lint]
basepython: python3
recreate = True
deps =
-r dev-requirements.txt

commands =
black --config {toxinidir}/pyproject.toml {{toxinidir}} --diff --check
isort --settings-path {toxinidir}/.isort.cfg {{toxinidir}} --diff --check-only
flake8 --config {toxinidir}/.flake8 {toxinidir}

[testenv:spellcheck]
basepython: python3
recreate = True
Expand Down

0 comments on commit 46d2ce6

Please sign in to comment.