diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-07-26 16:16:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 16:16:04 (GMT) |
commit | 0d2e1317bd4d13c1652a08c3ad8199c03387f73b (patch) | |
tree | 90f9d0b470f020a8066a18d687c2b10bdd846f38 | |
parent | d2355426d688eb9c84b3db15bbae21921858afbf (diff) | |
download | cpython-0d2e1317bd4d13c1652a08c3ad8199c03387f73b.zip cpython-0d2e1317bd4d13c1652a08c3ad8199c03387f73b.tar.gz cpython-0d2e1317bd4d13c1652a08c3ad8199c03387f73b.tar.bz2 |
[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 b1de3807b832b72dfeb66dd5646159d08d2cc74a)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-rw-r--r-- | Doc/conf.py | 9 | ||||
-rw-r--r-- | Doc/tools/.nitignore | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Doc/conf.py b/Doc/conf.py index 067aa1d..209656b 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -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'], diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index b6adbcb..849ef11 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -9,7 +9,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 @@ -28,8 +27,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 |