File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,12 @@ def decorator(cls: type[InformationEnhancer]) -> type[InformationEnhancer]:
38
38
39
39
# 注册到全局注册表
40
40
for modality in modalities :
41
- modality = modality .value .lower () # 统一转换为小写
42
- if modality in ENHANCER_REGISTRY :
43
- logger .error (f"覆盖已存在的信息增强器: { modality } -> { cls .__name__ } " )
44
- raise ValueError (f"尝试覆盖已存在的信息增强器: { modality } -> { cls .__name__ } " )
45
- ENHANCER_REGISTRY [modality ] = cls
46
- logger .info (f"注册信息增强器: { modality } -> { cls .__name__ } " )
41
+ modality_type = modality .value .lower () # 统一转换为小写
42
+ if modality_type in ENHANCER_REGISTRY :
43
+ logger .error (f"覆盖已存在的信息增强器: { modality_type } -> { cls .__name__ } " )
44
+ raise ValueError (f"尝试覆盖已存在的信息增强器: { modality_type } -> { cls .__name__ } " )
45
+ ENHANCER_REGISTRY [modality_type ] = cls
46
+ logger .info (f"注册信息增强器: { modality_type } -> { cls .__name__ } " )
47
47
48
48
return cls
49
49
You can’t perform that action at this time.
0 commit comments