mirror of
https://github.com/python/cpython.git
synced 2025-08-10 11:58:39 +00:00
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 <storchaka@gmail.com>
(cherry picked from commit b1de3807b8
)
This commit is contained in:
parent
36208b5f6a
commit
bd0def00b3
1 changed files with 9 additions and 0 deletions
|
@ -148,6 +148,15 @@ nitpick_ignore = [
|
||||||
('py:meth', '_SubParsersAction.add_parser'),
|
('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
|
# Disable Docutils smartquotes for several translations
|
||||||
smartquotes_excludes = {
|
smartquotes_excludes = {
|
||||||
'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
|
'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue