-
Notifications
You must be signed in to change notification settings - Fork 36
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
update line length in Contributor guide #347
Comments
Is the intent here not to try to enforce 79 but be lenient if it goes to 88? i.e. "do your best but you won't lose marks if you go above the character limit a bit" |
Our flake8 file says 88; maybe we discussed at some point that 79 was a bit to restrictive? In MDAnalysis/mdanalysis#4292 (comment) it was noted that black formatted the new file with 88 chars. At the end of the day, this is not a hill I am going to die on: I just want everything to be consistent. |
The change to 88 came with the introduction of the darker linter, see blame https://github.com/MDAnalysis/mdanalysis/blame/f4005db383f3f4c446433fb32156236f29f251ba/.flake8#L2 in MDAnalysis/mdanalysis#3954. (EDIT: added PR) |
:/ if I remember the conversation properly the intent was to get folks to stick to 79 but to use 88 on CI to reduce burden on reviewers. I personally think it's easier to just "encourage 79 but if you have a reason not to adhere then it's good" (i.e. for comprehension etc..) at the end of the day we really only enforce it when it's really necessary. |
I should add, we now also have the revived pep8speaks, so our behaviour of darker linting vs pep8speaks isn't consistent. |
I started suggesting to run I assume (but haven't tested myself) that the User Guide recommendation for using darker will also break on 88 chars. |
Should we then change I reverted to 79 chars for right now in 9af161c. |
Honestly I'm of the opinion of just killing darker lint 😅 - half the coredevs didn't like it because it was too restrictive and the other half wanted to just use |
Personally, for local linting, I just use the default flake8 settings and it just does its thing. |
That's all fair ;-). If pep8speaks works again then we could switch off darker. Feel free to just put a blocking review on my PR. |
* updated line length in code contrib section - fix #347 - add note on black * trimmed trailing whitespace * revert back to 79 chars as default * encouraged use of darker instead of black * Update doc/source/contributing_code.rst Co-authored-by: Lily Wang <[email protected]> --------- Co-authored-by: Lily Wang <[email protected]>
The Contributor Guide in https://userguide.mdanalysis.org/stable/contributing_code.html#code-formatting-in-python states 79 char line limit but we actually use 88 chars (see
.flake8
https://github.com/MDAnalysis/mdanalysis/blob/f4005db383f3f4c446433fb32156236f29f251ba/.flake8#L2 )The contributor guide should be updated to say 88 chars per line.
The text was updated successfully, but these errors were encountered: