-
Notifications
You must be signed in to change notification settings - Fork 341
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
Updated guidelines for single line docstrings #999
Conversation
The guideline now aligns with PEP 257. There is no obvious reason for deviating.
👍 |
1 similar comment
👍 |
👍 - could we specify whether or not we allow 'buffer' spaces? e.g. My preference is the first option, since it follows how we don't pad function calls/dicts/etc with spaces. |
I agree with @dan-f, my preference is no whitespace. |
I prefer consistency between one- and multi-line comments so 👎 . But - the PEP is stacked against me and I'm flexible. |
Redacted: ignore: premature submission |
I'm with @doctoryes for consistency. I doubt you guys worry about how code Imagine a code block like: def get_users():
"""
Get teh users
""" But then at our fork, we need to explain additional def get_users():
"""
Get teh users
At Stanford, we must also filter out all DirectAccess users to
exclude anonymous access from the reports.
""" If everyone always uses multiline, the diff is clean and less likely to def get_users():
"""
Get teh users
+
+ At Stanford, we must also filter out all DirectAccess users to
+ exclude anonymous access from the reports.
""" So if upstream eventually decides to fix the initial typo and/or add def get_users():
"""
- Get teh users
+ Get the users
At Stanford, we must also filter out all DirectAccess users to
exclude anonymous access from the reports.
""" On the other hand, if we need to edit your single-line docstring, we're def get_users():
<<<<<<< US
Get teh users
At Stanford, we must also filter out all DirectAccess users to
exclude anonymous access from the reports.
"""
=======
"""Get the users"""
>>>>>>> THEM You may consider that trivial, but when we're resolving dozens and Perhaps there's a larger discussion to be had w/r/t "the style of the [1] Everyone is always positive that this one-liner will always just |
Thats a super useful (and well written!) example @stvstnfrd. I think we should prioritize our community's ability to work off of our platform above a PEP. |
@clintonb I second the comment from @stvstnfrd and prefer keeping with the multi-line comment standard as it is best for code reviews and diffs. As an open source platform, I agree that we should weigh the convenience of code reviewers over PEP8 standards. |
Is there any interest in updating the docs to explicitly call out the issue that @stvstnfrd keeps on running into? It seems as though people are ignoring this documentation, and it might be helpful motivation. I can do it if there's sufficient interest. |
@dan-f I think documenting the issue @stvstnfrd explained would be a great idea. If we're going to deviate from PEP 257, it would be good to explain why. |
The guideline now aligns with PEP 257. There is no obvious reason for deviating.