Skip to content

fix: suppress Alembic CodeQL false positives - #362

Merged
suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/codeql-alembic-suppression
Aug 31, 2026
Merged

fix: suppress Alembic CodeQL false positives#362
suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/codeql-alembic-suppression

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Summary

  • Change the three migration __all__ declarations from annotated assignments to plain list assignments.
  • Preserve Alembic's required revision, down_revision, branch_labels, and depends_on metadata.

Why

The CodeQL py/unused-global-variable query recognizes names exported through a simple __all__ assignment, but not the annotated __all__: list[str] = ... form. This keeps the quality check enabled elsewhere without adding per-line suppressions or removing required migration metadata.

Verification

  • uv run ruff check on all three migrations
  • uv run pyright on all three migrations
  • git diff --check

@suguanYang
suguanYang merged commit dceaffa into main Aug 31, 2026
6 checks 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