Skip to content

Commit 0a6d846

Browse files
Convert to Markdown: Excise output_format completely
Assisted-by: Codex
1 parent 83bd36c commit 0a6d846

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
@@ -2100,7 +2100,6 @@ def convert_to_markdown(
21002100
*,
21012101
pages: PdfPageSelection | None = None,
21022102
output_type: SummaryOutputType = "json",
2103-
output_format: SummaryOutputFormat = "markdown",
21042103
page_break_comments: Literal["on", "off"] | None = None,
21052104
output: str | None = None,
21062105
extra_query: Query | None = None,
@@ -2113,7 +2112,6 @@ def convert_to_markdown(
21132112
payload: dict[str, Any] = {
21142113
"files": file,
21152114
"output_type": output_type,
2116-
"output_format": output_format,
21172115
}
21182116
if pages is not None:
21192117
payload["pages"] = pages
@@ -3017,7 +3015,6 @@ async def convert_to_markdown(
30173015
*,
30183016
pages: PdfPageSelection | None = None,
30193017
output_type: SummaryOutputType = "json",
3020-
output_format: SummaryOutputFormat = "markdown",
30213018
page_break_comments: Literal["on", "off"] | None = None,
30223019
output: str | None = None,
30233020
extra_query: Query | None = None,
@@ -3030,7 +3027,6 @@ async def convert_to_markdown(
30303027
payload: dict[str, Any] = {
30313028
"files": file,
30323029
"output_type": output_type,
3033-
"output_format": output_format,
30343030
}
30353031
if pages is not None:
30363032
payload["pages"] = pages

src/pdfrest/models/_internal.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,6 @@ class ConvertToMarkdownPayload(BaseModel):
383383
output_type: Annotated[
384384
SummaryOutputType, Field(serialization_alias="output_type", default="json")
385385
] = "json"
386-
output_format: Annotated[
387-
SummaryOutputFormat,
388-
Field(serialization_alias="output_format", default="markdown"),
389-
] = "markdown"
390386
page_break_comments: Annotated[
391387
Literal["on", "off"] | None,
392388
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)