Skip to content

Add MappedUnion and Optional traits and use Optional where appropriate#838

Merged
corranwebster merged 8 commits into
mainfrom
enh/mapped-union-trait
Oct 25, 2022
Merged

Add MappedUnion and Optional traits and use Optional where appropriate#838
corranwebster merged 8 commits into
mainfrom
enh/mapped-union-trait

Conversation

@corranwebster
Copy link
Copy Markdown
Contributor

This overcomes a problem where replacing Trait(...) by Union(...) lost mapped trait behaviour.

Copy link
Copy Markdown
Member

@rkern rkern left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread examples/demo/canvas/mptools.py Outdated
_orig_low = CArray # Union(None, Tuple)
_orig_high = CArray # Union(None, Tuple)
_orig_low = CArray # Optional(Tuple)
_orig_high = CArray # Optional(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.

These comments are just dead code by now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed - thanks!

@corranwebster corranwebster merged commit c8d116c into main Oct 25, 2022
@corranwebster corranwebster deleted the enh/mapped-union-trait branch October 25, 2022 11:05
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.

2 participants