Skip to content

Commit

Permalink
Add tox-ini-fmt pre-commit hook (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz committed Apr 7, 2023
1 parent eaa4214 commit bdadb8b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ repos:
- id: setup-cfg-fmt
args:
- --include-version-classifiers
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: 1.3.0
hooks:
- id: tox-ini-fmt
- repo: https://github.com/rstcheck/rstcheck
rev: v6.1.2
hooks:
Expand Down
38 changes: 20 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
[tox]
envlist =
py37-django{32}
py38-django{32,40,41,42}
py39-django{32,40,41,42}
py310-django{32,40,41,42}
py311-django{41,42}
requires =
tox>=4.2
env_list =
py311-django{42, 41}
py311-codegen
py310-django{42, 41, 40, 32}
py39-django{42, 41, 40, 32}
py38-django{42, 41, 40, 32}
py37-django{32}

[testenv]
# Ignoring 'path is deprecated' from certifi: https://github.com/certifi/python-certifi/issues/192
deps =
-r requirements/{envname}.txt
set_env =
PYTHONDEVMODE = 1
commands =
python \
-W error::ResourceWarning \
-W error::DeprecationWarning \
-W error::PendingDeprecationWarning \
-W 'ignore:path is deprecated. Use files() instead.:DeprecationWarning' \
-m coverage run \
-m pytest {posargs:tests}
deps = -r requirements/{envname}.txt
setenv =
PYTHONDEVMODE=1
python \
-W error::ResourceWarning \
-W error::DeprecationWarning \
-W error::PendingDeprecationWarning \
-W 'ignore:path is deprecated. Use files() instead.:DeprecationWarning' \
-m coverage run \
-m pytest {posargs:tests}

[testenv:py311-codegen]
deps =
commands =
python ./scripts/generate_default_media_types.py --check
deps =

0 comments on commit bdadb8b

Please sign in to comment.