style: apply ruff format across backend + scripts (line-length 100)
Mechanical, whole-tree `ruff format` pass — no behaviour change. Recorded in .git-blame-ignore-revs (next commit) so git blame skips it.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"""Admin Configuration page API: read/edit the DB-overridable operational settings defined in
|
||||
app.sysconfig. Secret values (e.g. SMTP password) are write-only — never returned."""
|
||||
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
@@ -68,7 +69,11 @@ def set_config(
|
||||
new = None if s.secret else sysconfig.get(db, key)
|
||||
if s.secret or new != old:
|
||||
audit.record(
|
||||
db, admin.id, AuditAction.CONFIG_SET, target_type="config", target_id=key,
|
||||
db,
|
||||
admin.id,
|
||||
AuditAction.CONFIG_SET,
|
||||
target_type="config",
|
||||
target_id=key,
|
||||
summary=f"{key} = (secret updated)" if s.secret else f"{key} = {_redact(new)}",
|
||||
before=None if s.secret else {"value": _redact(old)},
|
||||
after=None if s.secret else {"value": _redact(new)},
|
||||
@@ -89,7 +94,11 @@ def reset_config(
|
||||
old = None if s.secret else sysconfig.get(db, key)
|
||||
sysconfig.reset(db, key)
|
||||
audit.record(
|
||||
db, admin.id, AuditAction.CONFIG_RESET, target_type="config", target_id=key,
|
||||
db,
|
||||
admin.id,
|
||||
AuditAction.CONFIG_RESET,
|
||||
target_type="config",
|
||||
target_id=key,
|
||||
summary=f"{key} → default",
|
||||
before=None if s.secret else {"value": _redact(old)},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user