Skip to content

BUG: Placeholders not being filled on docstrings #39139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/whatsnew/v1.2.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Fixed regressions
- Fixed regression in :meth:`DataFrame.replace` raising ``ValueError`` when :class:`DataFrame` has dtype ``bytes`` (:issue:`38900`)
- Fixed regression in :meth:`DataFrameGroupBy.diff` raising for ``int8`` and ``int16`` columns (:issue:`39050`)
- Fixed regression that raised ``AttributeError`` with PyArrow versions [0.16.0, 1.0.0) (:issue:`38801`)
- Fixed regression that caused templated docstrings to not get parsed (:issue:`39115`)
-
-

Expand Down
2 changes: 2 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -9527,6 +9527,7 @@ def truncate(
return result

@final
@doc(klass=_shared_doc_kwargs["klass"])
def tz_convert(
self: FrameOrSeries, tz, axis=0, level=None, copy: bool_t = True
) -> FrameOrSeries:
Expand Down Expand Up @@ -10488,6 +10489,7 @@ def prod(

product = prod

@doc()
def mad(self, axis=None, skipna=None, level=None):
"""
{desc}
Expand Down
2 changes: 1 addition & 1 deletion pandas/util/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def decorator(decorated: F) -> F:
decorated.__doc__ = "".join(
[
component.format(**params)
if isinstance(component, str)
if isinstance(component, str) and params != {}
else dedent(component.__doc__ or "")
for component in docstring_components
]
Expand Down