Skip to content

Commit

Permalink
♻️ 为 row2dict 添加类型注解
Browse files Browse the repository at this point in the history
  • Loading branch information
suyiiyii committed Oct 28, 2024
1 parent b60ba56 commit e6c45e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nonebot_bison/config/subs_io/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from ..db_model import Model


class NBESFVerMatchErr(Exception): ...


class NBESFParseErr(Exception): ...


def row2dict(row):
def row2dict(row: Model) -> dict:
d = {}
for column in row.__table__.columns:
d[column.name] = str(getattr(row, column.name))
Expand Down

0 comments on commit e6c45e5

Please sign in to comment.