Fail the Sphinx render workflow on warnings from Docutils (#2288)

This commit is contained in:
Adam Turner 2022-01-28 23:24:08 +00:00 committed by GitHub
parent 795214108b
commit 5c62d9d2de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ def setup(app: Sphinx) -> dict[str, bool]:
"""Initialize Sphinx extension."""
environment.default_settings["pep_url"] = "pep-{:0>4}.html"
environment.default_settings["halt_level"] = 2 # Fail on Docutils warning
# Register plugin logic
app.add_builder(pep_html_builder.FileBuilder, override=True)