🔧 重构配置管理,添加配置文件支持,更新日志系统,优化守护进程,完善测试用例

This commit is contained in:
2025-04-29 02:51:37 +08:00
parent fec96e694d
commit 56996ef082
16 changed files with 323 additions and 139 deletions

View File

@@ -0,0 +1,24 @@
import json
from typing import Any
def pretty_print(obj: Any, indent: int=2) -> None:
"""
更好地打印对象
Args:
obj (Any): 要打印的对象
"""
print(json.dumps(obj, indent=indent, ensure_ascii=False))
def pretty_format(obj: Any, indent: int =2 ) -> str:
"""
更好地格式化对象
Args:
obj (Any): 要格式化的对象
Returns:
str: 格式化后的字符串
"""
return json.dumps(obj, indent=indent, ensure_ascii=False)