From 1bfc6a5bd5d7e1d45d07a492b4dd3a257a4a6d33 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Thu, 12 Mar 2020 08:15:59 -0500 Subject: [PATCH] Backport PR #32656: DOC: fix announce formtting --- doc/sphinxext/announce.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/sphinxext/announce.py b/doc/sphinxext/announce.py index 9bc353b115852..839970febda2c 100755 --- a/doc/sphinxext/announce.py +++ b/doc/sphinxext/announce.py @@ -122,14 +122,15 @@ def build_string(revision_range, heading="Contributors"): components["uline"] = "=" * len(components["heading"]) components["authors"] = "* " + "\n* ".join(components["authors"]) + # Don't change this to an fstring. It breaks the formatting. tpl = textwrap.dedent( - f"""\ - {components['heading']} - {components['uline']} + """\ + {heading} + {uline} - {components['author_message']} - {components['authors']}""" - ) + {author_message} + {authors}""" + ).format(**components) return tpl