Skip to content

Commit 66089ac

Browse files
authored
MAINT: Narrow return type for ContentStream.operations (py-pdf#2941)
Fixes py-pdf#2792 (comment).
1 parent 7678eff commit 66089ac

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ history and [GitHub's 'Contributors' feature](https://github.com/py-pdf/pypdf/gr
3636
* [maxbeer99](https://github.com/maxbeer99)
3737
* [McNeil, Karen](https://github.com/karenlmcneil): Arabic Language Support
3838
* [Mérino, Antoine](https://github.com/Merinorus)
39+
* [Murphy, Kevin](https://github.com/kmurphy4)
3940
* [nalin-udhaar](https://github.com/nalin-udhaar)
4041
* [Paramonov, Alexey](https://github.com/alexey-v-paramonov)
4142
* [Paternault, Louis](https://framagit.org/spalax)

pypdf/_page.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ def _get_inline_images(self) -> Dict[str, ImageFile]:
765765
)
766766
elif ope in (b"BI", b"EI", b"ID"): # pragma: no cover
767767
raise PdfReadError(
768-
f"{ope} operator met whereas not expected,"
768+
f"{ope!r} operator met whereas not expected,"
769769
"please share usecase with pypdf dev team"
770770
)
771771
"""backup

pypdf/generic/_data_structures.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ def set_data(self, data: bytes) -> None:
14011401
self._operations = []
14021402

14031403
@property
1404-
def operations(self) -> List[Tuple[Any, Any]]:
1404+
def operations(self) -> List[Tuple[Any, bytes]]:
14051405
if not self._operations and self._data:
14061406
self._parse_content_stream(BytesIO(self._data))
14071407
self._data = b""

0 commit comments

Comments
 (0)