Give extra its proper Any typing, handle None vs. 0 vs. empty string gracefully in default formatter.

This commit is contained in:
Leo Vasanko
2026-08-07 15:47:07 +00:00
parent f63f6e74c6
commit 810f379e87
4 changed files with 22 additions and 16 deletions
+4 -3
View File
@@ -212,9 +212,10 @@ def resolve_user_key(value: str) -> str | None:
- By default a transaction is logged with an `action by user` header followed
by the diff lines. Added paths are colored green, deleted paths red.
- `kanta.transaction(..., extra="...")` accepts a display-only string that is
appended after the action in the header (colored by Kanta); it is never
persisted in the `ChangeRecord`.
- `kanta.transaction(..., extra=...)` accepts a display-only value that is
shown after the action in the header. Anything other than `None` is
printed str-converted (colored by Kanta), unless a custom logemit handler
does something else with it; it is never persisted in the `ChangeRecord`.
- `kanta.transaction(..., logdiff=False)` skips building and printing the diff
body and logs only the header, which is useful for large or noisy
changesets. Diff output can also be disabled globally with