Give extra its proper Any typing, handle None vs. 0 vs. empty string gracefully in default formatter.
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user