Skip to content

Commit

Permalink
mypy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pubpub-zz committed Nov 10, 2022
1 parent 5eca56f commit deb4ec9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions PyPDF2/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,8 @@ def _add_page(
# therefore in order to add easily multiple copies of the same page, we need to create a new
# dictionnary for the page, however the objects below (including content) is not duplicated
try: # delete an already existing page
assert page_org.indirect_ref is not None
del self._id_translated[id(page_org.indirect_ref.pdf)][
page_org.indirect_ref.idnum
del self._id_translated[id(page_org.indirect_ref.pdf)][ # type: ignore
page_org.indirect_ref.idnum # type: ignore
]
except Exception:
pass
Expand Down

0 comments on commit deb4ec9

Please sign in to comment.