From 7b10eb68bc3aabff485095e97657892e2fda1344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 8 Mar 2023 17:59:56 +0800 Subject: [PATCH] Revised the documentation of the EntryCollector class in the ledger and income and expenses log. --- src/accounting/report/reports/income_expenses.py | 4 ++-- src/accounting/report/reports/ledger.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/accounting/report/reports/income_expenses.py b/src/accounting/report/reports/income_expenses.py index a3e27ec..aa8c27c 100644 --- a/src/accounting/report/reports/income_expenses.py +++ b/src/accounting/report/reports/income_expenses.py @@ -76,11 +76,11 @@ class ReportEntry: class EntryCollector: - """The income and expenses log entry collector.""" + """The report entry collector.""" def __init__(self, currency: Currency, account: IncomeExpensesAccount, period: Period): - """Constructs the income and expenses log entry collector. + """Constructs the report entry collector. :param currency: The currency. :param account: The account. diff --git a/src/accounting/report/reports/ledger.py b/src/accounting/report/reports/ledger.py index 50576ef..cb248d9 100644 --- a/src/accounting/report/reports/ledger.py +++ b/src/accounting/report/reports/ledger.py @@ -75,10 +75,10 @@ class ReportEntry: class EntryCollector: - """The ledger entry collector.""" + """The report entry collector.""" def __init__(self, currency: Currency, account: Account, period: Period): - """Constructs the ledger entry collector. + """Constructs the report entry collector. :param currency: The currency. :param account: The account. @@ -93,7 +93,7 @@ class EntryCollector: self.brought_forward: ReportEntry | None """The brought-forward entry.""" self.entries: list[ReportEntry] - """The ledger entries.""" + """The report entries.""" self.total: ReportEntry | None """The total entry.""" self.brought_forward = self.__get_brought_forward_entry() @@ -104,7 +104,7 @@ class EntryCollector: def __get_brought_forward_entry(self) -> ReportEntry | None: """Queries, composes and returns the brought-forward entry. - :return: The brought-forward entry, or None if the ledger starts from + :return: The brought-forward entry, or None if the report starts from the beginning. """ if self.__period.start is None: @@ -131,9 +131,9 @@ class EntryCollector: return entry def __query_entries(self) -> list[ReportEntry]: - """Queries and returns the ledger entries. + """Queries and returns the report entries. - :return: The ledger entries. + :return: The report entries. """ conditions: list[sa.BinaryExpression] \ = [JournalEntry.currency_code == self.__currency.code,