Renamed the "j_date" parameter to "date" in the "__next_j_no" method of the BaseTestData class in the lib module of the test site.

This commit is contained in:
依瑪貓 2023-04-26 13:24:19 +08:00
parent 6c455a615c
commit 3eb3aef2f2

View File

@ -305,14 +305,14 @@ class BaseTestData(ABC):
existing_id.add(obj_id) existing_id.add(obj_id)
return obj_id return obj_id
def __next_j_no(self, j_date: dt.date) -> int: def __next_j_no(self, date: dt.date) -> int:
"""Returns the next journal entry number in a day. """Returns the next journal entry number in a day.
:param j_date: The journal entry date. :param date: The journal entry date.
:return: The next journal entry number. :return: The next journal entry number.
""" """
existing: set[int] = {x["no"] for x in self.__journal_entries existing: set[int] = {x["no"] for x in self.__journal_entries
if x["date"] == j_date} if x["date"] == date}
return 1 if len(existing) == 0 else max(existing) + 1 return 1 if len(existing) == 0 else max(existing) + 1
def _add_simple_journal_entry( def _add_simple_journal_entry(