1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Bumped minimum isort version to 7.0.0.

Added ignores relating to https://github.com/PyCQA/isort/issues/2352.
This commit is contained in:
Jacob Walls
2025-10-16 10:33:54 -04:00
parent e244d8bbb7
commit d980d68609
7 changed files with 11 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: '3.13'
- run: python -m pip install "isort<6"
- run: python -m pip install isort
- name: isort
# Pinned to v3.0.0.
uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb

View File

@@ -13,7 +13,7 @@ repos:
files: 'docs/.*\.txt$'
args: ["--rst-literal-block"]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
- repo: https://github.com/PyCQA/flake8

View File

@@ -1,10 +1,10 @@
from django.db.models.sql.compiler import (
from django.db.models.sql.compiler import ( # isort:skip
SQLAggregateCompiler,
SQLCompiler,
SQLDeleteCompiler,
SQLInsertCompiler as BaseSQLInsertCompiler,
SQLUpdateCompiler,
)
from django.db.models.sql.compiler import SQLInsertCompiler as BaseSQLInsertCompiler
from django.db.models.sql.compiler import SQLUpdateCompiler
__all__ = [
"SQLAggregateCompiler",

View File

@@ -137,7 +137,7 @@ Imports
.. console::
$ python -m pip install "isort >= 5.1.0"
$ python -m pip install "isort >= 7.0.0"
$ isort .
This runs ``isort`` recursively from your current directory, modifying any

View File

@@ -83,7 +83,7 @@ environments can be seen as follows:
blacken-docs
flake8>=3.7.0
docs
isort>=5.1.0
isort>=7.0.0
lint-docs
Testing other Python versions and database backends

View File

@@ -8,7 +8,7 @@ from django.contrib.sites.shortcuts import get_current_site
from django.http import Http404, HttpRequest
from django.test import TestCase, override_settings
from .models import (
from .models import ( # isort:skip
Article,
Author,
FooWithBrokenAbsoluteUrl,
@@ -17,9 +17,9 @@ from .models import (
ModelWithM2MToSite,
ModelWithNullFKToSite,
SchemeIncludedURL,
Site as MockSite,
UUIDModel,
)
from .models import Site as MockSite
from .models import UUIDModel
@override_settings(ROOT_URLCONF="contenttypes_tests.urls")

View File

@@ -75,7 +75,7 @@ commands =
[testenv:isort]
basepython = python3
usedevelop = false
deps = isort >= 5.1.0
deps = isort >= 7.0.0
changedir = {toxinidir}
commands = isort --check-only --diff django tests scripts