Skip to content

Commit 2f0a2de

Browse files
committed
Added black to config files and GitHub actions.
1 parent e9d875f commit 2f0a2de

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,11 @@ jobs:
5656
python -m pip --version
5757
python -m tox --version
5858
python -m tox -e isort,flake
59+
60+
black:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v4
65+
- name: black
66+
uses: psf/black@stable

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Enhancements
1010

11+
* All Python code is now formatted with ``black``.
12+
1113
* Confirms support for Python 3.12.
1214

1315
* Confirms support for Django 5.0.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tool.black]
2+
target-version = ['py36']

setup.cfg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ request =
5454
locale/*/LC_MESSAGES/*.*
5555

5656
[flake8]
57-
exclude = .git,.tox,build,./request/migrations
58-
max-line-length = 119
57+
exclude = .git,.tox,build
58+
extend-ignore = E203
59+
max-line-length = 88
5960

6061
[isort]
61-
skip = migrations,.tox,build
62-
line_length = 119
62+
skip = .tox,build
63+
profile = black

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ envlist =
88
{py310,py311,py312}-djangomain-test
99
isort
1010
flake
11+
black
1112

1213
[testenv]
1314
basepython =
@@ -38,3 +39,8 @@ commands = isort --check-only --diff request tests setup.py runtests.py
3839
basepython = python3.12
3940
deps = flake8
4041
commands = flake8
42+
43+
[testenv:black]
44+
basepython = python3.12
45+
deps = black
46+
commands = black --check --diff .

0 commit comments

Comments
 (0)