-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix validation of dynamic Enum inside a Tuple #1388
Conversation
@@ -2074,10 +2075,16 @@ def _get(self, object, name, trait): | |||
return value | |||
|
|||
def _set(self, object, name, value): | |||
""" Sets the current value of a dynamic range trait. | |||
""" Sets the current value of a dynamic enum trait. |
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.
Unrelated drive-by fix in this line, fixing copypasta ("range" -> "enum")
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.
LGTM
Thanks @kitchoi for reviewing. I added the new test (for a dynamic |
Thank you! Still LGTM. So this PR can close #1385 then? |
This PR fixes validation of dynamic enumerations inside a Tuple. Previously, for the dynamic case of an
Enum
, no validation was performed until trait-set time. This PR changes the logic so that the validate method (which the Tuple uses for its item validation) is no longer None.This fixes the issue originally reported in #1385. There are other issues identified in the #1385 comments that still need to be fixed (or have new issues opened) before #1385 can be closed.
Checklist
docs/source/traits_api_reference
) N/Adocs/source/traits_user_manual
) N/Atraits-stubs
N/A