Skip to content

Commit 777948c

Browse files
committed
fix: fix lint errors in constraint update
1 parent 1a5a3c1 commit 777948c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/alembic/versions/a5c42bcdda5c_update_officer_term_constraint_71.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,33 @@
55
Create Date: 2025-09-28 18:03:54.856781
66
77
"""
8-
from typing import Sequence, Union
8+
from collections.abc import Sequence
99

10-
from alembic import op
1110
import sqlalchemy as sa
1211

12+
from alembic import op
1313

1414
# revision identifiers, used by Alembic.
15-
revision: str = 'a5c42bcdda5c'
16-
down_revision: Union[str, None] = '876041e5b41c'
17-
branch_labels: Union[str, Sequence[str], None] = None
18-
depends_on: Union[str, Sequence[str], None] = None
15+
revision: str = "a5c42bcdda5c"
16+
down_revision: str | None = "876041e5b41c"
17+
branch_labels: str | Sequence[str] | None = None
18+
depends_on: str | Sequence[str] | None = None
1919

2020

2121
def upgrade() -> None:
2222
# ### commands auto generated by Alembic - please adjust! ###
23-
op.alter_column('election', 'type',
23+
op.alter_column("election", "type",
2424
existing_type=sa.VARCHAR(length=64),
2525
type_=sa.String(length=32),
2626
nullable=False)
27-
op.create_unique_constraint(op.f('uq_officer_term_computing_id'), 'officer_term', ['computing_id', 'position', 'start_date'])
27+
op.create_unique_constraint(op.f("uq_officer_term_computing_id"), "officer_term", ["computing_id", "position", "start_date"])
2828
# ### end Alembic commands ###
2929

3030

3131
def downgrade() -> None:
3232
# ### commands auto generated by Alembic - please adjust! ###
33-
op.drop_constraint(op.f('uq_officer_term_computing_id'), 'officer_term', type_='unique')
34-
op.alter_column('election', 'type',
33+
op.drop_constraint(op.f("uq_officer_term_computing_id"), "officer_term", type_="unique")
34+
op.alter_column("election", "type",
3535
existing_type=sa.String(length=32),
3636
type_=sa.VARCHAR(length=64),
3737
nullable=True)

0 commit comments

Comments
 (0)