Fixed docstrings

This commit is contained in:
Joel Collins 2019-01-24 16:24:14 +00:00
parent 80cc74bd3d
commit 465ed647d3
6 changed files with 58 additions and 58 deletions

View file

@ -8,11 +8,11 @@ from openflexure_microscope.exceptions import TaskDeniedException
from openflexure_microscope.utilities import entry_by_id
class TaskOrchestrator:
"""
Class responsible for spawning threaded tasks, and storing their returns.
A microscope should contain exactly one instance of `TaskOrchestrator`.
"""
def __init__(self):
"""
Class responsible for spawning threaded tasks, and storing their returns.
A microscope should contain exactly one instance of `TaskOrchestrator`.
"""
self.tasks = [] #: list: List of `Task` objects
@property
@ -79,11 +79,11 @@ class TaskOrchestrator:
class Task:
"""
Class responsible for running a task function in a thread, and handling return or errors.
Tasks should be created by an instance of :py:class:`openflexure_microscope.task.TaskOrchestrator`.
"""
def __init__(self, function, *args, **kwargs):
"""
Class responsible for running a task function in a thread, and handling return or errors.
Tasks should be created by an instance of :py:class:`openflexure_microscope.task.TaskOrchestrator`.
"""
# The task long-running method
self.task = function #: function: Function to be called in the task thread.
self.args = args #: Positional arguments to be passed to the task function.