[Python-checkins] [3.11] gh-106948: Update documentation nitpick_ignore for c:identifer domain (#107295) (#107299)
vstinner
webhook-mailer at python.org
Wed Jul 26 12:27:12 EDT 2023
https://github.com/python/cpython/commit/bd0def00b3d92b30d6d0440a45ab811f3328933e
commit: bd0def00b3d92b30d6d0440a45ab811f3328933e
branch: 3.11
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2023年07月26日T16:27:08Z
summary:
[3.11] gh-106948: Update documentation nitpick_ignore for c:identifer domain (#107295) (#107299)
gh-106948: Update documentation nitpick_ignore for c:identifer domain (#107295)
Update the nitpick_ignore of the documentation configuration to fix
Sphinx warnings about standard C types when declaring functions with
the "c:function" markups.
Copy standard C types declared in the "c:type" domain to the
"c:identifier" domain, since "c:function" markup looks for types in
the "c:identifier" domain.
Co-authored-by: Serhiy Storchaka <storchaka at gmail.com>
(cherry picked from commit b1de3807b832b72dfeb66dd5646159d08d2cc74a)
files:
M Doc/conf.py
diff --git a/Doc/conf.py b/Doc/conf.py
index 28c35f2b0a234..d5eea9cdfb88d 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -148,6 +148,15 @@
('py:meth', '_SubParsersAction.add_parser'),
]
+# gh-106948: Copy standard C types declared in the "c:type" domain to the
+# "c:identifier" domain, since "c:function" markup looks for types in the
+# "c:identifier" domain. Use list() to not iterate on items which are being
+# added
+for role, name in list(nitpick_ignore):
+ if role == 'c:type':
+ nitpick_ignore.append(('c:identifier', name))
+del role, name
+
# Disable Docutils smartquotes for several translations
smartquotes_excludes = {
'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
More information about the Python-checkins
mailing list