repype.textual.batch
- class repype.textual.batch.BatchScreen
Bases:
ScreenApp screen for managing tasks.
- BINDINGS: ClassVar[list[BindingType]] = [Binding(key='a', action='add_task', description='Add sub-task', show=True, key_display=None, priority=False), Binding(key='e', action='edit_task', description='Edit task', show=True, key_display=None, priority=False), Binding(key='d', action='delete_task', description='Delete task', show=True, key_display=None, priority=False), Binding(key='r', action='run_tasks', description='Run tasks', show=True, key_display=None, priority=False), Binding(key='R', action='reset_task', description='Reset task', show=True, key_display=None, priority=False), Binding(key='x', action='toggle_task', description='Toggle task', show=True, key_display=None, priority=False)]
Key bindings of the screen.
- action_add_task() None
Create a sub-task for the selected task using an editor of the
editor_screen_clstype.Does nothing if no task is selected.
- action_delete_task() None
Delete the selected task and all sub-tasks.
A confirmation dialog based on
confirm()is shown before resetting the task.Does nothing if no task is selected.
- action_edit_task() None
Edit the selected task using an editor of the
editor_screen_clstype.Does nothing if no task is selected.
- action_reset_task() None
Reset the selected task.
A confirmation dialog based on
confirm()is shown before resetting the task.Does nothing if no task is selected.
- action_run_tasks() None
Run the queued tasks.
An instance of the
run_screen_clsis pushed to the screen stack for running the tasks.If no tasks are queued and the selected task is not pending, an error is shown. Does nothing if no tasks are queued and no task is selected.
- async action_toggle_task() None
Toggle the selected task (queued or not queued).
Does nothing if the task is not pending.
- async confirm(*args, **kwargs) bool
Shortcut for
repype.textual.confirm.confirm.
- editor_screen_cls
The editor screen class.
The return value of the editor screen is used to determine if the task tree should be updated. It should be True if changes were saved or tasks were created, and False otherwise.
alias of
EditorScreen
- format_task_label(task: Task) str
Format the label of a task from the batch for display in the task tree.
- property non_pending_tasks: Iterator[Task]
Yields the non-pending tasks of the batch (i.e. completed and the non-runnable tasks).