Skip to content

Commit 23ca2aa

Browse files
committed
style(migrations): modernize type annotations
Update type annotations in initial schema migration: - Use collections.abc.Sequence instead of typing.Sequence - Use str | None union syntax instead of Union[str, None] - Reorder imports alphabetically Auto-fixed by ruff linter for Python 3.10+ compatibility.
1 parent 5d56693 commit 23ca2aa

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

db/migrations/versions/20241124_0001_001_initial_schema.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88
including a query_history table for tracking SQL generation requests.
99
"""
1010

11-
from typing import Sequence, Union
11+
from collections.abc import Sequence
1212

13-
from alembic import op
1413
import sqlalchemy as sa
15-
14+
from alembic import op
1615

1716
# Revision identifiers, used by Alembic
1817
revision: str = "001"
19-
down_revision: Union[str, None] = None
20-
branch_labels: Union[str, Sequence[str], None] = None
21-
depends_on: Union[str, Sequence[str], None] = None
18+
down_revision: str | None = None
19+
branch_labels: str | Sequence[str] | None = None
20+
depends_on: str | Sequence[str] | None = None
2221

2322

2423
def upgrade() -> None:

0 commit comments

Comments
 (0)