Ë
    þÍ:jè  ã                  ó’   — d dl mZ d dlZd dlZd dlmZ d dlmZ erd dlmZ dZ G d„ d«      Z	dd	„Z
 G d
„ dej                  «      Zy)é    )ÚannotationsN)ÚAny)ÚTYPE_CHECKING)ÚTracebackTypeza
Could not find `optuna-integration` for `{0}`.
Please run `pip install optuna-integration[{0}]`.c                  óH   — e Zd ZdZdd„Zd	d„Z	 	 	 	 	 	 	 	 d
d„Zdd„Zdd„Zy)Ú&_DeferredImportExceptionContextManagerzËContext manager to defer exceptions from imports.

    Catches :exc:`ImportError` and :exc:`SyntaxError`.
    If any exception is caught, this class raises an :exc:`ImportError` when being checked.

    c                ó   — d | _         y ©N©Ú	_deferred©Úselfs    úd/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/optuna/_imports.pyÚ__init__z/_DeferredImportExceptionContextManager.__init__   s	   € Ø7;ˆ�ó    c                ó   — | S )zJEnter the context manager.

        Returns:
            Itself.

        © r   s    r   Ú	__enter__z0_DeferredImportExceptionContextManager.__enter__   s	   € ð ˆr   c                óØ   — t        |t        t        f«      rTt        |t        «      rd|j                  › d|› d�}n&t        |t        «      rd|j                  › d|› d�}nJ ‚||f| _        yy)a   Exit the context manager.

        Args:
            exc_type:
                Raised exception type. :obj:`None` if nothing is raised.
            exc_value:
                Raised exception object. :obj:`None` if nothing is raised.
            traceback:
                Associated traceback. :obj:`None` if nothing is raised.

        Returns:
            :obj:`None` if nothing is deferred, otherwise :obj:`True`.
            :obj:`True` will suppress any exceptions avoiding them from propagating.

        zTried to import 'zj' but failed. Please make sure that the package is installed correctly to use this feature. Actual error: ú.z>Tried to import a package but failed due to a syntax error in zY. Please make sure that the Python version is correct to use this feature. Actual error: TN)Ú
isinstanceÚImportErrorÚSyntaxErrorÚnameÚfilenamer   )r   Úexc_typeÚ	exc_valueÚ	tracebackÚmessages        r   Ú__exit__z/_DeferredImportExceptionContextManager.__exit__&   s‹   € ô* �i¤+¬{Ð!;Ô<Ü˜)¤[Ô1à'¨	¯©Ð'7ð 8Yà �k ð$ñ ô
 ˜I¤{Ô3àTØ ×)Ñ)Ð*ð +:Ø:C¸ÀAðGñ ð �uà'¨Ð1ˆDŒNØØr   c                ó   — | j                   du S )z¦Return whether the context manager has caught any exceptions.

        Returns:
            :obj:`True` if no exceptions are caught, :obj:`False` otherwise.

        Nr   r   s    r   Úis_successfulz4_DeferredImportExceptionContextManager.is_successfulO   s   € ð �~‰~ Ð%Ð%r   c                óR   — | j                   �| j                   \  }}t        |«      |‚y)z¾Check whether the context manager has caught any exceptions.

        Raises:
            :exc:`ImportError`:
                If any exception was caught from the caught exception.

        N)r   r   )r   r   r   s      r   Úcheckz,_DeferredImportExceptionContextManager.checkX   s.   € ð �>‰>Ð%Ø!%§¡ÑˆI�wÜ˜gÓ&¨IÐ5ð &r   N)ÚreturnÚNone)r%   z('_DeferredImportExceptionContextManager')r   ztype[Exception] | Noner   zException | Noner   zTracebackType | Noner%   zbool | None)r%   Úbool)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r    r"   r$   r   r   r   r   r      sG   „ ñó<óð'à(ð'ð $ð'ð (ð	'ð
 
ó'óR&ô
6r   r   c                 ó   — t        «       S )z•Create a context manager that can wrap imports of optional packages to defer exceptions.

    Returns:
        Deferred import context manager.

    )r   r   r   r   Ú
try_importr-   e   s   € ô 2Ó3Ð3r   c                  ó4   ‡ — e Zd ZdZdˆ fd„Zdd„Zdd„Zˆ xZS )Ú_LazyImporta<  Module wrapper for lazy import.

    This class wraps the specified modules and lazily imports them only when accessed.
    Otherwise, `import optuna` is slowed down by importing all submodules and
    dependencies even if not required.
    Within this project's usage, importlib override this module's attribute on the first
    access and the imported submodule is directly accessed from the second access.

    TODO: Eliminate lazy import after Python 3.14 is dropped. https://peps.python.org/pep-0810/

    Args:
        name: Name of module to apply lazy import.
    c                ó2   •— t         ‰| �  |«       || _        y r
   )Úsuperr   Ú_name)r   r   Ú	__class__s     €r   r   z_LazyImport.__init__~   s   ø€ Ü‰Ñ˜ÔØˆ�
r   c                óŽ   — t        j                  | j                  «      }| j                  j	                  |j                  «       |S r
   )Ú	importlibÚimport_moduler2   Ú__dict__Úupdate)r   Úmodules     r   Ú_loadz_LazyImport._load‚   s1   € Ü×(Ñ(¨¯©Ó4ˆØ�‰×Ñ˜VŸ_™_Ô-Øˆr   c                ó6   — t        | j                  «       |«      S r
   )Úgetattrr:   )r   Úitems     r   Ú__getattr__z_LazyImport.__getattr__‡   s   € Ü�t—z‘z“| TÓ*Ð*r   )r   Ústrr%   r&   )r%   ztypes.ModuleType)r=   r?   r%   r   )r(   r)   r*   r+   r   r:   r>   Ú__classcell__)r3   s   @r   r/   r/   o   s   ø„ ñõó÷
+r   r/   )r%   r   )Ú
__future__r   r5   ÚtypesÚtypingr   r   r   Ú"_INTEGRATION_IMPORT_ERROR_TEMPLATEr   r-   Ú
ModuleTyper/   r   r   r   ú<module>rF      sJ   ðÝ "ã Û Ý Ý  ñ Ý#ð8ð #÷P6ñ P6óf4ô+�%×"Ñ"õ +r   