feat,fix(): 优化项目

- 优化yaml_processor(优化文件类型转换逻辑)
- 修复bug
This commit is contained in:
2025-03-07 17:28:41 +08:00
parent a6996ed500
commit 914b0301ba
9 changed files with 419 additions and 109 deletions

View File

@@ -23,13 +23,15 @@ class BaseFileProcessor(abc.ABC): # 使用 abc 模块定义抽象基类
"""加载."""
pass
@staticmethod
@abc.abstractmethod
def to_string(self) -> str:
def to_string(data: dict) -> str:
"""将文件内容转换为字符串。"""
pass
@staticmethod
@abc.abstractmethod
def to_dict(self, data: str) -> dict:
def to_dict(data: str) -> dict:
"""将文件内容转换为字典。"""
pass