Skip to content

refactor(migrations): reduce branch complexity in executor and operation_generator#2231

Open
eujuliomorais wants to merge 1 commit into
tortoise:developfrom
eujuliomorais:refactor/too-many-branches
Open

refactor(migrations): reduce branch complexity in executor and operation_generator#2231
eujuliomorais wants to merge 1 commit into
tortoise:developfrom
eujuliomorais:refactor/too-many-branches

Conversation

@eujuliomorais

Copy link
Copy Markdown

Description

This PR refactors MigrationExecutor.migrate and OperationGenerator._sort_by_dependencies to address R0912 (too-many-branches). Complex conditional structures were decomposed.

Motivation and Context

High cyclomatic complexity was hindering code clarity and maintainability.

How Has This Been Tested?

  • Ran the existing migration and dependency test suite in a local environment.

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.

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.

1 participant