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

Remove usage of Trait() #925

Merged
merged 6 commits into from
Apr 6, 2022
Merged

Remove usage of Trait() #925

merged 6 commits into from
Apr 6, 2022

Conversation

corranwebster
Copy link
Contributor

This largely removes the usage of Trait() in the codebase. The places where it is not changed are in enable.color (which is resolved by #924) and in the KivaFontTrait 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.

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 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.

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

Nit 🔤

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.

LGTM

@corranwebster corranwebster merged commit c495399 into main Apr 6, 2022
@corranwebster corranwebster deleted the enh/remove-old-traits branch April 6, 2022 09:46
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.

Use new Trait types
2 participants