From 3d9464c001e99f3ae0c4f04c523b59f50cda8761 Mon Sep 17 00:00:00 2001 From: j-t-1 <120829237+j-t-1@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:50:17 +0000 Subject: [PATCH] DOC: Add Polygon to a comment (#2972) The annotations Polygon and Polyline automatically set /Rect. --- pypdf/annotations/_base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pypdf/annotations/_base.py b/pypdf/annotations/_base.py index 2aff325aa..e726006dc 100644 --- a/pypdf/annotations/_base.py +++ b/pypdf/annotations/_base.py @@ -9,11 +9,11 @@ class AnnotationDictionary(DictionaryObject, ABC): def __init__(self) -> None: from ..generic._base import NameObject - # "rect" should not be added here as PolyLine can automatically set it + # /Rect should not be added here as Polygon and PolyLine can automatically set it self[NameObject("/Type")] = NameObject("/Annot") - # The flags were NOT added to the constructor on purpose: We expect that - # most users don't want to change the default. If they do, they - # can use the property. The default is 0. + # The flags were NOT added to the constructor on purpose: + # We expect that most users don't want to change the default. + # If they do, they can use the property. The default is 0. @property def flags(self) -> AnnotationFlag: