added some docstrings

This commit is contained in:
Jakub Trllo 2024-02-29 11:53:12 +01:00
parent de498491ab
commit 123d2b851c
2 changed files with 26 additions and 0 deletions

View file

@ -360,6 +360,20 @@ class TasksWidget(QtWidgets.QWidget):
self._tasks_model.refresh()
def get_selected_task_info(self):
"""Get selected task info.
Example output::
{
"task_id": "5e7e3e3e3e3e3e3e3e3e3e3e",
"task_name": "modeling",
"task_type": "Modeling"
}
Returns:
dict[str, Union[str, None]]: Task info.
"""
_, task_id, task_name, task_type = self._get_selected_item_ids()
return {
"task_id": task_id,

View file

@ -82,6 +82,18 @@ class CreateSelectionModel(object):
class CreateHierarchyController:
"""Controller for hierarchy widgets.
Helper for handling hierarchy widgets in create tab. It handles selection
of folder and task to properly propagate it to other widgets.
At the same time handles expected selection so can pre-select folder and
task based on current context.
Args:
controller (PublisherController): Publisher controller.
"""
def __init__(self, controller):
self._event_system = QueuedEventSystem()
self._controller = controller