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 6, 2024
1 parent 7b8553c commit e94f369
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("sequence indices must be integers") from TypeError(f"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("sequence index out of range") from IndexError(f"size = {len_self}, index: {index}")
return self.get_function(index)

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

0 comments on commit e94f369

Please sign in to comment.