Skip to content

Remove usage of Trait()#925

Merged
corranwebster merged 6 commits into
mainfrom
enh/remove-old-traits
Apr 6, 2022
Merged

Remove usage of Trait()#925
corranwebster merged 6 commits into
mainfrom
enh/remove-old-traits

Conversation

@corranwebster
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread enable/drawing/drag_box.py Outdated
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit 🔤

Copy link
Copy Markdown
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