Added the type hint and the documentation for the obj parameter of the post_update method of the AccountForm and CurrencyForm forms.

This commit is contained in:
依瑪貓 2023-02-20 16:00:12 +08:00
parent a73e3204b9
commit a4c89f1494
2 changed files with 4 additions and 2 deletions

View File

@ -96,9 +96,10 @@ class AccountForm(FlaskForm):
setattr(self, "__post_update",
lambda: sort_accounts_in(prev_base_code, obj.id))
def post_update(self, obj) -> None:
def post_update(self, obj: Account) -> None:
"""The post-processing after the update.
:param obj: The account object.
:return: None
"""
current_user_pk: int = get_current_user_pk()

View File

@ -83,9 +83,10 @@ class CurrencyForm(FlaskForm):
obj.created_by_id = current_user_pk
obj.updated_by_id = current_user_pk
def post_update(self, obj) -> None:
def post_update(self, obj: Currency) -> None:
"""The post-processing after the update.
:param obj: The currency object.
:return: None
"""
current_user_pk: int = get_current_user_pk()