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

Ë
KÀjƒãóÊ—ddlmZddlZddlmZej rddlmZe«Z ejd d
d„«Z ejddd„«Z d dd„Z dd „Z dd
„Z
ddd „Zy)é)Ú annotationsN)Úlocalé)ÚContextcó—y©N©©Ú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)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)ÚtÚcastÚ_localÚstackÚAttributeErrorÚ
IndexErrorÚ RuntimeError)r Úes r r
r
sT€ðKÜ�v‰v�i¤§¡¨bÑ!1Ó2Ð2øÜ œJÐ 'òKÙÜÐBÓCÈÐ Jóð ûð Kús‚&)©A¸A Á Acób—tjjdg«j|«y)z*Pushes a new context to the current stack.rN)rÚ__dict__Ú
setdefaultÚappend)Úctxs r Ú push_contextr,s!€ä
‡O�O×јw¨Ó+×2Ñ2°3Õ7rcó@—tjj«y)z%Removes the top level from the stack.N)rrÚpopr rr Ú pop_contextr"1s€ä
‡L�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