aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops')
-rw-r--r--python/report_ops/utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/report_ops/utils.py b/python/report_ops/utils.py
index 3bf56462..0c322fb7 100644
--- a/python/report_ops/utils.py
+++ b/python/report_ops/utils.py
@@ -205,7 +205,7 @@ class Monitor:
def __init_subclass__(cls, headers, num_format=[]):
cls.headers = headers
- cls.line_format = line_format
+ cls.num_format = num_format
@classmethod
def stage(cls, d: dict):
@@ -215,7 +215,7 @@ class Monitor:
def format(cls):
for line in cls._insert_queue:
for f, i in cls.num_format:
- line[i] = f.format[i]
+ line[i] = f.format(line[i])
@classmethod
def to_tabulate(cls):
@@ -229,7 +229,9 @@ class Monitor:
class GFSMonitor(
- Monitor, headers=("date", "amount", "currency"), num_format=[("{0:,.2f}", 1)]
+ Monitor,
+ headers=("date", "portfolio", "amount", "currency"),
+ num_format=[("{0:,.2f}", 2)],
):
@classmethod
def email(cls, fund):