-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
STYLE improve validate-docstrings
ergonomics
#52482
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
STYLE improve validate-docstrings
ergonomics
#52482
Conversation
@@ -1005,11 +1005,11 @@ class Window(BaseWindow): | |||
Rolling sum with a window span of 2 seconds. | |||
|
|||
>>> df_time = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]}, | |||
... index = [pd.Timestamp('20130101 09:00:00'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't resist fixing up a docstring with these improved ergonomics
# expected n blank lines | ||
E3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E3 shows things like "expected 2 blank lines, expected 0" which I think is a bit irrelevant for docstrings - we put the lines one after the other anyway, having empty >>>
lines in docstrings wouldn't look good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, very nice improvement, thanks @MarcoGorelli
Thanks @MarcoGorelli |
improve `validate-docstrings` ergonomics Co-authored-by: MarcoGorelli <>
Arrived late to the party |
Before opening an issue for EX03 errors, I just wanted to improve the usability of
validate_docstrings
Currently it's kind of hard to tell which lines need to change, especially if there's a long docstring.
Now, here's what it shows for
python scripts/validate_docstrings.py pandas.Series.describe
:From trying it out locally, this makes it much easier to tell what needs changing