Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-106948: Update documentation nitpick_ignore for c:identifer domain
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>
  • Loading branch information
vstinner and serhiy-storchaka committed Jul 26, 2023
commit ec25a365c03684defc1a5094e666a450bd4f485e
9 changes: 9 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,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'],
Expand Down
3 changes: 0 additions & 3 deletions Doc/tools/.nitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down