mirror of
https://github.com/django/django.git
synced 2025-08-21 01:09:13 +00:00
Refs #35680 -- Sorted shell default autoimports to prevent isort mismatches.
This commit is contained in:
parent
be8c9b19ba
commit
e767bd6838
@ -133,9 +133,9 @@ class Command(BaseCommand):
|
|||||||
[
|
[
|
||||||
"django.conf.settings",
|
"django.conf.settings",
|
||||||
"django.db.connection",
|
"django.db.connection",
|
||||||
"django.db.reset_queries",
|
|
||||||
"django.db.models",
|
"django.db.models",
|
||||||
"django.db.models.functions",
|
"django.db.models.functions",
|
||||||
|
"django.db.reset_queries",
|
||||||
"django.utils.timezone",
|
"django.utils.timezone",
|
||||||
"django.contrib.sessions.models.Session",
|
"django.contrib.sessions.models.Session",
|
||||||
"django.contrib.contenttypes.models.ContentType",
|
"django.contrib.contenttypes.models.ContentType",
|
||||||
@ -149,9 +149,9 @@ class Command(BaseCommand):
|
|||||||
default_imports = [
|
default_imports = [
|
||||||
"django.conf.settings",
|
"django.conf.settings",
|
||||||
"django.db.connection",
|
"django.db.connection",
|
||||||
"django.db.reset_queries",
|
|
||||||
"django.db.models",
|
"django.db.models",
|
||||||
"django.db.models.functions",
|
"django.db.models.functions",
|
||||||
|
"django.db.reset_queries",
|
||||||
"django.utils.timezone",
|
"django.utils.timezone",
|
||||||
]
|
]
|
||||||
app_models_imports = default_imports + [
|
app_models_imports = default_imports + [
|
||||||
|
@ -355,7 +355,7 @@ class ShellCommandAutoImportsTestCase(SimpleTestCase):
|
|||||||
" import shell\n"
|
" import shell\n"
|
||||||
" import django\n"
|
" import django\n"
|
||||||
" from django.conf import settings\n"
|
" from django.conf import settings\n"
|
||||||
" from django.db import connection, reset_queries, models\n"
|
" from django.db import connection, models, reset_queries\n"
|
||||||
" from django.db.models import functions\n"
|
" from django.db.models import functions\n"
|
||||||
" from django.utils import timezone\n"
|
" from django.utils import timezone\n"
|
||||||
" from django.contrib.contenttypes.models import ContentType\n"
|
" from django.contrib.contenttypes.models import ContentType\n"
|
||||||
@ -411,7 +411,7 @@ class ShellCommandAutoImportsTestCase(SimpleTestCase):
|
|||||||
1: "6 objects imported automatically (use -v 2 for details).",
|
1: "6 objects imported automatically (use -v 2 for details).",
|
||||||
2: "6 objects imported automatically:\n\n"
|
2: "6 objects imported automatically:\n\n"
|
||||||
" from django.conf import settings\n"
|
" from django.conf import settings\n"
|
||||||
" from django.db import connection, reset_queries, models\n"
|
" from django.db import connection, models, reset_queries\n"
|
||||||
" from django.db.models import functions\n"
|
" from django.db.models import functions\n"
|
||||||
" from django.utils import timezone",
|
" from django.utils import timezone",
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user