From b5d223c13a62f62875c8c0db36a6794a562227b7 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 7 Apr 2023 13:19:18 +0100 Subject: [PATCH] Add tox-ini-fmt pre-commit hook (#496) --- .pre-commit-config.yaml | 4 ++++ tox.ini | 23 +++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3e746e..d1aa447 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/tox.ini b/tox.ini index 17e1df6..bb88516 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,17 @@ [tox] -envlist = - py{37,38,39,310,311} +requires = + tox>=4.2 +env_list = + py{311, 310, 39, 38, 37} [testenv] +deps = + -r requirements/{envname}.txt +set_env = + PYTHONDEVMODE = 1 commands = - python \ - -W error::ResourceWarning \ - -W error::DeprecationWarning \ - -W error::PendingDeprecationWarning \ - -m pytest {posargs:tests} -deps = -r requirements/{envname}.txt -setenv = - PYTHONDEVMODE=1 + python \ + -W error::ResourceWarning \ + -W error::DeprecationWarning \ + -W error::PendingDeprecationWarning \ + -m pytest {posargs:tests}