Ruff
This commit is contained in:
+3
-1
@@ -85,7 +85,9 @@ async def main() -> None:
|
||||
data.total = 99
|
||||
raise ValueError("simulated failure")
|
||||
except ValueError:
|
||||
print(f"\nReset rolled back: {data.total=} (we can always read data without tx)\n")
|
||||
print(
|
||||
f"\nReset rolled back: {data.total=} (we can always read data without tx)\n"
|
||||
)
|
||||
|
||||
with kanta.transaction(action="delete", user="userid002") as data:
|
||||
del data.users["userid001"]
|
||||
|
||||
+1
-3
@@ -370,9 +370,7 @@ def _format_change_lines(
|
||||
keys = []
|
||||
for k in value:
|
||||
key_path = _join_path(base_path, str(k))
|
||||
keys.append(
|
||||
(k, _format_value(k, key_path, max_len=30, logfmt=logfmt))
|
||||
)
|
||||
keys.append((k, _format_value(k, key_path, max_len=30, logfmt=logfmt)))
|
||||
field_width = max(displaywidth(kd) for _, kd in keys)
|
||||
field_width = max(field_width, 12)
|
||||
# Each item line is " {key:{field_width}}: {value}"; budget the
|
||||
|
||||
Reference in New Issue
Block a user