完成 Ruff 全量清理
This commit is contained in:
@@ -109,7 +109,7 @@ def decrypt_value(value: str | None) -> str | None:
|
||||
for candidate in _key_candidates():
|
||||
try:
|
||||
return _decrypt_with_candidate(value, candidate)
|
||||
except Exception as exc:
|
||||
except Exception as exc: # noqa: BLE001 外部接口与任务边界需要保留宽泛异常兜底
|
||||
last_error = exc
|
||||
raise ValueError(
|
||||
"敏感字段解密失败,请确认 APP_ENCRYPTION_KEY 是否正确"
|
||||
@@ -124,7 +124,7 @@ def decrypt_value_with_key_name(value: str) -> tuple[str, str]:
|
||||
for candidate in _key_candidates():
|
||||
try:
|
||||
return _decrypt_with_candidate(value, candidate), candidate.name
|
||||
except Exception as exc:
|
||||
except Exception as exc: # noqa: BLE001 外部接口与任务边界需要保留宽泛异常兜底
|
||||
last_error = exc
|
||||
raise ValueError(
|
||||
"敏感字段解密失败,请确认 APP_ENCRYPTION_KEY 是否正确"
|
||||
|
||||
Reference in New Issue
Block a user