
    lj
                       d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	 ddl
mZ dd	lmZ dd
lmZmZmZ g dZ e            Z eed         ed         d                   \  ZZZ eed                   Z ej        d                              ej                    ej        d                              ej                    e                                e          a et8                    Zedd            ZdS )z!Set the global config and logger.    )annotationsN)	Generator)contextmanager)Any   )parse_cli_ctx)make_logger)ManimConfig
ManimFramemake_config_parser)loggerconsoleerror_consoleconfigframe
tempconfigcli_ctx_settingsr   CLI	verbosityCLI_CTXPIL
matplotlibtempManimConfig | dict[str, Any]returnGenerator[None, None, None]c              #  .  K   t                                           fd|                                 D             } t                               |            	 dV  t                                          dS # t                                          w xY w)a  Temporarily modifies the global ``config`` object using a context manager.

    Inside the ``with`` statement, the modified config will be used.  After
    context manager exits, the config will be restored to its original state.

    Parameters
    ----------
    temp
        Object whose keys will be used to temporarily update the global
        ``config``.

    Examples
    --------

    Use ``with tempconfig({...})`` to temporarily change the default values of
    certain config options.

    .. code-block:: pycon

       >>> config["frame_height"]
       8.0
       >>> with tempconfig({"frame_height": 100.0}):
       ...     print(config["frame_height"])
       100.0
       >>> config["frame_height"]
       8.0

    c                $    i | ]\  }}|v 	||S  r   ).0kvoriginals      Q/home/agentuser/manim-venv/lib/python3.11/site-packages/manim/_config/__init__.py
<dictcomp>ztempconfig.<locals>.<dictcomp>N   s$    ;;;TQQ(]]Aq]]]    N)r   copyitemsupdate)r   r#   s    @r$   r   r   -   s      > {{}}H;;;;TZZ\\;;;D MM$ hhs   A8 8B)r   r   r   r   )__doc__
__future__r   loggingcollections.abcr   
contextlibr   typingr   
cli_colorsr   logger_utilsr	   utilsr
   r   r   __all__parserr   r   r   r   	getLoggersetLevelINFOdigest_parserr   r   r   r   r&   r$   <module>r9      s   ' ' " " " " " "  % % % % % % % % % % % %       % % % % % % % % % % % % > > > > > > > > > >   
			
 "-
8
5M+" "  !=	!233   %   ! !', / / /  ,   ( ( 6 6 6		$	$V	,	, 	
6 *  *  *  *  *  * r&   