Skip to content

Commit

Permalink
STY: Fix one typo (#3125)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Feb 16, 2025
1 parent 75a6003 commit 4bfde9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypdf/generic/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def read_hex_string_from_stream(
return create_string_object(bytes(arr), forced_encoding)


__ESPACE_DICT__ = {
__ESCAPE_DICT__ = {
b"n": ord(b"\n"),
b"r": ord(b"\r"),
b"t": ord(b"\t"),
Expand Down Expand Up @@ -79,7 +79,7 @@ def read_string_from_stream(
elif tok == b"\\":
tok = stream.read(1)
try:
txt.append(__ESPACE_DICT__[tok])
txt.append(__ESCAPE_DICT__[tok])
continue
except KeyError:
if b"0" <= tok <= b"7":
Expand All @@ -104,7 +104,7 @@ def read_string_from_stream(
txt.append(i)
continue
elif tok in b"\n\r":
# This case is hit when a backslash followed by a line
# This case is hit when a backslash followed by a line
# break occurs. If it's a multi-char EOL, consume the
# second character:
tok = stream.read(1)
Expand Down

0 comments on commit 4bfde9f

Please sign in to comment.