;R , d dl Zd dlmZ ej r
d dlZddlmZ e Z ej
ddd
Zej
ddedej
d fd Zddedej
d fd
ZddZddZddej
e dej
e fdZdS ) N)local )ContextFsilentte.Literal[False]returnr c d S N r s m/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/click/globals.pyget_current_contextr C .c d S r
r r s r
r r r r c t j dt j d S # t t
f$ r}| st
d |Y d}~nd}~ww xY wdS )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`.
r z!There is no active click context.N)tcast_localstackAttributeError
IndexErrorRuntimeError)r es r
r r s Kvib!1222J' K K K KBCCJ K K K K KK 4s $' AAActxc l t j dg | dS )z*Pushes a new context to the current stack.r N)r __dict__
setdefaultappend)r s r
push_contextr! - s.
Ow++22377777r c B t j dS )z%Removes the top level from the stack.N)r r popr r r
pop_contextr$ 2 s
Lr colorc @ | | S t d }||j S dS )zInternal 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 r% )r% r s r
resolve_color_defaultr' 7 s1
T
*
*
*C
y4r )F)r r r r ).)r r r N)r Nr
)typingr threadingr
TYPE_CHECKINGtyping_extensionstecorer r overloadr boolOptionalr! r$ r' r r r