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 4 commits into
base: dev
Choose a base branch
from
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
16 changes: 10 additions & 6 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -2274,17 +2274,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