-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Change _validate_layout to accept functions that return layouts. #336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test looks good, but I would use self._layout_value()
to stay dry.
layout_id = getattr(self.layout, 'id', None) | ||
|
||
component_ids = {layout_id} if layout_id else set() | ||
for component in self.layout.traverse(): | ||
for component in to_validate.traverse(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use self._layout_value()
? it basically does the same check.
tests/test_integration.py
Outdated
@@ -12,7 +12,7 @@ | |||
import time | |||
|
|||
from dash.dependencies import Input, Output | |||
from dash.exceptions import PreventUpdate | |||
from dash.exceptions import PreventUpdate, NoLayoutException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see NoLayoutException used anywhere.
Fixed those, I'll rebase and see if the new CI passes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
Would this PR fix https://community.plot.ly/t/attribute-error-layout-traverse/13031? |
^ Yes it should. Can someone check out whats up with Percy, those tests worked out before bumping changelog and version |
Okay, it looks like plotly/dash-core-components#280 and the release of Can someone check to make sure those are okay? I do not currently have permissions to view |
Fix #334