From dd4e410618d525a261a79b7f6e0e6c61264d3e70 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 11 Jun 2026 12:25:04 +0200 Subject: [PATCH] Fail sphinx build on warnings Fix intersphinx links --- doc/Makefile | 2 +- doc/conf.py | 2 +- doc/index.rst | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index d4bb2cbb..fad44321 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -17,4 +17,4 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -W -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/conf.py b/doc/conf.py index cef3215d..8f360306 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -29,7 +29,7 @@ # This should usually point to /3, unless there is a necessity to link to # features in future versions of Python. -intersphinx_mapping = {'py': ('https://docs.python.org/3.14', None)} +intersphinx_mapping = {'py': ('https://docs.python.org/3', None)} add_module_names = False diff --git a/doc/index.rst b/doc/index.rst index 8e577db5..6cf4a140 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -307,7 +307,7 @@ Special typing primitives ``default=None`` is passed, and to :data:`NoDefault` if no value is passed. Previously, passing ``None`` would result in :attr:`!__default__` being set - to :py:data:`types.NoneType`, and passing no value for the parameter would + to :py:class:`types.NoneType`, and passing no value for the parameter would result in :attr:`!__default__` being set to ``None``. .. versionchanged:: 4.12.0 @@ -318,7 +318,7 @@ Special typing primitives .. class:: ParamSpecArgs ParamSpecKwargs - See :py:data:`typing.ParamSpecArgs` and :py:data:`typing.ParamSpecKwargs`. + See :py:class:`typing.ParamSpecArgs` and :py:class:`typing.ParamSpecKwargs`. In ``typing`` since 3.10. .. class:: Protocol @@ -529,7 +529,7 @@ Special typing primitives ``default=None`` is passed, and to :data:`NoDefault` if no value is passed. Previously, passing ``None`` would result in :attr:`!__default__` being set - to :py:data:`types.NoneType`, and passing no value for the parameter would + to :py:class:`types.NoneType`, and passing no value for the parameter would result in :attr:`!__default__` being set to ``None``. .. versionchanged:: 4.12.0 @@ -560,7 +560,7 @@ Special typing primitives ``default=None`` is passed, and to :data:`NoDefault` if no value is passed. Previously, passing ``None`` would result in :attr:`!__default__` being set - to :py:data:`types.NoneType`, and passing no value for the parameter would + to :py:class:`types.NoneType`, and passing no value for the parameter would result in :attr:`!__default__` being set to ``None``. .. versionchanged:: 4.12.0 @@ -802,7 +802,7 @@ Functions * Raises :exc:`TypeError` when it encounters certain objects that are not valid type hints. * Replaces type hints that evaluate to :const:`!None` with - :data:`types.NoneType`. + :class:`types.NoneType`. * Supports the :attr:`Format.FORWARDREF` and :attr:`Format.STRING` formats.