Skip to content

Commit fc627fa

Browse files
authored
DOC: Fix some RT02 issues in docstrings (#50785)
* Corrected docstrings * remove functions from code_checks.sh * DOC Fix RT02 issues in docstrings GH49968 * DOC corrected docstring to comply with RT02 * DOC correcting RT02 errors PR50785
1 parent d3ed92b commit fc627fa

File tree

6 files changed

+6
-16
lines changed

6 files changed

+6
-16
lines changed

ci/code_checks.sh

+1-11
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,17 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8585

8686
MSG='Partially validate docstrings (RT02)' ; echo $MSG
8787
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=RT02 --ignore_functions \
88-
pandas.Series.align \
89-
pandas.Series.dt.total_seconds \
90-
pandas.Series.cat.rename_categories \
91-
pandas.Series.cat.reorder_categories \
92-
pandas.Series.cat.add_categories \
93-
pandas.Series.cat.remove_categories \
94-
pandas.Series.cat.remove_unused_categories \
9588
pandas.Index.all \
9689
pandas.Index.any \
9790
pandas.MultiIndex.drop \
9891
pandas.DatetimeIndex.to_pydatetime \
9992
pandas.TimedeltaIndex.to_pytimedelta \
100-
pandas.core.groupby.SeriesGroupBy.apply \
101-
pandas.core.groupby.DataFrameGroupBy.apply \
10293
pandas.io.formats.style.Styler.export \
10394
pandas.api.extensions.ExtensionArray.astype \
10495
pandas.api.extensions.ExtensionArray.dropna \
10596
pandas.api.extensions.ExtensionArray.isna \
10697
pandas.api.extensions.ExtensionArray.repeat \
107-
pandas.api.extensions.ExtensionArray.unique \
108-
pandas.DataFrame.align
98+
pandas.api.extensions.ExtensionArray.unique
10999
RET=$(($RET + $?)) ; echo $MSG "DONE"
110100

111101
fi

pandas/core/arrays/timedeltas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def total_seconds(self) -> npt.NDArray[np.float64]:
726726
727727
Returns
728728
-------
729-
seconds : [ndarray, Float64Index, Series]
729+
ndarray, Float64Index or Series
730730
When the calling object is a TimedeltaArray, the return type
731731
is ndarray. When the calling object is a TimedeltaIndex,
732732
the return type is a Float64Index. When the calling object

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11018,7 +11018,7 @@ def to_period(
1101811018
1101911019
Returns
1102011020
-------
11021-
DataFrame:
11021+
DataFrame
1102211022
The DataFrame has a PeriodIndex.
1102311023
1102411024
Examples

pandas/core/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9123,7 +9123,7 @@ def align(
91239123
91249124
Returns
91259125
-------
9126-
(left, right) : ({klass}, type of other)
9126+
tuple of ({klass}, type of other)
91279127
Aligned objects.
91289128
91299129
Examples

pandas/core/groupby/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class providing the base-class of operations.
174174
175175
Returns
176176
-------
177-
applied : Series or DataFrame
177+
Series or DataFrame
178178
179179
See Also
180180
--------

pandas/util/_decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _format_argument_list(allow_args: list[str]) -> str:
228228
229229
Returns
230230
-------
231-
s : str
231+
str
232232
The substring describing the argument list in best way to be
233233
inserted to the warning message.
234234

0 commit comments

Comments
 (0)