[Python-checkins] bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Victor Stinner webhook-mailer at python.org
Mon Aug 17 02:41:47 EDT 2020


https://github.com/python/cpython/commit/1abeda80f760134b4233608e2c288790f955b95a
commit: 1abeda80f760134b4233608e2c288790f955b95a
branch: master
author: Victor Stinner <vstinner at python.org>
committer: GitHub <noreply at github.com>
date: 2020-08-17T08:41:42+02:00
summary:

bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:

Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions

files:
M Doc/library/string.rst
M Doc/reference/introduction.rst

diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index fa906f799c108..62e86d6dd9706 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -308,7 +308,7 @@ non-empty format specification typically modifies the result.
 
 The general form of a *standard format specifier* is:
 
-.. productionlist:: sf
+.. productionlist::
    format_spec: [[`fill`]`align`][`sign`][#][0][`width`][`grouping_option`][.`precision`][`type`]
    fill: <any character>
    align: "<" | ">" | "=" | "^"
diff --git a/Doc/reference/introduction.rst b/Doc/reference/introduction.rst
index bb7e3906dba60..62480bd7dd9a6 100644
--- a/Doc/reference/introduction.rst
+++ b/Doc/reference/introduction.rst
@@ -93,7 +93,7 @@ Notation
 The descriptions of lexical analysis and syntax use a modified BNF grammar
 notation.  This uses the following style of definition:
 
-.. productionlist:: *
+.. productionlist::
    name: `lc_letter` (`lc_letter` | "_")*
    lc_letter: "a"..."z"
 



More information about the Python-checkins mailing list