Skip to content

Commit a307d80

Browse files
models: Restrict PdfSignaturePoint coordinates to float type
- Updated `_PdfSignaturePointModel` and `PdfSignaturePoint` to enforce `x` and `y` as `float` instead of accepting `str | int | float`. - Ensures stricter type validation for signature positioning. Assisted-by: Codex
1 parent 73d443d commit a307d80

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/pdfrest/models/_internal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -963,8 +963,8 @@ class PdfPresetRedactionModel(BaseModel):
963963

964964

965965
class _PdfSignaturePointModel(BaseModel):
966-
x: str | int | float
967-
y: str | int | float
966+
x: float
967+
y: float
968968

969969

970970
class _PdfSignatureLocationModel(BaseModel):

src/pdfrest/types/public.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ class PdfMergeSource(TypedDict, total=False):
164164
HtmlPageOrientation = Literal["portrait", "landscape"]
165165
HtmlWebLayout = Literal["desktop", "tablet", "mobile"]
166166

167+
167168
class PdfSignaturePoint(TypedDict):
168-
x: str | int | float
169-
y: str | int | float
169+
x: float
170+
y: float
170171

171172

172173
class PdfSignatureLocation(TypedDict):

0 commit comments

Comments
 (0)