Skip to content

Commit

Permalink
fix: missing plural text prompt for delete, done, reset and edit comm…
Browse files Browse the repository at this point in the history
…ands
  • Loading branch information
u8slvn committed Sep 6, 2024
1 parent 76fd082 commit 5e7fc44
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/hyperfocus/console/commands/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ def delete(task_ids: tuple[int, ...], force: bool) -> None:
)
)
else:
tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Delete task")
tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Delete task(s)")
task_cmd.update_tasks_status(tasks=tasks, status=TaskStatus.DELETED)
2 changes: 1 addition & 1 deletion src/hyperfocus/console/commands/done.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ def done(task_ids: tuple[int, ...]) -> None:
session = get_current_session()
task_cmd = TaskCommands(session)

tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Validate task")
tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Validate task(s)")
task_cmd.update_tasks_status(tasks=tasks, status=TaskStatus.DONE)
2 changes: 1 addition & 1 deletion src/hyperfocus/console/commands/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def edit(task_ids: tuple[int, ...], title: bool, details: bool) -> None:
if not any([title, details]):
title = details = True

tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Edit task")
tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Edit task(s)")
for task in tasks:
edited = False # Flag to check if task was edited

Expand Down
2 changes: 1 addition & 1 deletion src/hyperfocus/console/commands/reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ def reset(task_ids: tuple[int, ...]) -> None:
session = get_current_session()
task_cmd = TaskCommands(session)

tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Reset task")
tasks = task_cmd.get_tasks(task_ids=task_ids, prompt_text="Reset task(s)")
task_cmd.update_tasks_status(tasks=tasks, status=TaskStatus.TODO)
2 changes: 1 addition & 1 deletion tests/test_console/test_commands/test_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_delete(cli):
" --------------------- \n"
f" 1 {icons.TASK_STATUS} foo {icons.NO_DETAILS} \n"
"\n"
f"{icons.PROMPT} Delete task: 12\n"
f"{icons.PROMPT} Delete task(s): 12\n"
f"{icons.ERROR}(error) Task 12 does not exist.\n"
)
assert result.exit_code == 1
Expand Down
2 changes: 1 addition & 1 deletion tests/test_console/test_commands/test_done.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_done(cli):
" --------------------- \n"
f" 1 {icons.TASK_STATUS} foo {icons.NO_DETAILS} \n"
"\n"
f"{icons.PROMPT} Validate task: 12\n"
f"{icons.PROMPT} Validate task(s): 12\n"
f"{icons.ERROR}(error) Task 12 does not exist.\n"
)
assert result.exit_code == 1
Expand Down
2 changes: 1 addition & 1 deletion tests/test_console/test_commands/test_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_edit(mock_click_edit, cli):
" --------------------- \n"
f" 1 {icons.TASK_STATUS} foo {icons.NO_DETAILS} \n"
"\n"
f"{icons.PROMPT} Edit task: 12\n"
f"{icons.PROMPT} Edit task(s): 12\n"
f"{icons.ERROR}(error) Task 12 does not exist.\n"
)
assert result.exit_code == 1
Expand Down
2 changes: 1 addition & 1 deletion tests/test_console/test_commands/test_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_reset(cli):
" --------------------- \n"
f" 1 {icons.TASK_STATUS} foo {icons.NO_DETAILS} \n"
"\n"
f"{icons.PROMPT} Reset task: 12\n"
f"{icons.PROMPT} Reset task(s): 12\n"
f"{icons.ERROR}(error) Task 12 does not exist.\n"
)
assert result.exit_code == 1
Expand Down

0 comments on commit 5e7fc44

Please sign in to comment.