mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-07-15 20:53:00 +08:00
♻️ 为 row2dict 添加类型注解
This commit is contained in:
parent
b60ba566de
commit
e6c45e5b1b
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user