Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed typecheck for list value to use isinstance instead of type #3108

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
16 changes: 10 additions & 6 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -2281,17 +2281,21 @@ def update(pathname_, search_, **states):

# Set validation_layout
if not self.config.suppress_callback_exceptions:
self.validation_layout = html.Div(
[
page["layout"]() if callable(page["layout"]) else page["layout"]
for page in _pages.PAGE_REGISTRY.values()
]
+ [
layout = self.layout
if not isinstance(layout, list):
layout = [
# pylint: disable=not-callable
self.layout()
if callable(self.layout)
else self.layout
]

self.validation_layout = html.Div(
[
page["layout"]() if callable(page["layout"]) else page["layout"]
for page in _pages.PAGE_REGISTRY.values()
]
+ layout
)
if _ID_CONTENT not in self.validation_layout:
raise Exception("`dash.page_container` not found in the layout")
Expand Down