fixup! Remove `productionlist` hard-coding in translators

This commit is contained in:
Adam Turner 2025-02-10 20:09:55 +00:00
parent eed2524640
commit aefc58164c
2 changed files with 4 additions and 1 deletions

View File

@ -104,6 +104,9 @@ Features added
* #9169: Add the :confval:`intersphinx_resolve_self` option
to resolve an intersphinx reference to the current project.
Patch by Jakob Lykke Andersen and Adam Turner.
* #13326: Remove hardcoding from handling :class:`~sphinx.addnodes.productionlist`
nodes in all writers, to improve flexibility.
Patch by Adam Turner.
Bugs fixed
----------

View File

@ -620,7 +620,7 @@ class ProductionList(SphinxDirective):
return [node]
@staticmethod
def production_group(lines: Sequence[str], options: dict[str, Any]) -> str: # NoQA: ARG004
def production_group(lines: list[str], options: dict[str, Any]) -> str: # NoQA: ARG004
# get production_group
if not lines or ':' in lines[0]:
return ''