Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Narrow return type for ContentStream.operations #2941

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,"
stefan6419846 marked this conversation as resolved.
Show resolved Hide resolved
"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
Loading