From 819cda68f00f64ed9882fcefdaa70151ab9b3464 Mon Sep 17 00:00:00 2001 From: Dean Malmgren Date: Tue, 15 Dec 2015 11:00:30 -0600 Subject: [PATCH] off-by-one error in calculating cash_in_bank outcomes --- a_model/argparsers.py | 1 + a_model/reports/__init__.py | 1 - bin/simulate_cash_in_bank.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/a_model/argparsers.py b/a_model/argparsers.py index 501cf03..834bcd1 100644 --- a/a_model/argparsers.py +++ b/a_model/argparsers.py @@ -7,6 +7,7 @@ # cherry picked from http://stackoverflow.com/a/8527629/564709 class DefaultListAction(argparse.Action): CHOICES = list(reports.AVAILABLE_REPORTS) + def __call__(self, parser, namespace, values, option_string=None): if values: for value in values: diff --git a/a_model/reports/__init__.py b/a_model/reports/__init__.py index 78ee1b1..f88059c 100644 --- a/a_model/reports/__init__.py +++ b/a_model/reports/__init__.py @@ -33,7 +33,6 @@ def _get_report_cls(module_name): return obj return None - # automatically detect which reports need to be downloaded form quickbooks, # gdrive, and uploaded back to gdrive depending on class attributes on the # report objects diff --git a/bin/simulate_cash_in_bank.py b/bin/simulate_cash_in_bank.py index 18f42c7..ef35e68 100755 --- a/bin/simulate_cash_in_bank.py +++ b/bin/simulate_cash_in_bank.py @@ -112,7 +112,7 @@ eoy = datetime.date(datetime.date.today().year, 12, 31) months_until_eoy = datascope.profit_loss.get_months_from_now(eoy) outcomes = datascope.get_outcomes_in_month( - months_until_eoy-1, monthly_cash_outcomes + months_until_eoy, monthly_cash_outcomes ) # outcome labels