aboutsummaryrefslogtreecommitdiffstats
path: root/firefly_cli/resolver.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-03 18:07:47 +0200
committerDanilo M. <danix@danix.xyz>2026-07-03 18:07:47 +0200
commitd44d62f5944c2765ba009197cc3ac5bb50d073e2 (patch)
tree0d63be2ea8671ed50ffde99ad533a852444c47d8 /firefly_cli/resolver.py
parent73fffe2e6f359b302b72b1f3740a08e471a31acc (diff)
downloadfirefly-cli-d44d62f5944c2765ba009197cc3ac5bb50d073e2.tar.gz
firefly-cli-d44d62f5944c2765ba009197cc3ac5bb50d073e2.zip
fix(budget): group help blurb, exact Decimal spent, resolver comment (v0.4.1)v0.4.1
Follow-ups from the v0.4.0 review: - add the missing _GROUP_HELP blurb for the budget group (every other group shows one) + a regression test asserting all groups have one. - _spent_scalar sums with decimal.Decimal instead of float (exact money). - note the numeric-name sniffing tradeoff in resolver.budget(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'firefly_cli/resolver.py')
-rw-r--r--firefly_cli/resolver.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/firefly_cli/resolver.py b/firefly_cli/resolver.py
index 53144e1..cb7e9a8 100644
--- a/firefly_cli/resolver.py
+++ b/firefly_cli/resolver.py
@@ -48,6 +48,10 @@ class Resolver:
# transaction), so we resolve to an id. A numeric-looking ref goes
# straight to the show endpoint (lets same-name-safe callers pin an id);
# otherwise match by name against the list.
+ # ponytail: sniffing digits makes a budget literally named "7"
+ # unreachable by name (same lossy tradeoff ISSUES.md #2 hit for
+ # accounts). All-digit budget names are rare; add a --budget-id flag to
+ # tx add if this ever bites, mirroring --from-id/--to-id.
if str(name_or_id).isdigit():
return self.budget_by_id(name_or_id)
return self._match("budget", self._list("/api/v1/budgets"), name_or_id)