-
Notifications
You must be signed in to change notification settings - Fork 297
Ensure cubelists only contain cubes #3238
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
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4ab7cfa
ensure cubelists only contain cubes
rcomer 0b293ec
address __iadd__ and __setitem__
rcomer 8a74df9
__setitem__ tests
rcomer 2622254
test for setting more than 1 item
rcomer 39d5f4d
Fix __setitem__ and Py2 tweaks
rcomer 4187162
implement __setslice__ for Python2.7
rcomer 569f35e
change exceptions to warnings
rcomer 5b13dcc
stickler
rcomer 8f272fb
duck type check; move helpers outside class
rcomer f7134c1
blank lines
rcomer bc7eb7a
proposed: revert warnings to exceptions
rcomer d961a68
remove stray extra 'test_fail'
rcomer a84823e
Merge branch 'master' of github.com:SciTools/iris into cubelist-conta…
rcomer 7fe5d0a
pass sequences through __init__; _assert_is_cube
rcomer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
docs/iris/src/whatsnew/contributions_2.3.0/bugfix_2018-Dec-07_only_cubes_in_cubelists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* The `append`, `extend` and `insert` methods of :class:`iris.cube.CubeList` | ||
now perform a check to ensure that only :class:`iris.cube.Cube` instances are | ||
added. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Changed
copy
method tocopy.copy
function for Python2 compatibility, but nowcubelist
becomesNone
after the add. 🤷♀️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.
Travis output showing the above:
Python2.7
Python3.6
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.
This test passes if I point it at the
master
branch. The equivalent test forextend
passes on this branch. So this appearance ofNone
is specific to:copy.copy
function (or copying viacubelist = self.cubelist1[:]
) rather thancopy
method.__iadd__
with the changes I've made.I'm officially confused.