Skip to content

DOC: Partial fix SA04 errors in docstrings #28792 (feedback needed) #32823

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

Merged
merged 7 commits into from
Mar 31, 2020

Conversation

dilex42
Copy link
Contributor

@dilex42 dilex42 commented Mar 19, 2020

Would like feedback on a few issues before continuing to work on this issue :

  • File pandas/core/accessor.py . How to handle multiline text? Couldn't find anywhere good recomendations.
  • File pandas/core/ops/docstrings.py . Changed logic of templates. Is this okay? Also new lines with formatted text are too long, would like a reccomended sollution for this.
  • File pandas/core/window/rolling.py and some others in regard to window functions have broken links that can be fixed by adding pandas. prefix to them(as in changed code). Is this right thing to do and should I make this changes whenever i see this?

Sorry for obvious mistakes, just starting to contribute. Thanks.

@pep8speaks
Copy link

pep8speaks commented Mar 19, 2020

Hello @dilex42! 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-03-29 07:54:22 UTC

@dilex42 dilex42 changed the title DOC: Partial fix SA04 errors in docstrings #28792 DOC: Partial fix SA04 errors in docstrings #28792 (feedback needed) Mar 20, 2020
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Thanks for the work on this @dilex42

I think with the two suggested changes we can get most of this merged. We can discuss any remaining question you have in the new PR.

@dilex42
Copy link
Contributor Author

dilex42 commented Mar 23, 2020

@datapythonista Thanks for the feedback. Will do the changes.
Before merging this changes there is still a problem with docs to window functions. The references doesn't work without pandas prefix but validation script gives errors if prefix present. I guess there is some inconsistency either in doc generator or validator.
Also a general rule how to deal with multiline text would be appreciated.

@datapythonista
Copy link
Member

Can you open an issue for the prefix on the validation. Leave them the way they render correctly. If the validation is breaking the CI, remove the validation of that specific error in ci/code_checks.sh please.

For the multiline, I think the best is to use whatever makes code more readable. I think in most cases would be a multiline string, but a \n can be better for simple things. But it's more a mix of common sense and personal preference than a rule. Always keeping readability in mind.

@dilex42
Copy link
Contributor Author

dilex42 commented Mar 23, 2020

Thanks

@dilex42 dilex42 marked this pull request as ready for review March 24, 2020 10:51
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Really nice, couple of suggestions, but looks great.

@dilex42
Copy link
Contributor Author

dilex42 commented Mar 29, 2020

Should be good now.

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Looks perfect, thanks @dilex42

@WillAyd WillAyd added this to the 1.1 milestone Mar 31, 2020
@WillAyd WillAyd merged commit e56d395 into pandas-dev:master Mar 31, 2020
@WillAyd
Copy link
Member

WillAyd commented Mar 31, 2020

Thanks @dilex42

@dilex42 dilex42 deleted the sa-errors branch April 2, 2020 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants