Skip to content

Commit a93cb63

Browse files
committed
change: adjust tox black stages to install from requirements file
Also remove uneeded config in the command, it is now set in the pyproject.toml so IDE's and other tooling outside tox picks up the setting.
1 parent 3d13d4c commit a93cb63

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tool.black]
2+
line-length = 100
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
black==24.3.0

tox.ini

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,23 @@ commands =
142142

143143
[testenv:black-format]
144144
# Used during development (before committing) to format .py files.
145+
skip_install = true
145146
setenv =
146147
LC_ALL=C.UTF-8
147148
LANG=C.UTF-8
148149
commands =
149-
black -l 100 ./
150+
pip install --exists-action=w -r requirements/tox/black_requirements.txt
151+
black ./
150152

151153
[testenv:black-check]
152154
# Used by automated build steps to check that all files are properly formatted.
155+
skip_install = true
153156
setenv =
154157
LC_ALL=C.UTF-8
155158
LANG=C.UTF-8
156159
commands =
157-
black -l 100 --diff --color --check ./
160+
pip install --exists-action=w -r requirements/tox/black_requirements.txt
161+
black --diff --color --check ./
158162

159163
[testenv:clean]
160164
skip_install = true

0 commit comments

Comments
 (0)