o
    wÖiÏ  ã                   @   sJ   d Z g d¢ZdZdedefdd„Zdedefdd	„Zd
edefdd„ZdS )zGSet package-wide default parameters and IPython/Jupyter display format.)ÚDEFAULT_SOURCE_EXTENSIONÚset_default_engineÚset_default_formatÚset_jupyter_formatÚgvÚengineÚreturnc                 C   ó*   ddl m} | | ¡ |jj}| |j_|S )aL  Change the default ``engine`` and return the old default value.

    Args:
        engine: new default ``engine``
            used by all present and newly created instances
            without explicitly set ``engine``
            (``'dot'``, ``'neato'``, ...).

    Returns:
        The old default value used for ``engine``.
    é   ©Ú
parameters)Ú r   Úverify_engineÚ
ParametersÚ_engine)r   r   Úold_default_engine© r   úO/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/graphviz/_defaults.pyr   	   ó
   
r   Úformatc                 C   r   )aJ  Change the default ``format`` and return the old default value.

    Args:
        format: new default ``format``
            used by all present and newly created instances
            without explicitly set ``format``
            (``'pdf'``, ``'png'``, ...).

    Returns:
        The old default value used for ``format``.
    r	   r
   )r   r   Úverify_formatr   Ú_format)r   r   Úold_default_formatr   r   r   r      r   r   Újupyter_formatc                 C   s4   ddl m} | | ¡}|jj}| |¡}||j_|S )ae  Change the default mimetype format for ``_repr_mimebundle_()`` and return the old value.

    Args:
        jupyter_format: new default IPython/Jupyter display format
            used by all present and newly created instances
            (``'svg'``, ``'png'``, ...).

    Returns:
        The old default value used for IPython/Jupyter display format.
    r	   )Újupyter_integration)r   r   Úget_jupyter_format_mimetypeÚJupyterIntegrationÚ_jupyter_mimetypeÚget_jupyter_mimetype_format)r   r   ÚmimetypeÚold_mimetypeÚ
old_formatr   r   r   r   3   s   

r   N)Ú__doc__Ú__all_r   Ústrr   r   r   r   r   r   r   Ú<module>   s    