-
Notifications
You must be signed in to change notification settings - Fork 45
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
Remove usage of Trait()
#925
Conversation
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.
Code changes look good to me, modulo one nitpick.
There's a good amount of logic in the ScrollBarRange
and ScrollPosition
trait types - it would be worth adding some tests for those.
enable/drawing/drag_box.py
Outdated
@@ -18,7 +18,7 @@ | |||
# Enthought library imports | |||
from enable.primitives.api import Box | |||
from enable.enable_traits import Pointer | |||
from traits.api import Event, Float, Trait, Tuple | |||
from traits.api import Event, Float, Union, Tuple |
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.
Nit 🔤
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
This largely removes the usage of
Trait()
in the codebase. The places where it is not changed are inenable.color
(which is resolved by #924) and in theKivaFontTrait
which is complex enough to deserve its own PR.The PR was done in stages, each commit doing a different type of trait replacement (eg. Trait -> Union, Trait -> Map, etc.) so it may be easier to review one commit at a time.
Fixes #417.