From f00ed536bde94f705163c2f13e46d42e12848b14 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 13 Feb 2025 03:45:12 +0100
Subject: [PATCH] Minor variable name change for better semantical precision.

---
 src/run.py                         | 8 ++++----
 src/templates/_macros.tmpl         | 2 +-
 src/templates/edit_structured.tmpl | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/run.py b/src/run.py
index 351e1fa..e27a438 100755
--- a/src/run.py
+++ b/src/run.py
@@ -469,21 +469,21 @@ class Handler(PlomHttpHandler):
                     continue
                 wealth_before = accounts_before[path].wealth
                 wealth_after = accounts_after[path].wealth
-                directly_set = full_name == path
+                direct_target = full_name == path
                 diff = {
                     c: a for c, a in (wealth_after - wealth_before
                                       ).moneys.items()
                     if a != 0
-                    or (directly_set
+                    or (direct_target
                         and c in booking.account_changes[full_name].moneys)}
-                if diff or directly_set:
+                if diff or direct_target:
                     displayed_currencies = set(diff.keys())
                     for wealth in wealth_before, wealth_after:
                         wealth.ensure_currencies(displayed_currencies)
                         wealth.purge_currencies_except(displayed_currencies)
                     node: dict[str, Any] = {
                             'name': path,
-                            'directly_set': directly_set,
+                            'direct_target': direct_target,
                             'wealth_before': wealth_before.moneys,
                             'wealth_diff': diff,
                             'wealth_after': wealth_after.moneys,
diff --git a/src/templates/_macros.tmpl b/src/templates/_macros.tmpl
index 85f3b14..bc98cc1 100644
--- a/src/templates/_macros.tmpl
+++ b/src/templates/_macros.tmpl
@@ -123,7 +123,7 @@ function taint() {
 
 {% macro booking_balance_account_with_children(node) %}
 <tr class="alternating">
-<td {% if node.directly_set %}class="directly_set"{% endif %}>{{node.name}}{% if node.children %}:{% endif %}</td>
+<td {% if node.direct_target %}class="direct_target"{% endif %}>{{node.name}}{% if node.children %}:{% endif %}</td>
 <td class="money">
 <table>
 {% for curr, amt in node.wealth_before.items() %}
diff --git a/src/templates/edit_structured.tmpl b/src/templates/edit_structured.tmpl
index 43a1858..ad7450e 100644
--- a/src/templates/edit_structured.tmpl
+++ b/src/templates/edit_structured.tmpl
@@ -8,7 +8,7 @@
 input.date_input, input.number_input { font-family: monospace; }
 input.number_input { text-align: right; }
 input.date_input { margin-right: 0.1em; }
-td.directly_set { font-weight: bold; }
+td.direct_target { font-weight: bold; }
 {% endblock %}
 
 
-- 
2.30.2