-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC:GH34026 #34059
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
DOC:GH34026 #34059
Conversation
Hello @moaraccounts! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-05-15 18:27:11 UTC |
EDIT: headdesk. I was on the wrong branch. Never mind. Should be good to go. I'm not sure what I'm doing wrong. I'm following this guide When I run |
Thanks @moaraccounts CI failures are unrelated Did you try building the documentation locally? https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#contributing-to-the-documentation |
@MarcoGorelli Yes indeed. I can build the documentation locally and see my changes. Attached are the screenshots of rstrip and lstrip. Do those help? |
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.
Cool, thanks for attaching the screenshots, looks good
@moaraccounts mind if I ask why you closed this? |
Ooh, I thought since the changes were approved I could close it! My bad! I will reopen. |
It's OK :) A core dev will review this eventually (please be patient though, there's a long queue) and merge it |
Awesome! Ok, no worries on the waiting. Thank you! |
My bad, CI failures are related, you need to get python scripts/validate_docstrings.py pandas.Series.str.lstrip and python scripts/validate_docstrings.py pandas.Series.str.rstrip to pass EDITpython scripts/validate_docstrings.py pandas.Series.str.strip too |
@@ -2977,8 +2977,6 @@ def encode(self, encoding, errors="strict"): | |||
_shared_docs[ | |||
"str_strip" | |||
] = r""" | |||
Remove leading and trailing characters. |
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.
It might be simpler to add a substitution here, something like
Remove leading and trailing characters. | |
Remove %(position)s characters. |
and then, at the top of the def of lstrip
, inside dict
, add position="leading"
(and similarly "trailing" for rstrip
)
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.
Gotcha, I see. Ok, I'll fix those then commit again. ty!
…n item to each dict. (pandas-dev34026)
pandas/core/strings.py
Outdated
@@ -3040,20 +3040,27 @@ def encode(self, encoding, errors="strict"): | |||
""" | |||
|
|||
@Appender( | |||
_shared_docs["str_strip"] % dict(side="left and right sides", method="strip") | |||
_shared_docs["str_strip"] | |||
% dict(side="left and right sides", method="strip", position=None) |
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.
Doesn't strip
remove both leading and trailing characters? Should this be
% dict(side="left and right sides", method="strip", position="leading and trailing")
?
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.
Oh hell. Yes, it should have both leading and trailing. Fixing now and will push. Thank you.
…cumentation locally to confirm changes (pandas-dev34026)
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.
Thanks @moaraccounts - I built the docs locally and they look as expected
Thanks @moaraccounts! Nice contribution |
* DOC:GH34026 * DOC:Fixing desc. for Series.str.rstrip() and Series.str.lstrip() (pandas-dev#34026) * DOC:Removed text strings from lstrip and rstrip. Added a new %position item to each dict. (pandas-dev34026) * DOC:Fixed strip so %position now reads leading and trailing. Built documentation locally to confirm changes (pandas-dev34026) Co-authored-by: Lesley <[email protected]>
Thank you! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff