style: 统一 Ruff 代码格式
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user