From 982319fabaff397008fc53eed1060ef455fd1587 Mon Sep 17 00:00:00 2001 From: Winston Chang Date: Tue, 30 Jan 2024 13:22:01 -0600 Subject: [PATCH] Update express.ui.hold() to accept any type of object --- shiny/express/ui/_hold.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shiny/express/ui/_hold.py b/shiny/express/ui/_hold.py index 9f98b39e5..46bae144f 100644 --- a/shiny/express/ui/_hold.py +++ b/shiny/express/ui/_hold.py @@ -6,7 +6,6 @@ from htmltools import wrap_displayhook_handler -from ... import ui from ..._typing_extensions import ParamSpec __all__ = ("hold",) @@ -45,9 +44,9 @@ def hold() -> HoldContextManager: class HoldContextManager: def __init__(self): - self.content = ui.TagList() + self.content: list[object] = list() - def __enter__(self) -> ui.TagList: + def __enter__(self) -> list[object]: self.prev_displayhook = sys.displayhook sys.displayhook = wrap_displayhook_handler( self.content.append # pyright: ignore[reportArgumentType]