]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-106948: Update documentation nitpick_ignore for c:identifer domain (#107295)
authorVictor Stinner <vstinner@python.org>
Wed, 26 Jul 2023 16:04:46 +0000 (18:04 +0200)
committerGitHub <noreply@github.com>
Wed, 26 Jul 2023 16:04:46 +0000 (18:04 +0200)
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@gmail.com>
Doc/conf.py
Doc/tools/.nitignore

index 453f4fc63883adf0152d55425be49ff3a0781d9d..8821a2a172f11d4be4ade027953f9a850a36c566 100644 (file)
@@ -153,6 +153,15 @@ nitpick_ignore = [
     ('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'],
index fc6de10eb1c2c8743d4ee05ea382f4942615eb56..07123bcb5ae064f925abec1e807e4f42d1772ca4 100644 (file)
@@ -8,7 +8,6 @@ Doc/c-api/arg.rst
 Doc/c-api/bool.rst
 Doc/c-api/buffer.rst
 Doc/c-api/bytes.rst
-Doc/c-api/call.rst
 Doc/c-api/capsule.rst
 Doc/c-api/cell.rst
 Doc/c-api/code.rst
@@ -26,8 +25,6 @@ Doc/c-api/init.rst
 Doc/c-api/init_config.rst
 Doc/c-api/intro.rst
 Doc/c-api/iterator.rst
-Doc/c-api/long.rst
-Doc/c-api/marshal.rst
 Doc/c-api/memory.rst
 Doc/c-api/memoryview.rst
 Doc/c-api/module.rst