Skip to content

Commit 0d2e131

Browse files
miss-islingtonvstinnerserhiy-storchaka
authored
[3.12] gh-106948: Update documentation nitpick_ignore for c:identifer domain (GH-107295) (#107297)
gh-106948: Update documentation nitpick_ignore for c:identifer domain (GH-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. (cherry picked from commit b1de380) Co-authored-by: Victor Stinner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent d235542 commit 0d2e131

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Doc/conf.py

+9
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@
153153
('py:meth', '_SubParsersAction.add_parser'),
154154
]
155155

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

Doc/tools/.nitignore

-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Doc/c-api/arg.rst
99
Doc/c-api/bool.rst
1010
Doc/c-api/buffer.rst
1111
Doc/c-api/bytes.rst
12-
Doc/c-api/call.rst
1312
Doc/c-api/capsule.rst
1413
Doc/c-api/cell.rst
1514
Doc/c-api/code.rst
@@ -28,8 +27,6 @@ Doc/c-api/init.rst
2827
Doc/c-api/init_config.rst
2928
Doc/c-api/intro.rst
3029
Doc/c-api/iterator.rst
31-
Doc/c-api/long.rst
32-
Doc/c-api/marshal.rst
3330
Doc/c-api/memory.rst
3431
Doc/c-api/memoryview.rst
3532
Doc/c-api/module.rst

0 commit comments

Comments
 (0)