Repository: Avaiga/taipy
File: taipy/core/job/job.py (Python)

Code before:
from ..notification.event import Event, EventEntityType, EventOperation, _make_event
from .job_id import JobId
from .status import Status

if TYPE_CHECKING:
    from ..task.task import Task


def _run_callbacks(fn):
    def __run_callbacks(job):
        fn(job)
        _TaipyLogger._get_logger().debug(f"{job.id} status has changed to {job.status}.")
        for fct in job._subscribers:
            fct(job)

    return __run_callbacks


class Job(_Entity, _Labeled):
    """Execution of a `Task^`.

    Tasks, Sequences, and Scenarios entities can be submitted for execution. The submission
    of a scenario triggers the submission of all the contained tasks. Similarly, the submission
    of a sequence also triggers the execution of all the ordered tasks.

    Every time a task is submitted for execution, a new _Job_ is created. A job represents a
    single execution of a task. It holds all the information related to the task execution,
    including the **creation date**, the execution `Status^`, and the **stacktrace** of any
    exception that may be raised by the user function.

    In addition, a job notifies scenario or sequence subscribers on its status change.

    Attributes:
        id (str): The identifier of this job.
        task (Task^): The task of this job.
        force (bool): Enforce the job's execution whatever the output data nodes are in cache or
            not.
        status (Status^): The current status of this job.
        creation_date (datetime): The date of this job's creation.
        stacktrace (List[str]): The list of stacktraces of the exceptions raised during the
            execution.
        version (str): The string indicates the application version of the job to instantiate.
            If not provided, the latest version is used.
    """

    _MANAGER_NAME = "job"
    _ID_PREFIX = "JOB"

    def __init__(self, id: JobId, task: "Task", submit_id: str, submit_entity_id: str, force=False, version=None):
        self.id = id
        self._task = task

Review comment (suggestion):
I believe we want to use * for italic text

```suggestion
    Every time a task is submitted for execution, a new *Job* is created. A job represents a
```

Code after:
from ..notification.event import Event, EventEntityType, EventOperation, _make_event
from .job_id import JobId
from .status import Status

if TYPE_CHECKING:
    from ..task.task import Task


def _run_callbacks(fn):
    def __run_callbacks(job):
        fn(job)
        _TaipyLogger._get_logger().debug(f"{job.id} status has changed to {job.status}.")
        for fct in job._subscribers:
            fct(job)

    return __run_callbacks


class Job(_Entity, _Labeled):
    """Execution of a `Task^`.

    Task, Sequence, and Scenario entities can be submitted for execution. The submission
    of a scenario triggers the submission of all the contained tasks. Similarly, the submission
    of a sequence also triggers the execution of all the ordered tasks.

    Every time a task is submitted for execution, a new *Job* is created. A job represents a
    single execution of a task. It holds all the information related to the task execution,
    including the **creation date**, the execution `Status^`, and the **stacktrace** of any
    exception that may be raised by the user function.

    In addition, a job notifies scenario or sequence subscribers on its status change.

    Attributes:
        id (str): The identifier of this job.
        task (Task^): The task of this job.
        force (bool): Enforce the job's execution whatever the output data nodes are in cache or
            not.
        status (Status^): The current status of this job.
        creation_date (datetime): The date of this job's creation.
        stacktrace (List[str]): The list of stacktraces of the exceptions raised during the
            execution.
        version (str): The string indicates the application version of the job to instantiate.
            If not provided, the latest version is used.
    """

    _MANAGER_NAME = "job"
    _ID_PREFIX = "JOB"

    def __init__(self, id: JobId, task: "Task", submit_id: str, submit_entity_id: str, force=False, version=None):
        self.id = id
        self._task = task