Skip to content

Commit 7faf289

Browse files
author
MomIsBestFriend
committed
F-strings and repr
1 parent eaceb57 commit 7faf289

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

pandas/util/_decorators.py

+12-7
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,18 @@ def wrapper(*args, **kwargs) -> Callable[..., Any]:
8484
if empty1 or empty2 and not summary:
8585
raise AssertionError(doc_error_msg)
8686
wrapper.__doc__ = dedent(
87-
f"""
88-
{summary.strip()}
89-
90-
.. deprecated:: {version}
91-
{msg}
92-
93-
{dedent(doc)}"""
87+
"""
88+
{summary}
89+
90+
.. deprecated:: {depr_version}
91+
{depr_msg}
92+
93+
{rest_of_docstring}"""
94+
).format(
95+
summary=summary.strip(),
96+
depr_version=version,
97+
depr_msg=msg,
98+
rest_of_docstring=dedent(doc),
9499
)
95100

96101
return wrapper

0 commit comments

Comments
 (0)