wg-backend-django/dell-env/lib/python3.11/site-packages/dash/testing/__init__.py

18 lines
358 B
Python
Raw Normal View History

2023-10-30 03:40:43 -04:00
from contextlib import contextmanager
from .._callback_context import context_value as _ctx
from .._utils import AttributeDict as _AD
@contextmanager
def ignore_register_page():
previous = _ctx.get()
copied = _AD(previous)
copied.ignore_register_page = True
_ctx.set(copied)
try:
yield
finally:
_ctx.set(previous)