Skip to content

Commit

Permalink
optional
Browse files Browse the repository at this point in the history
  • Loading branch information
francois committed Jan 19, 2024
1 parent 15fbfca commit 6a34b8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pypdf/generic/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,9 @@ class NameObject(str, PdfObject): # noqa: SLOT000
**{chr(i): f"#{i:02X}".encode() for i in range(33)},
}

def __init__(self, value: str = "", encoding: str = None, errors: str = "strict"):
def __init__(
self, value: str = "", encoding: str | None = None, errors: str = "strict"
):
if value[0] != "/":
value = "/" + value
super().__init__(value, encoding, errors)
Expand Down

0 comments on commit 6a34b8d

Please sign in to comment.