Clean code

This commit is contained in:
WQY\qiong
2023-04-29 15:01:11 +08:00
parent a0166193ef
commit 35d2ce08e1
29 changed files with 133 additions and 375 deletions

View File

@@ -10,7 +10,7 @@ def get_title(name: str) -> dict[str, Any]:
return { 'value': title['value'] }
def set_title_cmd(name: str, cs: ChangeSet) -> DbChangeSet:
def _set_title(name: str, cs: ChangeSet) -> DbChangeSet:
new = cs.operations[0]['value']
old = get_title(name)['value']
@@ -24,7 +24,7 @@ def set_title_cmd(name: str, cs: ChangeSet) -> DbChangeSet:
def set_title(name: str, cs: ChangeSet) -> ChangeSet:
return execute_command(name, set_title_cmd(name ,cs))
return execute_command(name, _set_title(name ,cs))
def inp_in_title(section: list[str]) -> str: