Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit ddc8ecd

Browse files
committed
chore: specify verify_format=False when running pypandoc
Without this, *every* call to pypandoc.convert_text starts pandoc three times: once to list the input formats, once to list the output formats, and once to actually perform the conversion. With `verify_format=False`, the first two invocations are skipped. For some APIs this can make a huge difference to the speed of generation (listerally about 45% in one test I've performed). We shouldn't need to verify that the formats are supported, as we always use commonmark and rst. Fixes #2503.
1 parent 7d20fbb commit ddc8ecd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

gapic/utils/rst.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def rst(
6161
text,
6262
"rst",
6363
format=source_format,
64+
verify_format=False,
6465
extra_args=["--columns=%d" % (width - indent)],
6566
)
6667
.strip()

0 commit comments

Comments
 (0)