Skip to content

Commit

Permalink
Python 3.7 (EoL) syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
biredel committed Mar 30, 2024
1 parent 2b7619f commit 1484610
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pypdf/_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def trailer(self) -> Dict[str, Any]:

class PdfWriterProtocol(PdfCommonDocProtocol, Protocol):
_objects: List[Any]
_id_translated: WeakKeyDictionary["PdfReaderProtocol", Dict[int, int]]
_id_translated: "WeakKeyDictionary[PdfReaderProtocol, Dict[int, int]]"

@abstractmethod
def write(self, stream: Union[Path, StrByteType]) -> Tuple[bool, IO[Any]]:
Expand Down
2 changes: 1 addition & 1 deletion pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def __init__(
self._idnum_hash: Dict[bytes, IndirectObject] = {}
"""Maps hash values of indirect objects to their IndirectObject instances."""

self._id_translated: WeakKeyDictionary[PdfReaderProtocol, dict[int, int]] = WeakKeyDictionary()
self._id_translated: "WeakKeyDictionary[PdfReaderProtocol, dict[int, int]]" = WeakKeyDictionary()

# The root of our page tree node.
pages = DictionaryObject()
Expand Down

0 comments on commit 1484610

Please sign in to comment.