Skip to content

Commit 7e255a6

Browse files
williamking1221William Joshua King
and
William Joshua King
authored
DOC: fix SA05 errors in docstrings for pandas.core.window Expanding and Rolling, and SeriesGroupBy (#57446)
* DOC: fix SA05 errors in docstrings for pandas.core.window Expanding and Rolling, and SeriesGroupBy * Reverted changes on removing SA05 check * Added SA05 to list of errors for validate docstrings --------- Co-authored-by: William Joshua King <[email protected]>
1 parent 8611eca commit 7e255a6

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

Diff for: ci/code_checks.sh

+2-10
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ fi
6565
### DOCSTRINGS ###
6666
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
6767

68-
MSG='Validate docstrings (EX01, EX03, EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG
69-
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01,EX03,EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06
68+
MSG='Validate docstrings (EX01, EX03, EX04, GL01, GL02, GL03, GL04, GL05, GL06, GL07, GL09, GL10, PR03, PR04, PR05, PR06, PR08, PR09, PR10, RT01, RT02, RT04, RT05, SA02, SA03, SA04, SA05, SS01, SS02, SS03, SS04, SS05, SS06)' ; echo $MSG
69+
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01,EX03,EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SA05,SS01,SS02,SS03,SS04,SS05,SS06
7070
RET=$(($RET + $?)) ; echo $MSG "DONE"
7171

7272
MSG='Partially validate docstrings (PR02)' ; echo $MSG
@@ -3182,14 +3182,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
31823182
pandas.util.hash_pandas_object # There should be no backslash in the final line, please keep this comment in the last ignored function
31833183
RET=$(($RET + $?)) ; echo $MSG "DONE"
31843184

3185-
MSG='Partially validate docstrings (SA05)' ; echo $MSG
3186-
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=SA05 --ignore_functions \
3187-
pandas.core.groupby.SeriesGroupBy.first\
3188-
pandas.core.groupby.SeriesGroupBy.last\
3189-
pandas.core.window.expanding.Expanding.aggregate\
3190-
pandas.core.window.rolling.Rolling.aggregate # There should be no backslash in the final line, please keep this comment in the last ignored function
3191-
RET=$(($RET + $?)) ; echo $MSG "DONE"
3192-
31933185
fi
31943186

31953187
### DOCUMENTATION NOTEBOOKS ###

Diff for: pandas/core/window/expanding.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def _get_window_indexer(self) -> BaseIndexer:
139139
"""
140140
See Also
141141
--------
142-
pandas.DataFrame.aggregate : Similar DataFrame method.
143-
pandas.Series.aggregate : Similar Series method.
142+
DataFrame.aggregate : Similar DataFrame method.
143+
Series.aggregate : Similar Series method.
144144
"""
145145
),
146146
examples=dedent(

Diff for: pandas/core/window/rolling.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1216,8 +1216,8 @@ def calc(x):
12161216
"""
12171217
See Also
12181218
--------
1219-
pandas.DataFrame.aggregate : Similar DataFrame method.
1220-
pandas.Series.aggregate : Similar Series method.
1219+
DataFrame.aggregate : Similar DataFrame method.
1220+
Series.aggregate : Similar Series method.
12211221
"""
12221222
),
12231223
examples=dedent(
@@ -1906,8 +1906,8 @@ def _raise_monotonic_error(self, msg: str):
19061906
"""
19071907
See Also
19081908
--------
1909-
pandas.Series.rolling : Calling object with Series data.
1910-
pandas.DataFrame.rolling : Calling object with DataFrame data.
1909+
Series.rolling : Calling object with Series data.
1910+
DataFrame.rolling : Calling object with DataFrame data.
19111911
"""
19121912
),
19131913
examples=dedent(

0 commit comments

Comments
 (0)