Fixed the documentation in the Account data model.

This commit is contained in:
依瑪貓 2023-02-07 11:30:25 +08:00
parent f7ce94902f
commit 16e2a146db

View File

@ -191,11 +191,10 @@ class Account(db.Model):
@classmethod
def find_by_code(cls, code: str) -> t.Self | None:
"""Finds an accounting account by its code.
"""Finds an account by its code.
:param code: The code.
:return: The accounting account, or None if this account does not
exist.
:return: The account, or None if this account does not exist.
"""
m = re.match("^([1-9]{4})-([0-9]{3})$", code)
if m is None:
@ -306,7 +305,7 @@ class Account(db.Model):
return False
def delete(self) -> None:
"""Deletes this accounting account.
"""Deletes this account.
:return: None.
"""