Files
intellecton/venv/lib/python3.12/site-packages/click/__pycache__/globals.cpython-312.pyc
T

33 lines
2.9 KiB
Plaintext
Raw Normal View History

Ë
ãóÊddlmZddlZddlmZej rddlmZe«Z ejd d
d«Z ejddd«Z d ddZ dd „Z dd
Z
ddd Zy)é)Ú annotationsN)Úlocalé)ÚContextcóy©©Úsilents úP/home/antigravity/intellecton/venv/lib/python3.12/site-packages/click/globals.pyÚget_current_contextr
sØFIócóyrr r
s r r
r
sØ?Brcó¦ tjdtjd«S#tt
f$r}|s t
d«|Yd}~yd}~wwxYw)aReturns 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)ÚcastÚ_localÚstackÚAttributeErrorÚ
IndexErrorÚ RuntimeError)r Úes r r
r
sTðKÜv‰v§¡¨bÑ!1Ó2øÜ œJÐ KÙÜÐÐ ð ûð Kús&)©A¸A Á Acóbtjjdg«j|«y)z*Pushes a new context to the current stack.rN)rÚ__dict__Ú
setdefaultÚappend)Úctxs r Ú push_contextr,s!ä
‡Oјw¨Ó2°3Õ7rcó@tjj«y)z%Removes the top level from the stack.N)rrÚpopr rr Ú pop_contextr"1sä
‡LÑÕrcó@||Std¬«}| |jSy)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