Opened 9 years ago
Last modified 9 years ago
#25384 closed Cleanup/optimization
New Migrations Generated with Improperly Sorted Imports — at Version 1
Reported by: | jambonrose | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
New migration files are generated with the following line of code (found in the django/db/migrations/writer.py
file):
from django.db import models, migrations
Anytime isort is run on a migration file (for example, for data migrations), it will reorder the import to:
from django.db import migrations, models
It would be great if we were generating properly sorted documents.
Note:
See TracTickets
for help on using tickets.