Skip to content

Commit

Permalink
STY: Change interiour_color to interior_color in classes Ellipse and …
Browse files Browse the repository at this point in the history
…Rectangle


Also improve slightly docstrings and documentation
  • Loading branch information
j-t-1 authored May 28, 2024
1 parent 3762ede commit 97756d5
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pypdf/annotations/_markup_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def __init__(
self,
rect: Union[RectangleObject, Tuple[float, float, float, float]],
*,
interiour_color: Optional[str] = None,
interior_color: Optional[str] = None,
**kwargs: Any,
):
super().__init__(**kwargs)
Expand All @@ -221,7 +221,11 @@ def __init__(
}
)

if interiour_color:
if kwargs.get("interiour_color"):
interior_color = kwargs["interiour_color"]
deprecate_with_replacement("interiour_color", "interior_color", "6.0.0")

if interior_color:
self[NameObject("/IC")] = ArrayObject(
[FloatObject(n) for n in hex_to_rgb(interiour_color)]
)
Expand Down Expand Up @@ -257,7 +261,7 @@ def __init__(
self,
rect: Union[RectangleObject, Tuple[float, float, float, float]],
*,
interiour_color: Optional[str] = None,
interior_color: Optional[str] = None,
**kwargs: Any,
):
super().__init__(**kwargs)
Expand All @@ -269,7 +273,11 @@ def __init__(
}
)

if interiour_color:
if kwargs.get("interiour_color"):
interior_color = kwargs["interiour_color"]
deprecate_with_replacement("interiour_color", "interior_color", "6.0.0")

if interior_color:
self[NameObject("/IC")] = ArrayObject(
[FloatObject(n) for n in hex_to_rgb(interiour_color)]
)
Expand Down

0 comments on commit 97756d5

Please sign in to comment.