Skip to content

Commit 928f980

Browse files
public.py: Tighten Add Text typing
- Remove `int` in favor of `float` wherever both were accepted - `page` requires literal `"all"`, not any `str` Assisted-by: Codex
1 parent 0e40eee commit 928f980

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/pdfrest/types/public.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ class PdfRedactionInstruction(TypedDict):
113113

114114
class PdfAddTextObject(TypedDict, total=False):
115115
font: Required[str]
116-
max_width: Required[float | int | str]
117-
opacity: Required[float | int | str]
118-
page: Required[int | str]
119-
rotation: Required[float | int | str]
116+
max_width: Required[float | str]
117+
opacity: Required[float | str]
118+
page: Required[Literal["all"] | int]
119+
rotation: Required[float | str]
120120
text: Required[str]
121121
text_color_rgb: PdfRGBColor
122122
text_color_cmyk: PdfCmykColor
123-
text_size: Required[float | int | str]
124-
x: Required[float | int | str]
125-
y: Required[float | int | str]
123+
text_size: Required[float | str]
124+
x: Required[float | str]
125+
y: Required[float | str]
126126
is_rtl: bool
127127

128128

0 commit comments

Comments
 (0)