Skip to content

Commit 40346f8

Browse files
committed
Use isort to sort imports
1 parent 76fc985 commit 40346f8

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

.pre-commit-config.yaml

+4-9
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,11 @@ repos:
5252
- id: blacken-docs
5353
additional_dependencies:
5454
- black==23.1.0
55-
- repo: https://github.com/asottile/reorder-python-imports
56-
rev: v3.12.0
55+
- repo: https://github.com/pycqa/isort
56+
rev: 5.13.2
5757
hooks:
58-
- id: reorder-python-imports
59-
args:
60-
- --py38-plus
61-
- --application-directories
62-
- .:example:src
63-
- --add-import
64-
- 'from __future__ import annotations'
58+
- id: isort
59+
name: isort (python)
6560
- repo: https://github.com/PyCQA/flake8
6661
rev: 7.0.0
6762
hooks:

pyproject.toml

+12
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ Repository = "https://github.com/adamchainz/django-htmx"
4848
[tool.black]
4949
target-version = ['py38']
5050

51+
[tool.isort]
52+
add_imports = [
53+
"from __future__ import annotations"
54+
]
55+
force_single_line = true
56+
profile = "black"
57+
src_paths = [
58+
".",
59+
"example",
60+
"src",
61+
]
62+
5163
[tool.pytest.ini_options]
5264
addopts = """\
5365
--strict-config

src/django_htmx/http.py

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from django.http.response import HttpResponseBase
1111
from django.http.response import HttpResponseRedirectBase
1212

13-
1413
HTMX_STOP_POLLING = 286
1514

1615

tests/templatetags/test_django_htmx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from django.template import Context
44
from django.template import Template
5-
from django.test import override_settings
65
from django.test import SimpleTestCase
6+
from django.test import override_settings
77

88

99
class DjangoHtmxScriptTests(SimpleTestCase):

tests/test_jinja.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

3-
from django.test import override_settings
43
from django.test import SimpleTestCase
4+
from django.test import override_settings
55

66
from django_htmx.jinja import django_htmx_script
77

0 commit comments

Comments
 (0)