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

Raise KeyError when attempting to slice Layout #1295

Merged
merged 3 commits into from Apr 14, 2017

Conversation

Projects
None yet
2 participants
@philippjfr
Copy link
Contributor

philippjfr commented Apr 14, 2017

Also snuck a unit test for annotations in here.

@@ -529,6 +529,9 @@ def __getitem__(self, key):
if key < len(self):
return self.data.values()[key]
raise KeyError("Element out of range.")
elif isinstance(key, slice):
raise KeyError("A Layout may not be sliced, ensure that you "
"are slicing on a leaf (i.e. not a branch) of the Layout.")

This comment has been minimized.

@jlstevens

jlstevens Apr 14, 2017

Contributor

maybe 'leaf node' or 'leaf item'?

@jlstevens

This comment has been minimized.

Copy link
Contributor

jlstevens commented Apr 14, 2017

Looks good. Happy to merge when the tests pass. And I think that will be it for rc1!

@jlstevens

This comment has been minimized.

Copy link
Contributor

jlstevens commented Apr 14, 2017

Merging.

@jlstevens jlstevens merged commit 1b94bfd into master Apr 14, 2017

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 78.857%
Details
s3-reference-data-cache Test data is cached.
Details

@philippjfr philippjfr deleted the small_fixes branch Apr 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.