diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2023-01-02 00:01:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 00:01:14 +0000 |
commit | 4032070e8131f518bbb8a04e8d63c5af4df9b59d (patch) | |
tree | 47b14f58d5337448e8358029264ebcd6d1ae7351 /sphinx/util/math.py | |
parent | ede68fa423107fbab74d07b307d7dcb03c00dfbd (diff) | |
download | sphinx-git-4032070e8131f518bbb8a04e8d63c5af4df9b59d.tar.gz |
Run pyupgrade (#11070)
Diffstat (limited to 'sphinx/util/math.py')
-rw-r--r-- | sphinx/util/math.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/util/math.py b/sphinx/util/math.py index cd06dc249..f5b565020 100644 --- a/sphinx/util/math.py +++ b/sphinx/util/math.py @@ -11,7 +11,7 @@ def get_node_equation_number(writer: HTML5Translator, node: nodes.math_block) -> if writer.builder.config.math_numfig and writer.builder.config.numfig: figtype = 'displaymath' if writer.builder.name == 'singlehtml': - key = "%s/%s" % (writer.docnames[-1], figtype) + key = f"{writer.docnames[-1]}/{figtype}" else: key = figtype @@ -54,4 +54,5 @@ def wrap_displaymath(text: str, label: str | None, numbering: bool) -> str: for part in parts: equations.append('%s\\\\\n' % part.strip()) - return '%s\n%s%s' % (begin, ''.join(equations), end) + concatenated_equations = ''.join(equations) + return f'{begin}\n{concatenated_equations}{end}' |