Skip to content

Commit

Permalink
Reinstate tox -e lint
Browse files Browse the repository at this point in the history
Reintroduce the lint environment after 5116305
to just run the cheap linting tools to make it easier for developers to
have tools at hand.
  • Loading branch information
xrmx committed May 2, 2024
1 parent 2a174b2 commit 625d3eb
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 625d3eb

Please sign in to comment.