1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16: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 uses: actions/setup-python@v6
with: with:
python-version: '3.13' python-version: '3.13'
- run: python -m pip install "isort<6" - run: python -m pip install isort
- name: isort - name: isort
# Pinned to v3.0.0. # Pinned to v3.0.0.
uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb

View File

@@ -13,7 +13,7 @@ repos:
files: 'docs/.*\.txt$' files: 'docs/.*\.txt$'
args: ["--rst-literal-block"] args: ["--rst-literal-block"]
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
rev: 5.13.2 rev: 7.0.0
hooks: hooks:
- id: isort - id: isort
- repo: https://github.com/PyCQA/flake8 - 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, SQLAggregateCompiler,
SQLCompiler, SQLCompiler,
SQLDeleteCompiler, SQLDeleteCompiler,
SQLInsertCompiler as BaseSQLInsertCompiler,
SQLUpdateCompiler,
) )
from django.db.models.sql.compiler import SQLInsertCompiler as BaseSQLInsertCompiler
from django.db.models.sql.compiler import SQLUpdateCompiler
__all__ = [ __all__ = [
"SQLAggregateCompiler", "SQLAggregateCompiler",

View File

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

View File

@@ -83,7 +83,7 @@ environments can be seen as follows:
blacken-docs blacken-docs
flake8>=3.7.0 flake8>=3.7.0
docs docs
isort>=5.1.0 isort>=7.0.0
lint-docs lint-docs
Testing other Python versions and database backends 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.http import Http404, HttpRequest
from django.test import TestCase, override_settings from django.test import TestCase, override_settings
from .models import ( from .models import ( # isort:skip
Article, Article,
Author, Author,
FooWithBrokenAbsoluteUrl, FooWithBrokenAbsoluteUrl,
@@ -17,9 +17,9 @@ from .models import (
ModelWithM2MToSite, ModelWithM2MToSite,
ModelWithNullFKToSite, ModelWithNullFKToSite,
SchemeIncludedURL, SchemeIncludedURL,
Site as MockSite,
UUIDModel,
) )
from .models import Site as MockSite
from .models import UUIDModel
@override_settings(ROOT_URLCONF="contenttypes_tests.urls") @override_settings(ROOT_URLCONF="contenttypes_tests.urls")

View File

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