Skip to content

Commit

Permalink
pacify mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
0xabu committed May 24, 2024
1 parent f1a1bf4 commit 53f2b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdfannots/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def postprocess(self) -> None:
# default initial contents are a copy of the selected text. Unless the user goes to
# the trouble of editing each annotation, this goes badly for us because we have
# duplicate text and contents (e.g., for simple highlights and strikeout).
if self.contents and self.text and self.gettext().strip() == self.contents.strip():
if self.contents and (text := self.gettext()) and text.strip() == self.contents.strip():
self.contents = None


Expand Down

0 comments on commit 53f2b4d

Please sign in to comment.