mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Add pre-commit hook for tox-ini-fmt
Format tox.ini automatically with a pre-commit hook
This commit is contained in:
parent
68294256a1
commit
e5af36958b
2 changed files with 22 additions and 5 deletions
|
|
@ -53,3 +53,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-hooks-apply
|
- id: check-hooks-apply
|
||||||
- id: check-useless-excludes
|
- id: check-useless-excludes
|
||||||
|
- repo: https://github.com/tox-dev/tox-ini-fmt
|
||||||
|
rev: 0.5.1
|
||||||
|
hooks:
|
||||||
|
- id: tox-ini-fmt
|
||||||
|
|
|
||||||
23
tox.ini
23
tox.ini
|
|
@ -1,9 +1,20 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py36,py37,py38,pypy3,pre-commit
|
envlist =
|
||||||
|
py38
|
||||||
|
py37
|
||||||
|
py36
|
||||||
|
pypy3
|
||||||
|
pre-commit
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -rrequirements-dev.txt
|
passenv =
|
||||||
passenv = APPDATA HOME LOCALAPPDATA PROGRAMFILES RUSTUP_HOME
|
APPDATA
|
||||||
|
HOME
|
||||||
|
LOCALAPPDATA
|
||||||
|
PROGRAMFILES
|
||||||
|
RUSTUP_HOME
|
||||||
|
deps =
|
||||||
|
-rrequirements-dev.txt
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
coverage erase
|
||||||
coverage run -m pytest {posargs:tests}
|
coverage run -m pytest {posargs:tests}
|
||||||
|
|
@ -11,8 +22,10 @@ commands =
|
||||||
|
|
||||||
[testenv:pre-commit]
|
[testenv:pre-commit]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
deps = pre-commit
|
deps =
|
||||||
commands = pre-commit run --all-files --show-diff-on-failure
|
pre-commit
|
||||||
|
commands =
|
||||||
|
pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|
||||||
[pep8]
|
[pep8]
|
||||||
ignore = E265,E501,W504
|
ignore = E265,E501,W504
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue