ruff fix但指定了--unsafe-fixes

This commit is contained in:
minecraft1024a
2025-10-05 21:48:32 +08:00
committed by Windpicker-owo
parent 04feb585b4
commit 2a89efe47a
76 changed files with 301 additions and 316 deletions

View File

@@ -17,7 +17,7 @@ logger = get_logger("s4u_config")
# 新增兼容dict和tomlkit Table
def is_dict_like(obj):
return isinstance(obj, (dict, Table))
return isinstance(obj, dict | Table)
# 新增递归将Table转为dict
@@ -318,7 +318,7 @@ def update_s4u_config():
continue
if key in target:
target_value = target[key]
if isinstance(value, dict) and isinstance(target_value, (dict, Table)):
if isinstance(value, dict) and isinstance(target_value, dict | Table):
update_dict(target_value, value)
else:
try: