Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/bokeh/models/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
from __future__ import annotations

import logging # isort:skip
from bokeh.core.has_props import abstract
from bokeh.core.validation import warning
from bokeh.core.validation.warnings import EMPTY_LAYOUT

log = logging.getLogger(__name__)

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -477,8 +481,7 @@ def __init__(self, *args, **kwargs) -> None:

@warning(EMPTY_LAYOUT)
def _check_empty_layout(self):
from itertools import chain
if not list(chain(self.children)):
if not self.children:
return str(self)

@warning(BOTH_CHILD_AND_ROOT)
Expand Down