From 2b6575c0ebe25ca8dcd82a16e385c7635dd89f65 Mon Sep 17 00:00:00 2001 From: krusta Date: Wed, 24 Jun 2026 20:06:53 +0530 Subject: [PATCH 1/2] docs: enable nitpicky mode to warn on broken references --- docs/conf.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7c92bcc84..a0e942350 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -115,6 +115,16 @@ # Intersphinx configuration intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} +# NOTE(vytas): Nitpicky mode is enabled to warn on broken references and +# missing links during the documentation build. Unresolved type aliases +# are suppressed via nitpick_ignore below. +nitpicky = True +nitpick_ignore = [ + ('py:class', 'SyncMiddleware'), + ('py:class', 'AsyncMiddleware'), + ('py:class', 'PreparedMiddlewareResult'), +] + # NOTE(vytas): The autodoc_type_aliases mapping below doesn't really work as # advertised... # Sphinx is looking for the mapped types defined as classes, however, typing @@ -129,8 +139,6 @@ # # See also https://github.com/sphinx-doc/sphinx/issues/10785 & related issues # for discussion and potentially better workarounds. -# TODO(vytas): If we enable the "nitpicky" mode, we will have to add exceptions -# for all unresolved aliases. autodoc_type_aliases = { 'SyncMiddleware': 'SyncMiddleware', 'AsyncMiddleware': 'AsyncMiddleware', From 6d9242244f6226296c85ac5751cbe340dd00c5a6 Mon Sep 17 00:00:00 2001 From: krusta Date: Sat, 27 Jun 2026 20:16:05 +0530 Subject: [PATCH 2/2] docs: add towncrier news fragment for #1888 --- docs/_newsfragments/1888.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_newsfragments/1888.misc.rst diff --git a/docs/_newsfragments/1888.misc.rst b/docs/_newsfragments/1888.misc.rst new file mode 100644 index 000000000..cbac9d095 --- /dev/null +++ b/docs/_newsfragments/1888.misc.rst @@ -0,0 +1 @@ +Enabled Sphinx ``nitpicky`` mode to surface broken references during documentation builds. \ No newline at end of file