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

Move accept_anything validator to trait_base and rename #1040

Merged
merged 3 commits into from
Apr 27, 2020

Conversation

ievacerny
Copy link
Contributor

Closes #1014

accept_anything validator was defined for each TraitList, TraitSet and TraitDict separately. This PR moves the validator to trait_base to be used by all three and renames it to validate_everything which hopefully is a more informative name of what the function does.

Checklist

  • Tests
  • [ ] Update API reference (docs/source/traits_api_reference)
  • [ ] Update User manual (docs/source/traits_user_manual)
  • [ ] Update type annotation hints in traits-stubs

@ievacerny ievacerny self-assigned this Apr 27, 2020
Copy link
Member

@mdickinson mdickinson left a comment

Choose a reason for hiding this comment

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

Code LGTM. Do you think it would be worth making validate_everything private for now (i.e., renaming to add a leading underscore), just to discourage any Traits users from trying to use it?

@mdickinson
Copy link
Member

Still LGTM.

@ievacerny ievacerny merged commit 506e054 into master Apr 27, 2020
@ievacerny ievacerny deleted the ref/1014-move-accept-anything-validator branch April 27, 2020 17:16
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.

Remove duplication of accept_anything item validator
2 participants