Skip to content

Commit

Permalink
TO REMOVE: for debugging github ci on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourlon committed Feb 5, 2024
1 parent 8c9020a commit 095ac87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypdf/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -2216,13 +2216,13 @@ def __getitem__(
cls = type(self)
return cls(indices.__len__, lambda idx: self[indices[idx]])
if not isinstance(index, int):
raise TypeError("sequence indices must be integers")
raise TypeError(f"sequence indices must be integers (got index = {index})")
len_self = len(self)
if index < 0:
# support negative indexes
index = len_self + index
if index < 0 or index >= len_self:
raise IndexError("sequence index out of range")
raise IndexError(f"sequence index out of range (got size = {len_self}, index: {index})")
return self.get_function(index)

def __delitem__(self, index: Union[int, slice]) -> None:
Expand Down

0 comments on commit 095ac87

Please sign in to comment.