Skip to content

Commit 1bed8c0

Browse files
Convert to Markdown: Excise output_format completely
Assisted-by: Codex
1 parent fc55159 commit 1bed8c0

3 files changed

Lines changed: 0 additions & 11 deletions

File tree

src/pdfrest/client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,6 @@ def convert_to_markdown(
21762176
*,
21772177
pages: PdfPageSelection | None = None,
21782178
output_type: SummaryOutputType = "json",
2179-
output_format: SummaryOutputFormat = "markdown",
21802179
page_break_comments: Literal["on", "off"] | None = None,
21812180
output: str | None = None,
21822181
extra_query: Query | None = None,
@@ -2189,7 +2188,6 @@ def convert_to_markdown(
21892188
payload: dict[str, Any] = {
21902189
"files": file,
21912190
"output_type": output_type,
2192-
"output_format": output_format,
21932191
}
21942192
if pages is not None:
21952193
payload["pages"] = pages
@@ -3127,7 +3125,6 @@ async def convert_to_markdown(
31273125
*,
31283126
pages: PdfPageSelection | None = None,
31293127
output_type: SummaryOutputType = "json",
3130-
output_format: SummaryOutputFormat = "markdown",
31313128
page_break_comments: Literal["on", "off"] | None = None,
31323129
output: str | None = None,
31333130
extra_query: Query | None = None,
@@ -3140,7 +3137,6 @@ async def convert_to_markdown(
31403137
payload: dict[str, Any] = {
31413138
"files": file,
31423139
"output_type": output_type,
3143-
"output_format": output_format,
31443140
}
31453141
if pages is not None:
31463142
payload["pages"] = pages

src/pdfrest/models/_internal.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,6 @@ class ConvertToMarkdownPayload(BaseModel):
402402
output_type: Annotated[
403403
SummaryOutputType, Field(serialization_alias="output_type", default="json")
404404
] = "json"
405-
output_format: Annotated[
406-
SummaryOutputFormat,
407-
Field(serialization_alias="output_format", default="markdown"),
408-
] = "markdown"
409405
page_break_comments: Annotated[
410406
Literal["on", "off"] | None,
411407
Field(serialization_alias="page_break_comments", default=None),

tests/test_convert_to_markdown.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def test_convert_to_markdown_json_success(monkeypatch: pytest.MonkeyPatch) -> No
5757
"pages": ["1-3"],
5858
"output": "md",
5959
"output_type": "json",
60-
"output_format": "markdown",
6160
"page_break_comments": "on",
6261
}
6362
).model_dump(mode="json", by_alias=True, exclude_none=True, exclude_unset=True)
@@ -87,7 +86,6 @@ def handler(request: httpx.Request) -> httpx.Response:
8786
pages=["1-3"],
8887
output="md",
8988
output_type="json",
90-
output_format="markdown",
9189
page_break_comments="on",
9290
)
9391

@@ -108,7 +106,6 @@ def test_convert_to_markdown_request_customization(
108106
{
109107
"files": [input_file],
110108
"output_type": "file",
111-
"output_format": "markdown",
112109
"page_break_comments": "off",
113110
}
114111
).model_dump(mode="json", by_alias=True, exclude_none=True, exclude_unset=True)

0 commit comments

Comments
 (0)