Bug487-WuYuhan-Refactor #57

Merged
mrlan merged 6 commits from Bug487-WuYuhan-Refactor into master 2022-11-08 19:53:10 +08:00

重构了吴宇涵(@wuyuhan)在分支 Bug487-WuYuhan 中提交的检查username代码。

新增类 WarningMessage 对 username 的检查(见Login.py),将检查代码封装在 WarningMessage 类中。

好处:account_service.py中,只需要3行代码即可完成对username的检查,见函数"def signup()"。如果还要添加其他的检查,只需要更新 WarningMessage 类即可,改善代码易读性。

-Hui

重构了吴宇涵(@wuyuhan)在分支 Bug487-WuYuhan 中提交的检查username代码。 新增类 WarningMessage 对 username 的检查(见Login.py),将检查代码封装在 WarningMessage 类中。 好处:account_service.py中,只需要3行代码即可完成对username的检查,见函数"def signup()"。如果还要添加其他的检查,只需要更新 WarningMessage 类即可,改善代码易读性。 -Hui
mrlan added 4 commits 2022-11-03 22:16:43 +08:00
mrlan added 1 commit 2022-11-03 22:21:45 +08:00
mrlan added 1 commit 2022-11-03 22:28:35 +08:00
mrlan merged commit f909201615 into master 2022-11-08 19:53:10 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrlan/EnglishPal#57
There is no content yet.