
    wdf                     B    d dl mZ  e            ZddZd Zd Zd	dZdS )
    )localFc                 z    	 t           j        d         S # t          t          f$ r | st	          d          Y dS w xY w)a  Returns the current click context.  This can be used as a way to
    access the current context object from anywhere.  This is a more implicit
    alternative to the :func:`pass_context` decorator.  This function is
    primarily useful for helpers such as :func:`echo` which might be
    interested in changing its behavior based on the current context.

    To push the current context, :meth:`Context.scope` can be used.

    .. versionadded:: 5.0

    :param silent: if set to `True` the return value is `None` if no context
                   is available.  The default behavior is to raise a
                   :exc:`RuntimeError`.
    z!There is no active click context.N)_localstackAttributeError
IndexErrorRuntimeErrorsilents    R/var/www/book.euthymeo.com/html/venv/lib/python3.11/site-packages/click/globals.pyget_current_contextr      sc    D|BJ' D D D 	DBCCC	D 	D 	DDs    "::c                 l    t           j                            dg                               |            dS )z*Pushes a new context to the current stack.r   N)r   __dict__
setdefaultappend)ctxs    r   push_contextr      s.    
Ow++22377777    c                  B    t           j                                         dS )z%Removes the top level from the stack.N)r   r   pop r   r   pop_contextr   !   s    
Lr   Nc                 @    | | S t          d          }||j        S dS )z"Internal helper to get the default value of the color flag.  If a
    value is passed it's returned unchanged, otherwise it's looked up from
    the current context.
    NTr   )r   color)r   r   s     r   resolve_color_defaultr   &   s3    
 
T
*
*
*C
y r   )F)N)	threadingr   r   r   r   r   r   r   r   r   <module>r      sv         	D D D D,8 8 8
  
	 	 	 	 	 	r   