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

Add new "ArrayOrNone" Trait type. #219

Merged
merged 9 commits into from
Dec 18, 2014
Merged

Add new "ArrayOrNone" Trait type. #219

merged 9 commits into from
Dec 18, 2014

Conversation

mdickinson
Copy link
Member

Resolves #218.

@mdickinson mdickinson mentioned this pull request Dec 17, 2014
4 tasks
@coveralls
Copy link

Coverage Status

Coverage increased (+0.42%) when pulling c06e57e on feature/array-or-none into 751603b on master.

@rkern
Copy link
Member

rkern commented Dec 17, 2014

LGTM! Thanks!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.42%) when pulling fc290c7 on feature/array-or-none into 751603b on master.

""" A trait whose value may be either a NumPy array or None, with
casting allowed. The default is None.
"""
def __init__(self, *args, **metadata):
Copy link
Member Author

Choose a reason for hiding this comment

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

@corranwebster pointed out that this class mixes old-style and new-style; it should be consistent.

numpy_available = True

from traits.testing.unittest_tools import UnittestTools
from ..api import (ArrayOrNone, HasTraits, List, NO_COMPARE, on_trait_change,
Copy link
Member Author

Choose a reason for hiding this comment

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

List and on_trait_change aren't used here.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.42%) when pulling 7829647 on feature/array-or-none into 751603b on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.42%) when pulling c9e3666 on feature/array-or-none into 751603b on master.

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.

Add ArrayOrNone trait.
3 participants