style: 统一 Ruff 代码格式

This commit is contained in:
yml2213
2026-08-30 21:04:52 +08:00
parent c891ac982e
commit 47e19ed7b2
90 changed files with 5574 additions and 2350 deletions
@@ -25,10 +25,17 @@ def upgrade() -> None:
return
columns = {column["name"] for column in inspector.get_columns("huya_accounts")}
if "login_channel" not in columns:
op.add_column("huya_accounts", sa.Column("login_channel", sa.String(16), nullable=False, server_default=""))
op.add_column(
"huya_accounts",
sa.Column(
"login_channel", sa.String(16), nullable=False, server_default=""
),
)
indexes = {index["name"] for index in inspector.get_indexes("huya_accounts")}
if "ix_huya_accounts_login_channel" not in indexes:
op.create_index("ix_huya_accounts_login_channel", "huya_accounts", ["login_channel"])
op.create_index(
"ix_huya_accounts_login_channel", "huya_accounts", ["login_channel"]
)
def downgrade() -> None: