Skip to content

Commit d980d68

Browse files
Bumped minimum isort version to 7.0.0.
Added ignores relating to PyCQA/isort#2352.
1 parent e244d8b commit d980d68

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

.github/workflows/linters.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uses: actions/setup-python@v6
4646
with:
4747
python-version: '3.13'
48-
- run: python -m pip install "isort<6"
48+
- run: python -m pip install isort
4949
- name: isort
5050
# Pinned to v3.0.0.
5151
uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
files: 'docs/.*\.txt$'
1414
args: ["--rst-literal-block"]
1515
- repo: https://github.com/PyCQA/isort
16-
rev: 5.13.2
16+
rev: 7.0.0
1717
hooks:
1818
- id: isort
1919
- repo: https://github.com/PyCQA/flake8

django/db/backends/postgresql/compiler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from django.db.models.sql.compiler import (
1+
from django.db.models.sql.compiler import ( # isort:skip
22
SQLAggregateCompiler,
33
SQLCompiler,
44
SQLDeleteCompiler,
5+
SQLInsertCompiler as BaseSQLInsertCompiler,
6+
SQLUpdateCompiler,
57
)
6-
from django.db.models.sql.compiler import SQLInsertCompiler as BaseSQLInsertCompiler
7-
from django.db.models.sql.compiler import SQLUpdateCompiler
88

99
__all__ = [
1010
"SQLAggregateCompiler",

docs/internals/contributing/writing-code/coding-style.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Imports
137137

138138
.. console::
139139

140-
$ python -m pip install "isort >= 5.1.0"
140+
$ python -m pip install "isort >= 7.0.0"
141141
$ isort .
142142

143143
This runs ``isort`` recursively from your current directory, modifying any

docs/internals/contributing/writing-code/unit-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ environments can be seen as follows:
8383
blacken-docs
8484
flake8>=3.7.0
8585
docs
86-
isort>=5.1.0
86+
isort>=7.0.0
8787
lint-docs
8888

8989
Testing other Python versions and database backends

tests/contenttypes_tests/test_views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from django.http import Http404, HttpRequest
99
from django.test import TestCase, override_settings
1010

11-
from .models import (
11+
from .models import ( # isort:skip
1212
Article,
1313
Author,
1414
FooWithBrokenAbsoluteUrl,
@@ -17,9 +17,9 @@
1717
ModelWithM2MToSite,
1818
ModelWithNullFKToSite,
1919
SchemeIncludedURL,
20+
Site as MockSite,
21+
UUIDModel,
2022
)
21-
from .models import Site as MockSite
22-
from .models import UUIDModel
2323

2424

2525
@override_settings(ROOT_URLCONF="contenttypes_tests.urls")

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ commands =
7575
[testenv:isort]
7676
basepython = python3
7777
usedevelop = false
78-
deps = isort >= 5.1.0
78+
deps = isort >= 7.0.0
7979
changedir = {toxinidir}
8080
commands = isort --check-only --diff django tests scripts
8181

0 commit comments

Comments
 (0)