Skip to content

Commit b96f5ce

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3b7d045 commit b96f5ce

File tree

9 files changed

+21
-46
lines changed

9 files changed

+21
-46
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@ labels:
66
assignees:
77
- codingjoe
88
body:
9-
109
- type: markdown
1110
attributes:
1211
value: |
1312
Thank you for taking the time to report a bug.
1413
Please fill in as much of the template below as you're able.
15-
1614
- type: markdown
1715
attributes:
1816
value: |
1917
## Security issues
2018
Please do not report security issues here.
2119
Instead, disclose them as described in our [security policy](https://github.com/codingjoe/django-select2/security).
22-
2320
- type: textarea
2421
id: bug-description
2522
attributes:
@@ -28,7 +25,6 @@ body:
2825
placeholder: I found a bug
2926
validations:
3027
required: true
31-
3228
- type: textarea
3329
id: bug-steps
3430
attributes:
@@ -41,7 +37,6 @@ body:
4137
4. See error
4238
validations:
4339
required: true
44-
4540
- type: textarea
4641
id: bug-expected
4742
attributes:

.github/dependabot.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
version: 2
22
updates:
3-
- package-ecosystem: pip
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
- package-ecosystem: npm
8-
directory: "/"
9-
schedule:
10-
interval: daily
11-
- package-ecosystem: github-actions
12-
directory: "/"
13-
schedule:
14-
interval: daily
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: npm
8+
directory: "/"
9+
schedule:
10+
interval: daily
11+
- package-ecosystem: github-actions
12+
directory: "/"
13+
schedule:
14+
interval: daily

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ on:
44
branches:
55
- main
66
pull_request:
7-
87
jobs:
9-
108
dist:
119
runs-on: ubuntu-latest
1210
steps:
@@ -17,7 +15,6 @@ jobs:
1715
- uses: actions/upload-artifact@v6
1816
with:
1917
path: dist/*
20-
2118
standardjs:
2219
runs-on: ubuntu-latest
2320
steps:
@@ -27,15 +24,13 @@ jobs:
2724
node-version-file: '.nvmrc'
2825
- run: npm install -g standard
2926
- run: standard
30-
3127
docs:
3228
runs-on: ubuntu-latest
3329
steps:
3430
- uses: actions/checkout@v6
3531
- run: sudo apt-get install -y gettext graphviz
3632
- uses: astral-sh/setup-uv@v7
3733
- run: uv run sphinx-build -W -b doctest -b html docs docs/_build
38-
3934
PyTest:
4035
needs:
4136
- standardjs
@@ -57,7 +52,6 @@ jobs:
5752
python-version: ${{ matrix.python-version }}
5853
- run: uv run --with Django~=${{ matrix.django-version }}.0 pytest -m "not selenium"
5954
- uses: codecov/codecov-action@v5
60-
6155
Selenium:
6256
needs:
6357
- standardjs

.github/workflows/release.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
name: Release
2-
32
on:
43
release:
54
types: [published]
65
workflow_dispatch:
7-
86
jobs:
97
pypi-build:
108
runs-on: ubuntu-latest
11-
129
steps:
1310
- uses: actions/checkout@v6
1411
- uses: actions/setup-python@v6
@@ -20,21 +17,18 @@ jobs:
2017
with:
2118
name: release-dists
2219
path: dist/
23-
2420
pypi-publish:
2521
runs-on: ubuntu-latest
2622
needs:
2723
- pypi-build
2824
permissions:
2925
id-token: write
30-
3126
steps:
3227
- uses: actions/download-artifact@v7
3328
with:
3429
name: release-dists
3530
path: dist/
3631
- uses: pypa/gh-action-pypi-publish@release/v1
37-
3832
npmjs:
3933
name: npmjs.org
4034
runs-on: ubuntu-latest

.readthedocs.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
# .readthedocs.yaml
22
# Read the Docs configuration file
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4-
54
version: 2
6-
75
build:
86
os: ubuntu-20.04
97
apt_packages:
108
- graphviz
119
tools:
1210
python: "3.10"
13-
1411
sphinx:
1512
configuration: docs/conf.py
16-
17-
1813
python:
1914
install:
2015
- method: pip

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ include django_select2/static/django_select2/django_select2.js
22
include django_select2/static/django_select2/django_select2.css
33
prune .github
44
exclude .*
5-

docs/extra.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Here are our two models:
3030
Customizing a Form
3131
``````````````````
3232

33-
Lets link two widgets via a *dependent_fields* dictionary. The key represents the name of
33+
Lets link two widgets via a *dependent_fields* dictionary. The key represents the name of
3434
the field in the form. The value represents the name of the field in the model (used in `queryset`).
3535

3636
.. code-block:: python
@@ -122,4 +122,3 @@ Furthermore you may want to filter options on two or more select2 selections (so
122122
dependent_fields={'field1': 'field1', 'field2': 'field2'},
123123
)
124124
)
125-

example/manage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
"""Django's command-line utility for administrative tasks."""
3+
34
import os
45
import sys
56

tests/test_forms.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,7 @@ def test_selected_option(self, db):
271271
in not_required_field.widget.render("primary_genre", 1)
272272
or '<option value="1" selected>One</option>'
273273
in not_required_field.widget.render("primary_genre", 1)
274-
), not_required_field.widget.render(
275-
"primary_genre", 1
276-
)
274+
), not_required_field.widget.render("primary_genre", 1)
277275

278276
def test_many_selected_option(self, db, genres):
279277
field = HeavySelect2MultipleWidgetForm().fields["genres"]
@@ -296,9 +294,9 @@ def test_many_selected_option(self, db, genres):
296294
pk=2, value="Two"
297295
)
298296

299-
assert (
300-
selected_option in widget_output or selected_option_a in widget_output
301-
), widget_output
297+
assert selected_option in widget_output or selected_option_a in widget_output, (
298+
widget_output
299+
)
302300
assert selected_option2 in widget_output or selected_option2a in widget_output
303301

304302
@pytest.mark.selenium
@@ -412,9 +410,9 @@ def test_selected_option(self, db, genres):
412410
pk=genre2.pk, value=force_str(genre2)
413411
)
414412

415-
assert (
416-
selected_option in widget_output or selected_option_a in widget_output
417-
), widget_output
413+
assert selected_option in widget_output or selected_option_a in widget_output, (
414+
widget_output
415+
)
418416
assert unselected_option not in widget_output
419417

420418
def test_selected_option_label_from_instance(self, db, genres):

0 commit comments

Comments
 (0)