Skip to content

refactor: sorted imports in migration file#2196

Open
waketzheng wants to merge 2 commits into
tortoise:developfrom
waketzheng:sort-imports
Open

refactor: sorted imports in migration file#2196
waketzheng wants to merge 2 commits into
tortoise:developfrom
waketzheng:sort-imports

Conversation

@waketzheng
Copy link
Copy Markdown
Contributor

Description

  • Currently imports in migration file:
from tortoise import migrations
from tortoise.migrations import operations as ops
from tortoise import fields
from tortoise.indexes import Index, PartialIndex
from tortoise.migrations.constraints import UniqueConstraint
  • After this PR:
from tortoise import fields, migrations
from tortoise.indexes import Index, PartialIndex
from tortoise.migrations import operations as ops
from tortoise.migrations.constraints import UniqueConstraint

Motivation and Context

To avoid migration file changing by ruff check --fix --extend-select=I

How Has This Been Tested?

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 15, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing waketzheng:sort-imports (0ff989f) with develop (c2ff6a8)

Open in CodSpeed

Copy link
Copy Markdown
Contributor

@seladb seladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see one comment, otherwise LGTM

Comment thread tortoise/migrations/writer.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants