rope.base.taskhandle ==================== .. py:module:: rope.base.taskhandle Attributes ---------- .. autoapisummary:: rope.base.taskhandle.DEFAULT_TASK_HANDLE rope.base.taskhandle.DEFAULT_JOB_SET Classes ------- .. autoapisummary:: rope.base.taskhandle.BaseJobSet rope.base.taskhandle.BaseTaskHandle rope.base.taskhandle.TaskHandle rope.base.taskhandle.JobSet rope.base.taskhandle.NullTaskHandle rope.base.taskhandle.NullJobSet Module Contents --------------- .. py:class:: BaseJobSet Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: name :type: str :value: '' .. py:attribute:: job_name :type: str :value: '' .. py:method:: started_job(name: str) -> None :abstractmethod: .. py:method:: finished_job() -> None :abstractmethod: .. py:method:: check_status() -> None :abstractmethod: .. py:method:: get_active_job_name() -> str .. py:method:: get_percent_done() -> Optional[float] :abstractmethod: .. py:method:: get_name() -> str .. py:method:: increment() -> None :abstractmethod: Increment the number of tasks to complete. This is used if the number is not known ahead of time. .. py:class:: BaseTaskHandle Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: stop() -> None :abstractmethod: .. py:method:: current_jobset() -> Optional[BaseJobSet] :abstractmethod: .. py:method:: add_observer() -> None :abstractmethod: .. py:method:: is_stopped() -> bool :abstractmethod: .. py:method:: get_jobsets() -> Sequence[BaseJobSet] :abstractmethod: .. py:method:: create_jobset(name: str = 'JobSet', count: Optional[int] = None) -> BaseJobSet .. py:class:: TaskHandle(name='Task', interrupts=True) Bases: :py:obj:`BaseTaskHandle` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: name :value: 'Task' .. py:attribute:: interrupts :value: True .. py:attribute:: stopped :value: False .. py:attribute:: job_sets :value: [] .. py:attribute:: observers :value: [] .. py:method:: stop() Interrupts the refactoring .. py:method:: current_jobset() Return the current `JobSet` .. py:method:: add_observer(observer) Register an observer for this task handle The observer is notified whenever the task is stopped or a job gets finished. .. py:method:: is_stopped() .. py:method:: get_jobsets() .. py:method:: create_jobset(name='JobSet', count=None) .. py:class:: JobSet(handle, name, count) Bases: :py:obj:`BaseJobSet` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: handle .. py:attribute:: name .. py:attribute:: count .. py:attribute:: done :value: 0 .. py:attribute:: job_name :value: None .. py:method:: started_job(name) .. py:method:: finished_job() .. py:method:: check_status() .. py:method:: get_active_job_name() .. py:method:: get_percent_done() .. py:method:: get_name() .. py:method:: increment() Increment the number of tasks to complete. This is used if the number is not known ahead of time. .. py:class:: NullTaskHandle Bases: :py:obj:`BaseTaskHandle` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: is_stopped() .. py:method:: stop() .. py:method:: create_jobset(*args, **kwds) .. py:method:: get_jobsets() .. py:method:: add_observer(observer) .. py:method:: current_jobset() -> None Return the current `JobSet` .. py:class:: NullJobSet Bases: :py:obj:`BaseJobSet` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: started_job(name) .. py:method:: finished_job() .. py:method:: check_status() .. py:method:: get_active_job_name() .. py:method:: get_percent_done() .. py:method:: get_name() .. py:method:: increment() Increment the number of tasks to complete. This is used if the number is not known ahead of time. .. py:attribute:: name :type: str :value: '' .. py:attribute:: job_name :type: str :value: '' .. py:data:: DEFAULT_TASK_HANDLE .. py:data:: DEFAULT_JOB_SET