o
    /wÖi  ã                   @   s   d dl Z G dd„ de jƒZdS )é    Nc                   @   s@   e Zd ZdZdZdZdZdZdZde	fdd	„Z
defd
d„ZdS )Ú
TrialStatea,  State of a :class:`~optuna.trial.Trial`.

    Attributes:
        RUNNING:
            The :class:`~optuna.trial.Trial` is running.
        WAITING:
            The :class:`~optuna.trial.Trial` is waiting and unfinished.
        COMPLETE:
            The :class:`~optuna.trial.Trial` has been finished without any error.
        PRUNED:
            The :class:`~optuna.trial.Trial` has been pruned with
            :class:`~optuna.exceptions.TrialPruned`.
        FAIL:
            The :class:`~optuna.trial.Trial` has failed due to an uncaught error.
    r   é   é   é   é   Úreturnc                 C   s   t | ƒS )N)Ústr©Úself© r   úP/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/optuna/trial/_state.pyÚ__repr__   s   zTrialState.__repr__c                 C   s   | t jko	| t jkS )z›Return a bool value to represent whether the trial state is unfinished or not.

        The unfinished state is either ``RUNNING`` or ``WAITING``.
        )r   ÚRUNNINGÚWAITINGr	   r   r   r   Úis_finished   s   zTrialState.is_finishedN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚCOMPLETEÚPRUNEDÚFAILr   r   r   Úboolr   r   r   r   r   r      s    r   )ÚenumÚIntEnumr   r   r   r   r   Ú<module>   s    