Skip to content

Commit cff5db6

Browse files
DEV: Fix type hint for XMP metadata setter to add bytes type (#3464)
1 parent a194465 commit cff5db6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pypdf/_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def xmp_metadata(self) -> Optional[XmpInformation]:
350350
return cast(XmpInformation, self.root_object.xmp_metadata)
351351

352352
@xmp_metadata.setter
353-
def xmp_metadata(self, value: Optional[XmpInformation]) -> None:
353+
def xmp_metadata(self, value: Union[XmpInformation, bytes, None]) -> None:
354354
"""XMP (Extensible Metadata Platform) data."""
355355
if value is None:
356356
if "/Metadata" in self.root_object:

0 commit comments

Comments
 (0)