@@ -25,13 +25,6 @@ requires-python = ">=3.9.0"
25
25
[project .entry-points ."mdformat .parser_extension" ]
26
26
admon = " mdformat_admon"
27
27
28
- [project .optional-dependencies ]
29
- test = [
30
- " pytest >= 8.3.4" ,
31
- " pytest-beartype >= 0.1.1" ,
32
- " pytest-cov >= 6.0.0" ,
33
- ]
34
-
35
28
[project .urls ]
36
29
"Bug Tracker" = " https://github.com/kyleking/mdformat-admon/issues"
37
30
"Changelog" = " https://github.com/kyleking/mdformat-admon/releases"
@@ -134,44 +127,49 @@ all = true
134
127
in_place = true
135
128
trailing_comma_inline_array = true
136
129
130
+ [tool .tomlsort .overrides ."tool .tox .env .*" ]
131
+ inline_arrays = false
132
+
137
133
[tool .tox ]
134
+ basepython = [" python3.12" , " python3.9" ]
138
135
# Docs: https://tox.wiki/en/4.23.2/config.html#core
139
- envlist = [
140
- " py312-beartype" ,
141
- " py312-mypy" ,
142
- " py312-pre-commit" ,
143
- " py312-ruff" ,
144
- " py39-cov" ,
145
- " py39-hook" ,
146
- ]
136
+ env_list = [" py12-test" , " py312-pre-commit" , " py312-ruff" , " py312-type" , " py39-hook" , " py39-test" ]
147
137
isolated_build = true
148
138
requires = [" tox>=4.20.0" ]
149
139
skip_missing_interpreters = false
150
140
151
- [tool .tox ."py312-beartype" ]
152
- commands = [" pytest posargs --ff --nf -vv --exitfirst --beartype-packages='mdformat_admon'" ]
153
- extras = " test"
154
-
155
- [tool .tox ."py312-mypy" ]
156
- commands = [" mypy ./mdformat_admon" ]
157
- deps = " mypy>=1.13.0"
141
+ [tool .tox .env ."py12-test" ]
142
+ commands = [[" pytest" , " --cov=mdformat_admon" , {default = [], extend = true , replace = " posargs" }]]
143
+ deps = [" --requirement=tests/requirements.txt" ]
144
+ description = " Optionally, specify: '--exitfirst --failed-first --new-first -vv --beartype-packages=mdformat_admon'"
158
145
159
- [tool .tox ."py312-pre-commit" ]
160
- commands = [" pre-commit run posargs: --all-files" ]
146
+ [tool .tox .env . "py312-pre-commit" ]
147
+ commands = [[ " pre-commit" , " run" , " --all-files" , { default = [], extend = true , replace = " posargs " }] ]
161
148
deps = " pre-commit>=4.0.1"
149
+ skip_install = true
162
150
163
- [tool .tox ."py312-ruff" ]
151
+ [tool .tox .env . "py312-ruff" ]
164
152
commands = [
165
- " ruff check . --fix --unsafe-fixes " ,
166
- " ruff format . " ,
153
+ [ " ruff" , " check" , " . " , " --fix" , { default = [], extend = true , replace = " posargs " }] ,
154
+ [ " ruff" , " format" , " . " ] ,
167
155
]
168
156
deps = " ruff>=0.8.3"
157
+ description = " Optionally, specify: '--unsafe-fixes'"
169
158
skip_install = true
170
159
171
- [tool .tox ."py39-cov " ]
172
- commands = [" pytest --cov= mdformat_admon posargs" ]
173
- extras = " test "
160
+ [tool .tox .env . "py312-type " ]
161
+ commands = [[ " mypy " , " ./ mdformat_admon" , { default = [], extend = true , replace = " posargs" }] ]
162
+ deps = [ " mypy>=1.13.0 " ]
174
163
175
- [tool .tox ."py39-hook" ]
176
- commands = [" pre-commit run --config .pre-commit-test.yaml posargs: --all-files --verbose --show-diff-on-failure" ]
164
+ [tool .tox .env . "py39-hook" ]
165
+ commands = [[ " pre-commit" , " run" , " --config= .pre-commit-test.yaml" , " --all-files" , { default = [ " --show-diff-on-failure" , " --verbose " ], extend = true , replace = " posargs " }] ]
177
166
deps = " pre-commit>=4.0.1"
167
+ skip_install = true
168
+
169
+ [tool .tox .env ."py39-test" ]
170
+ commands = [[" pytest" , " --cov=mdformat_admon" ]]
171
+ deps = [" --requirement=tests/requirements.txt" ]
172
+
173
+ [tool .tox .env_run_base ]
174
+ # Validates that commands are set
175
+ commands = [[" error-commands-are-not-set" ]]
0 commit comments