Skip to content

Commit aa97291

Browse files
ShaharNavehproost
authored andcommitted
F-strings (pandas-dev#29988)
1 parent 78bb60e commit aa97291

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

ci/print_skipped.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ def main(filename):
3232
print("-" * 80)
3333
else:
3434
print(
35-
"#{i} {class_name}.{test_name}: {message}".format(
36-
**dict(test_data, i=i)
37-
)
35+
f"#{i} {test_data['class_name']}."
36+
f"{test_data['test_name']}: {test_data['message']}"
3837
)
3938
i += 1

doc/sphinxext/announce.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ def build_string(revision_range, heading="Contributors"):
113113
components["authors"] = "* " + "\n* ".join(components["authors"])
114114

115115
tpl = textwrap.dedent(
116-
"""\
117-
{heading}
118-
{uline}
116+
f"""\
117+
{components['heading']}
118+
{components['uline']}
119119
120-
{author_message}
121-
{authors}"""
122-
).format(**components)
120+
{components['author_message']}
121+
{components['authors']}"""
122+
)
123123
return tpl
124124

125125

doc/sphinxext/contributors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def run(self):
2727
except git.GitCommandError as exc:
2828
return [
2929
self.state.document.reporter.warning(
30-
"Cannot find contributors for range '{}': {}".format(range_, exc),
30+
f"Cannot find contributors for range {repr(range_)}: {exc}",
3131
line=self.lineno,
3232
)
3333
]

0 commit comments

Comments
 (0)