Skip to content

Commit 1be74b7

Browse files
committed
add commands_pre steps to lint target so that we guarantee pre-commit is always installed
1 parent 0eb904b commit 1be74b7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CONTRIBUTING.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Preparing Pull Requests
2222

2323
Afterwards ``pre-commit`` will run whenever you commit.
2424

25+
Note that this is automatically done when running ``tox -e linting``.
26+
2527
https://pre-commit.com/ is a framework for managing and maintaining multi-language pre-commit hooks
2628
to ensure code-style and code formatting is consistent.
2729

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ deps =
2424
pytest53: pytest==5.3.*
2525
pytest54: pytest==5.4.*
2626

27-
# potentially can add install_command ( see https://tox.readthedocs.io/en/latest/config.html?highlight=skip_install#conf-skip_install )
2827
[testenv:linting]
2928
basepython = python3
3029
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
30+
commands_pre =
31+
pip install pre-commit
32+
pre-commit install
3133
deps = pre-commit>=1.11.0
3234
skip_install = True

0 commit comments

Comments
 (0)