Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ee2503

Browse files
[3.11]GH-104284: Fix documentation gettext build (GH-104296) (#104299)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent8a6ff59 commit2ee2503

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎Doc/tools/extensions/pyspecific.py‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,14 @@ def process_audit_events(app, doctree, fromdocname):
679679
node.replace_self(table)
680680

681681

682-
defpatch_pairindextypes(app)->None:
682+
defpatch_pairindextypes(app,_env)->None:
683+
"""Remove all entries from ``pairindextypes`` before writing POT files.
684+
685+
We want to run this just before writing output files, as the check to
686+
circumvent is in ``I18nBuilder.write_doc()``.
687+
As such, we link this to ``env-check-consistency``, even though it has
688+
nothing to do with the environment consistency check.
689+
"""
683690
ifapp.builder.name!='gettext':
684691
return
685692

@@ -693,14 +700,7 @@ def patch_pairindextypes(app) -> None:
693700
# the Sphinx-translated pairindextypes values. As we intend to move
694701
# away from this, we need Sphinx to believe that these values don't
695702
# exist, by deleting them when using the gettext builder.
696-
697-
pairindextypes.pop('module',None)
698-
pairindextypes.pop('keyword',None)
699-
pairindextypes.pop('operator',None)
700-
pairindextypes.pop('object',None)
701-
pairindextypes.pop('exception',None)
702-
pairindextypes.pop('statement',None)
703-
pairindextypes.pop('builtin',None)
703+
pairindextypes.clear()
704704

705705

706706
defsetup(app):
@@ -725,7 +725,7 @@ def setup(app):
725725
app.add_directive_to_domain('py','awaitablemethod',PyAwaitableMethod)
726726
app.add_directive_to_domain('py','abstractmethod',PyAbstractMethod)
727727
app.add_directive('miscnews',MiscNews)
728-
app.connect('builder-inited',patch_pairindextypes)
728+
app.connect('env-check-consistency',patch_pairindextypes)
729729
app.connect('doctree-resolved',process_audit_events)
730730
app.connect('env-merge-info',audit_events_merge)
731731
app.connect('env-purge-doc',audit_events_purge)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp