Skip to content

Commit

Permalink
DEV: Adjust string formatting to be able to use mutmut
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Jun 22, 2022
1 parent 187224a commit 70166cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PyPDF2/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,11 @@ def write_to_stream(
stream.write(b"(")
for c in bytearr:
if not chr(c).isalnum() and c != b" ":
stream.write(b_(rf"\{c:0>3o}"))
# This:
# stream.write(b_(rf"\{c:0>3o}"))
# gives
# https://github.com/davidhalter/parso/issues/207
stream.write(b_("\\%03o" % c))
else:
stream.write(b_(chr(c)))
stream.write(b")")
Expand Down

0 comments on commit 70166cb

Please sign in to comment.