You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/libs/dynaconf/vendor/click/globals.py

13 lines
472 B

from threading import local
_local=local()
def get_current_context(silent=False):
try:return _local.stack[-1]
except(AttributeError,IndexError):
if not silent:raise RuntimeError('There is no active click context.')
def push_context(ctx):_local.__dict__.setdefault('stack',[]).append(ctx)
def pop_context():_local.stack.pop()
def resolve_color_default(color=None):
A=color
if A is not None:return A
B=get_current_context(silent=True)
if B is not None:return B.color