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

Raise exception when same input & output are used in a callback #605

Merged
merged 11 commits into from
Feb 13, 2019

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Feb 12, 2019

Closes #323

@T4rk1n T4rk1n changed the title Raise exception when same input & output are used a callback Raise exception when same input & output are used in a callback Feb 12, 2019
@@ -638,6 +638,12 @@ def _validate_callback(self, output, inputs, state):
# pylint: disable=too-many-branches
layout = self._cached_layout or self._layout_value()

for i in inputs:
if output == i:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Going to need some changes for multi-output...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I'll update once merged.

@T4rk1n T4rk1n mentioned this pull request Feb 13, 2019
1 task
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

Looks great! The inheritance, __str__, and __repr__ are nice bonuses 🎉 💃

@T4rk1n T4rk1n merged commit 669d034 into master Feb 13, 2019
@T4rk1n T4rk1n deleted the fix-wrong-callback branch February 13, 2019 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants