Skip to content

validate that callback request "outputs" field matches callback #1546

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

Merged
merged 4 commits into from
Feb 8, 2021
Merged
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion dash/_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def validate_output_spec(output, output_spec, Output):
for outi, speci in zip(output, output_spec):
speci_list = speci if isinstance(speci, (list, tuple)) else [speci]
for specij in speci_list:
if Output(specij["id"], specij["property"]) != outi:
if not Output(specij["id"], specij["property"]) == outi:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really hoping this is the last Py2 bug I have to fix 🤦
We implemented __eq__ for dependencies but in Py2

There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false.

whereas in Py3

For __ne__(), by default it delegates to __eq__() and inverts the result

raise exceptions.CallbackException(
"Output does not match callback definition"
)
Expand Down