From 5c62d9d2de173d4008b8c6aaaccb1db90f2a9a0f Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Fri, 28 Jan 2022 23:24:08 +0000 Subject: [PATCH] Fail the Sphinx render workflow on warnings from Docutils (#2288) --- pep_sphinx_extensions/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pep_sphinx_extensions/__init__.py b/pep_sphinx_extensions/__init__.py index d2e201c3d..a281d6e6f 100644 --- a/pep_sphinx_extensions/__init__.py +++ b/pep_sphinx_extensions/__init__.py @@ -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)