Skip to content

Commit

Permalink
Reformat code using black & isort
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Nov 5, 2022
1 parent 346a875 commit c1bf087
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion django_select2/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class Select2Conf(AppConf):
``settings.DJANGO_SELECT2_I18N`` refers to :attr:`.I18N_PATH`.
"""

JSON_ENCODER = 'django.core.serializers.json.DjangoJSONEncoder'
JSON_ENCODER = "django.core.serializers.json.DjangoJSONEncoder"
"""
A :class:`JSONEncoder<json.JSONEncoder>` used to generate the API response for the model widgets.
Expand Down
4 changes: 2 additions & 2 deletions django_select2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from django.core import signing
from django.core.signing import BadSignature
from django.http import Http404, JsonResponse
from django.views.generic.list import BaseListView
from django.utils.module_loading import import_string
from django.views.generic.list import BaseListView

from .cache import cache
from .conf import settings
Expand Down Expand Up @@ -45,7 +45,7 @@ def get(self, request, *args, **kwargs):
],
"more": context["page_obj"].has_next(),
},
encoder=import_string(settings.SELECT2_JSON_ENCODER)
encoder=import_string(settings.SELECT2_JSON_ENCODER),
)

def get_queryset(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@


def pytest_configure(config):
config.addinivalue_line(
"markers", "selenium: skip if selenium is not installed"
)
config.addinivalue_line("markers", "selenium: skip if selenium is not installed")


def random_string(n):
return "".join(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
HeavySelect2Widget,
ModelSelect2TagWidget,
ModelSelect2Widget,
Select2Widget,
Select2AdminMixin,
Select2Widget,
)
from tests.testapp import forms
from tests.testapp.forms import (
Expand Down

0 comments on commit c1bf087

Please sign in to comment.