Skip to content

Commit

Permalink
opt:type-annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKURA-CAT committed Oct 20, 2024
1 parent 8f21780 commit c725539
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions swankit/callback/models/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def __init__(
key_id: str,
key_name: str,
key_class: Literal["CUSTOM", "SYSTEM"],
section_name: str,
section_sort: int,
chart_type: ChartType,
chart_reference: Literal["step", "time"],
section_name: Optional[str],
section_sort: Optional[int] = None,
error: Optional[ParseErrorInfo] = None,
config: Optional[Dict] = None,
):
Expand All @@ -37,10 +37,10 @@ def __init__(
:param key_id: 当前实验下,列的唯一id,与保存路径等信息有关
:param key_name: key的别名
:param key_class: 列的类型,CUSTOM为自定义列,SYSTEM为系统生成列
:param section_name: 列的组名
:param section_sort: 列在section中的参考排序,不代表实际排序
:param chart_type: 列对应的图表类型
:param chart_reference: 这个列对应图表的参考系,step为步数,time为时间
:param section_name: 列的组名
:param section_sort: 列在section中的参考排序,不代表实际排序(目前为冗余设计)
:param error: 列的类型错误信息
:param config: 列的额外配置信息
"""
Expand All @@ -49,12 +49,12 @@ def __init__(
self.key_name = key_name
self.key_class = key_class

self.section_name = section_name
self.section_sort = section_sort

self.chart_type = chart_type
self.chart_reference = chart_reference

self.section_name = section_name
self.section_sort = section_sort

self.error = error
self.config = config if config is not None else {}

Expand Down

0 comments on commit c725539

Please sign in to comment.