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:
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user