Skip to content

Commit 7625d72

Browse files
committed
style: apply ruff formatting to migrations and init_db
1 parent 5ec499d commit 7625d72

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

migrations/versions/cbaf2fee6e9b_add_is_demo_field_to_user_model.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ def upgrade() -> None:
2222
"""Upgrade schema."""
2323
# ### commands auto generated by Alembic - please adjust! ###
2424
with op.batch_alter_table("user", schema=None) as batch_op:
25-
batch_op.add_column(sa.Column("is_demo", sa.Boolean(), nullable=False, server_default=sa.text("false")))
25+
batch_op.add_column(
26+
sa.Column(
27+
"is_demo",
28+
sa.Boolean(),
29+
nullable=False,
30+
server_default=sa.text("false"),
31+
)
32+
)
2633

2734
# ### end Alembic commands ###
2835

src/commands/init_db.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ async def create_user_if_not_exists(
4040
plain_password=password,
4141
is_demo=is_demo,
4242
)
43-
new_user = User(
44-
**user_in.model_dump(exclude={"plain_password"})
45-
)
43+
new_user = User(**user_in.model_dump(exclude={"plain_password"}))
4644
new_user.hashed_password = get_password_hash(user_in.plain_password)
4745
session.add(new_user)
4846
await session.commit()

0 commit comments

Comments
 (0)