-
Notifications
You must be signed in to change notification settings - Fork 32
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
Improve error message if adding neurodata types of the wrong types as property values #638
Improve error message if adding neurodata types of the wrong types as property values #638
Conversation
Fix missing arg
…/github.com/NeurodataWithoutBorders/matnwb into change/improve-type-validator-error-message
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #638 +/- ##
=======================================
Coverage 95.23% 95.24%
=======================================
Files 115 117 +2
Lines 4873 4901 +28
=======================================
+ Hits 4641 4668 +27
- Misses 232 233 +1 ☔ View full report in Codecov by Sentry. |
…/github.com/NeurodataWithoutBorders/matnwb into change/improve-type-validator-error-message
tf = false; | ||
if startsWith(typeName, 'types.') && ~startsWith(typeName, 'types.untyped') | ||
tf = true; |
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.
tf = false; | |
if startsWith(typeName, 'types.') && ~startsWith(typeName, 'types.untyped') | |
tf = true; | |
tf = startsWith(typeName, 'types.') && ~startsWith(typeName, 'types.untyped'); |
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.
Changed this to check that the provided string is a class which inherits from types.untyped.MetaClass.
That previous implementation would return true for any string starting with typed.<something>
lgtm! |
Make check more robust
Motivation
Throw more precise error message if trying to set a Neurodata type which is incorrect type
How to test the behavior?
Before
After
Checklist
fix #XX
whereXX
is the issue number?