Skip to content
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

docs: add style guide instructions for writing Python docstrings #19365

Conversation

AlexTereshenkov
Copy link
Member

@AlexTereshenkov AlexTereshenkov commented Jun 22, 2023

Add some practical advice on how to edit the docstrings for the reference docs so that we could refer to this page when needed.

@AlexTereshenkov
Copy link
Member Author

Is there anything that you think would be worth adding?

@AlexTereshenkov AlexTereshenkov force-pushed the docs/extend-style-guide-reference-docs branch from 74ebd4f to ee3bc17 Compare June 22, 2023 15:06
@AlexTereshenkov AlexTereshenkov force-pushed the docs/extend-style-guide-reference-docs branch from ee3bc17 to a2795f8 Compare June 23, 2023 16:37
Copy link
Member

@thejcannon thejcannon left a comment

Choose a reason for hiding this comment

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

I love that you're writing this. It'll be really nice to add to our dev docs. One big nit though.

You keep using "docstrings", but I think you mean "help strings". Docstrings are strings in specific places, that eventually become some objects __doc__. These are just strings provided to functions.

Can you replace "docstrings" with "help strings"? Then, it's good to go from me. (And thanks again)

@AlexTereshenkov AlexTereshenkov force-pushed the docs/extend-style-guide-reference-docs branch from a2795f8 to 91c4e5a Compare June 24, 2023 12:09
@AlexTereshenkov
Copy link
Member Author

I love that you're writing this. It'll be really nice to add to our dev docs. One big nit though.

You keep using "docstrings", but I think you mean "help strings". Docstrings are strings in specific places, that eventually become some objects __doc__. These are just strings provided to functions.

Can you replace "docstrings" with "help strings"? Then, it's good to go from me. (And thanks again)

Oh yes, indeed, this is a much better wording, 100% agreed. Fixed!

@AlexTereshenkov AlexTereshenkov dismissed thejcannon’s stale review June 24, 2023 12:10

Replaced "docstrings" with "help strings"

Copy link
Member

@thejcannon thejcannon left a comment

Choose a reason for hiding this comment

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

Lgtm

@AlexTereshenkov AlexTereshenkov merged commit 5fd416b into pantsbuild:main Jun 24, 2023
24 checks passed
@AlexTereshenkov AlexTereshenkov deleted the docs/extend-style-guide-reference-docs branch June 24, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants