MAINT: Enable linting with ruff E501#31117
MAINT: Enable linting with ruff E501#31117nakul-krishnakumar wants to merge 4 commits intonumpy:mainfrom
Conversation
Co-authored-by: Nakul Krishnakumar <nakulkrishnakumar86@gmail.com>
| for NumPy bug-fix releases. All other API is tied to the experimental | ||
| API versioning. | ||
|
|
||
| except all references and examples related to the `optimize` argument (v 0.12.0) |
There was a problem hiding this comment.
I actually do not know why it shows that but I did not change it.
My PR branch: https://github.com/nakul-krishnakumar/numpy/blob/c5c2ee9fb4dee869b363bf802d86d29bb89bfe69/numpy/_core/_add_newdocs.py#L5983
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
|
Needs rebase. |
| *This documentation shadows that of the native python implementation of the `einsum` | ||
| function, | ||
| except all references and examples related to the `optimize` argument (v 0.12.0) | ||
| have been removed.* |
There was a problem hiding this comment.
Be best to reformat this to get rid of the very short lines.
There was a problem hiding this comment.
Okay I will reformat it. My previous approach was to fit all the words possible in an 88 char length line and then use a newline.
There was a problem hiding this comment.
It is the mix of line lengths within a paragraph that is bothersome. The last line can short, of course. Your editor should be able to do that.
| for NumPy bug-fix releases. All other API is tied to the experimental | ||
| API versioning. | ||
|
|
||
| The reason for the split call is that cast information is required to |
There was a problem hiding this comment.
If you are going to do this, best to reformat all the lines to more or less equalize the line length.
There was a problem hiding this comment.
Even the lines that are currently under 88 characters? Wouldn’t that make this file styled differently from other similar .py files that still contain lines under 88 characters?
There was a problem hiding this comment.
The exact length does not matter that much, it is just easier to read if it isn't chopped up. I tend to keep things a bit shorter than maximum. Readability is the main consideration.
|
@charris Any updates on the above queries? |
PR summary
#28947
This PR fixes the E501 (line too long) style errors in the following files:
numpy/_core/_add_newdocs.py
numpy/_core/_add_newdocs_scalars.py
Only formatting improvements were done to meet the style guidelines.
I have used
# noqa: E501for specific doctest linesAI Disclosure