Skip to content

Commit

Permalink
F-strings and repr
Browse files Browse the repository at this point in the history
  • Loading branch information
MomIsBestFriend committed Nov 30, 2019
1 parent eaceb57 commit 7faf289
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions pandas/util/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,18 @@ def wrapper(*args, **kwargs) -> Callable[..., Any]:
if empty1 or empty2 and not summary:
raise AssertionError(doc_error_msg)
wrapper.__doc__ = dedent(
f"""
{summary.strip()}
.. deprecated:: {version}
{msg}
{dedent(doc)}"""
"""
{summary}
.. deprecated:: {depr_version}
{depr_msg}
{rest_of_docstring}"""
).format(
summary=summary.strip(),
depr_version=version,
depr_msg=msg,
rest_of_docstring=dedent(doc),
)

return wrapper
Expand Down

0 comments on commit 7faf289

Please sign in to comment.