Skip to content

Commit fec5fbd

Browse files
Accept AnyContainer instead of Container in print_container.
This way, we can also pass widgets to `print_container`.
1 parent 1886366 commit fec5fbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prompt_toolkit/shortcuts/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
)
2525

2626
if TYPE_CHECKING:
27-
from prompt_toolkit.layout.containers import Container
27+
from prompt_toolkit.layout.containers import AnyContainer
2828

2929
__all__ = [
3030
"print_formatted_text",
@@ -141,7 +141,7 @@ def to_text(val: Any) -> StyleAndTextTuples:
141141

142142

143143
def print_container(
144-
container: "Container",
144+
container: "AnyContainer",
145145
file: Optional[TextIO] = None,
146146
style: Optional[BaseStyle] = None,
147147
include_default_pygments_style: bool = True,

0 commit comments

Comments
 (0)