Skip to content

Commit b1de380

Browse files
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]>
1 parent da8f87b commit b1de380

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
@@ -8,7 +8,6 @@ Doc/c-api/arg.rst
88
Doc/c-api/bool.rst
99
Doc/c-api/buffer.rst
1010
Doc/c-api/bytes.rst
11-
Doc/c-api/call.rst
1211
Doc/c-api/capsule.rst
1312
Doc/c-api/cell.rst
1413
Doc/c-api/code.rst
@@ -26,8 +25,6 @@ Doc/c-api/init.rst
2625
Doc/c-api/init_config.rst
2726
Doc/c-api/intro.rst
2827
Doc/c-api/iterator.rst
29-
Doc/c-api/long.rst
30-
Doc/c-api/marshal.rst
3128
Doc/c-api/memory.rst
3229
Doc/c-api/memoryview.rst
3330
Doc/c-api/module.rst

0 commit comments

Comments
 (0)