Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_newsfragments/1888.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enabled Sphinx ``nitpicky`` mode to surface broken references during documentation builds.
12 changes: 10 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@
# Intersphinx configuration
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}

# NOTE(vytas): Nitpicky mode is enabled to warn on broken references and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not impersonate me in the comments, use your own nick in the prefix.

# 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
Expand All @@ -130,8 +140,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',
Expand Down
Loading