Skip to content

DOC: fix EX02 errors in docstrings #51369

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

Closed
Closed
Show file tree
Hide file tree
Changes from 3 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
5 changes: 3 additions & 2 deletions ci/code_checks.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02 --ignore_functions \
pandas.DataFrame.plot.line \
pandas.Series.plot.line \
pandas.Timestamp.fromtimestamp \
pandas.Series.sparse.density \
pandas.Series.sparse.npoints \
pandas.Series.sparse.sp_values \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this intentional? looks like you're adding pandas.Series.sparse.sp_values to the ignore list - perhaps something didn't go quite right when merging?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't intentional. I am not very familiar with resolving merge conflicts.

While I was working on the PR the functions pandas.Series.sparse.density, pandas.Series.sparse.npoints, pandas.Series.sparse.sp_values were in the ignore list. I deleted these functions from the ignore list in my next PR, which has been merged just a couple of hours ago. To resolve the conflict I have to delete these functions now.

I can do it locally and push a new commit. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, thanks!

pandas.api.types.infer_dtype \
pandas.api.types.is_datetime64_any_dtype \
pandas.api.types.is_datetime64_ns_dtype \
Expand All @@ -590,7 +592,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.api.types.is_timedelta64_dtype \
pandas.api.types.is_timedelta64_ns_dtype \
pandas.api.types.is_unsigned_integer_dtype \
pandas.core.groupby.DataFrameGroupBy.take \
pandas.core.groupby.SeriesGroupBy.take \
pandas.io.formats.style.Styler.concat \
pandas.io.formats.style.Styler.export \
Expand Down
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ class Timestamp(_Timestamp):

Examples
--------
>>> pd.Timestamp.fromtimestamp(1584199972)
>>> pd.Timestamp.fromtimestamp(1584199972) # doctest: +SKIP
Timestamp('2020-03-14 15:32:52')

Note that the output may change depending on your local time.
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ def take(

Examples
--------
>>> df = DataFrame([('falcon', 'bird', 389.0),
>>> df = pd.DataFrame([('falcon', 'bird', 389.0),
... ('parrot', 'bird', 24.0),
... ('lion', 'mammal', 80.5),
... ('monkey', 'mammal', np.nan),
Expand Down Expand Up @@ -2358,7 +2358,7 @@ def take(

Examples
--------
>>> df = DataFrame([('falcon', 'bird', 389.0),
>>> df = pd.DataFrame([('falcon', 'bird', 389.0),
... ('parrot', 'bird', 24.0),
... ('lion', 'mammal', 80.5),
... ('monkey', 'mammal', np.nan),
Expand Down