]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)
authorVictor Stinner <vstinner@python.org>
Mon, 17 Aug 2020 06:41:42 +0000 (08:41 +0200)
committerGitHub <noreply@github.com>
Mon, 17 Aug 2020 06:41:42 +0000 (08:41 +0200)
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

Doc/library/string.rst
Doc/reference/introduction.rst

index fa906f799c1082c627d391fb1d9558fa16354ee4..62e86d6dd97066cbd615084c2042eb423e4b7c6f 100644 (file)
@@ -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: "<" | ">" | "=" | "^"
index bb7e3906dba6072a83bbeeda437de40dba2d06b0..62480bd7dd9a61468bd435bec2f8571fed991d38 100644 (file)
@@ -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"