Skip to content

Commit

Permalink
MAINT: Narrow return type for ContentStream.operations (#2941)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmurphy4 authored Nov 13, 2024
1 parent 7678eff commit 66089ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ history and [GitHub's 'Contributors' feature](https://github.com/py-pdf/pypdf/gr
* [maxbeer99](https://github.com/maxbeer99)
* [McNeil, Karen](https://github.com/karenlmcneil): Arabic Language Support
* [Mérino, Antoine](https://github.com/Merinorus)
* [Murphy, Kevin](https://github.com/kmurphy4)
* [nalin-udhaar](https://github.com/nalin-udhaar)
* [Paramonov, Alexey](https://github.com/alexey-v-paramonov)
* [Paternault, Louis](https://framagit.org/spalax)
Expand Down
2 changes: 1 addition & 1 deletion pypdf/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def _get_inline_images(self) -> Dict[str, ImageFile]:
)
elif ope in (b"BI", b"EI", b"ID"): # pragma: no cover
raise PdfReadError(
f"{ope} operator met whereas not expected,"
f"{ope!r} operator met whereas not expected,"
"please share usecase with pypdf dev team"
)
"""backup
Expand Down
2 changes: 1 addition & 1 deletion pypdf/generic/_data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ def set_data(self, data: bytes) -> None:
self._operations = []

@property
def operations(self) -> List[Tuple[Any, Any]]:
def operations(self) -> List[Tuple[Any, bytes]]:
if not self._operations and self._data:
self._parse_content_stream(BytesIO(self._data))
self._data = b""
Expand Down

0 comments on commit 66089ac

Please sign in to comment.