Skip to content

Never allow negative indexing of the PaginatedList#306

Merged
Thetwam merged 1 commit into
ucfopen:developfrom
UniversalSuperBox:issue/305-negative-index-on-paginatedlist-causes-unexpected-results
Oct 4, 2019
Merged

Never allow negative indexing of the PaginatedList#306
Thetwam merged 1 commit into
ucfopen:developfrom
UniversalSuperBox:issue/305-negative-index-on-paginatedlist-causes-unexpected-results

Conversation

@UniversalSuperBox

Copy link
Copy Markdown

Proposed Changes

Fixes #305.

Fix ucfopen#305 by throwing
IndexError whenever a negative index is requested.

As a bonus, do the same when a slice is requested rather than when it's
used.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 9986e3c on UniversalSuperBox:issue/305-negative-index-on-paginatedlist-causes-unexpected-results into 3ef34a8 on ucfopen:develop.

@jessemcbride jessemcbride left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

@Thetwam Thetwam left a comment

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.

👍

@Thetwam Thetwam merged commit 854d7c1 into ucfopen:develop Oct 4, 2019
@UniversalSuperBox UniversalSuperBox deleted the issue/305-negative-index-on-paginatedlist-causes-unexpected-results branch October 5, 2019 16:36
TShippen pushed a commit to TShippen/canvasapi-async that referenced this pull request Jul 7, 2026
…ive-index-on-paginatedlist-causes-unexpected-results

Never allow negative indexing of the PaginatedList
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.

Negative index on PaginatedList causes unexpected results

4 participants