style: 统一 Ruff 代码格式

This commit is contained in:
yml2213
2026-08-30 21:04:52 +08:00
parent c891ac982e
commit 47e19ed7b2
90 changed files with 5574 additions and 2350 deletions
+14 -3
View File
@@ -12,8 +12,17 @@ from ..models import AuditLog, User
_SENSITIVE_KEY_PARTS = (
"cookie", "token", "password", "passwd", "secret", "signature", "sign",
"qr_data", "authorization", "credential", "private_key",
"cookie",
"token",
"password",
"passwd",
"secret",
"signature",
"sign",
"qr_data",
"authorization",
"credential",
"private_key",
)
@@ -42,7 +51,9 @@ def record_audit(
) -> AuditLog:
"""加入一条审计记录;调用方负责与业务变更一起提交事务。"""
if isinstance(detail, Mapping):
detail_text = json.dumps(_safe_value(detail), ensure_ascii=False, separators=(",", ":"))
detail_text = json.dumps(
_safe_value(detail), ensure_ascii=False, separators=(",", ":")
)
elif detail is None:
detail_text = ""
else: