-
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
implement TraitInstance to inherit directly from TraitHandler #761
implement TraitInstance to inherit directly from TraitHandler #761
Conversation
-- because ThisClass will be deprecated in version 6 release.
Codecov Report
@@ Coverage Diff @@
## master #761 +/- ##
=========================================
Coverage ? 71.73%
=========================================
Files ? 51
Lines ? 6337
Branches ? 1281
=========================================
Hits ? 4546
Misses ? 1393
Partials ? 398
Continue to review full report at Codecov.
|
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.
Please remove the validate_none
and info_none
methods. Apart from that, this LGTM
traits/trait_handlers.py
Outdated
@@ -419,6 +428,9 @@ def info(self): | |||
|
|||
return result | |||
|
|||
def info_none(self): |
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.
I think this method can be removed: info_none
is only used in ThisClass.__init__
.
traits/trait_handlers.py
Outdated
def validate_failed(self, object, name, value): | ||
self.error(object, name, value) | ||
|
||
def validate_none(self, object, name, value): |
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.
This method isn't needed.
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, if the CI agrees.
Apart from |
Yep, I think that's reasonable. My only worry about that would be subclasses of |
contributes to #697
ThisClass
toTraitInstance
.