Skip to content

Commit bd0def0

Browse files
[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 <[email protected]> (cherry picked from commit b1de380)
1 parent 36208b5 commit bd0def0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Doc/conf.py

+9
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,15 @@
148148
('py:meth', '_SubParsersAction.add_parser'),
149149
]
150150

151+
# gh-106948: Copy standard C types declared in the "c:type" domain to the
152+
# "c:identifier" domain, since "c:function" markup looks for types in the
153+
# "c:identifier" domain. Use list() to not iterate on items which are being
154+
# added
155+
for role, name in list(nitpick_ignore):
156+
if role == 'c:type':
157+
nitpick_ignore.append(('c:identifier', name))
158+
del role, name
159+
151160
# Disable Docutils smartquotes for several translations
152161
smartquotes_excludes = {
153162
'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],

0 commit comments

Comments
 (0)