repype.textual.run
- class repype.textual.run.RunScreen(contexts: Iterable[RunContext])
Bases:
ModalScreen[int]Screen that performs a batch run of tasks, displaying the progress.
- Parameters:
contexts – The contexts of the tasks to run.
- BINDINGS: ClassVar[list[BindingType]] = [Binding(key='ctrl+c', action='cancel', description='Cancel', show=True, key_display=None, priority=True), Binding(key='escape', action='close', description='Close', show=True, key_display=None, priority=False)]
Key bindings of the screen.
- action_cancel() None
Cancel the batch run.
A confirmation dialog based on
confirm()is shown before cancellation.
- action_close() None
Close the screen, if no tasks are running.
If tasks are running, an error message is shown.
Dismisses the screen with the number of successfully completed tasks.
- async confirm(*args, **kwargs) bool
Shortcut for
repype.textual.confirm.confirm.
- contexts: list[RunContext]
The contexts of the tasks to run.
- current_task_path: Path | None
The path of the current task being processed, or None if no task is being processed.
- custom_format(positions: List[int], status: str | dict | None, intermediate: bool) str
Format a custom status update as a string.
- handle_new_status(positions: List[int], status: str | dict | None, intermediate: bool) None
Process a new status update.
The arguments are the same as those of the
handle_new_status()method of therepype.status.StatusReaderclass.
- class repype.textual.run.StatusReaderAdapter(filepath: PathLike, screen: RunScreen)
Bases:
StatusReader- handle_new_status(*args, **kwargs)
Delegates the handling of new status updates to the
screen.handle_new_statusmethod.
- class repype.textual.run.TaskUI(collapsible: Collapsible)
Bases:
objectWidgets of a task.
- Parameters:
collapsible – The collapsible widget of the task.
- collapsible: Collapsible
The collapsible widget of the task.
- property container: Vertical
Container for permanent status updates.
- property intermediate: Vertical
Container with widgets for intermediate status updates.
Contains the
intermediate_labelandintermediate_progressbarwidgets.
- property intermediate_label: Label
Label for intermediate status updates.
- property intermediate_progressbar: ProgressBar
Progress bar for intermediate status updates.