Skip to content

Commit

Permalink
STY: Use endswith instead of logical equals (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Jul 2, 2024
1 parent 925cdb1 commit 4f43e7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypdf/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def parse_iso8824_date(text: Optional[str]) -> Optional[datetime]:
except ValueError:
continue
else:
if text[-5:] == "+0000":
if text.endswith("+0000"):
d = d.replace(tzinfo=timezone.utc)
return d
raise ValueError(f"Can not convert date: {orgtext}")
Expand Down

0 comments on commit 4f43e7c

Please sign in to comment.