← back to Atmos Game
assets/gen/.venv/lib/python3.12/site-packages/click/__pycache__/globals.cpython-312.pyc
33 lines
�
c�bj� � �� � d dl mZ d dlZd dlmZ ej rddlmZ e� Z ej dd
d�� Zej ddd�� Zddd�Zdd �Zdd
�Z
ddd�Zy)� )�annotationsN)�local� )�Contextc � � y �N� ��silents �d/Users/macstudio3/Projects/atmos-game/assets/gen/.venv/lib/python3.12/site-packages/click/globals.py�get_current_contextr
s � �FI� c � � y r r r
s r r
r
s � �?Br c � � t j dt j d � S # t t
f$ r}| st
d� |�Y d}~yd}~ww xY 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`.
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 � t j j dg � j | � y)z*Pushes a new context to the current stack.r N)r �__dict__�
setdefault�append)�ctxs r �push_contextr , s! � �
�O�O���w��+�2�2�3�7r c �@ � t j j � y)z%Removes the top level from the stack.N)r r �popr r r �pop_contextr"