-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: re-wrap docstrings in pandas\compat\numpy\function.py #36979
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
Conversation
Is there a preference towards semantic linefeeds? Not that I object against the changes, but probably it would be beneficial to embrace this approach. |
I think ALT-Q (or whatever your editor uses) is easier and makes semantic linefeeds redundant |
It is easy to re-format, but this creates large diffs, even if one word was changed. |
I thought it was to primarily to make files easier to change.
not so much of an issue imo with the two-tone diff helping to identify the changes. I've looked through a few standard library modules, double checked PEP 257 and the google python style guide. Can you link some Python packages that use semantic linefeeds. |
can't argue with that. if logical thoughts need to be seperated, can insert a blank line and then wrapping tools will respect that. |
Unfortunately, I do not know if there are open source projects using this approach. I think that this technique is not used widely because of the modern tools for wrapping paragraphs. Moreover, it is difficult to enforce its use. Just a food for thought. |
from the article, it could make sense for markup languages where the line break does not affect the rendered output, but for docstrings, the line breaks are releavant, so 'A semantic line break must not alter the final rendered output of the document.' in the specification is violated.
|
Right, agree on the docstrings. I forgot that we consider help output in the shell. |
yes, it's unfortunate that sphinx also supports line breaks as whitespace. I think we have some public docstrings that look fine in code but don't render so well in the online docs. but indeed for the rst files, maybe worthwhile considering. |
No description provided.