-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
STY: avoid backslash #23073
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
STY: avoid backslash #23073
Conversation
Hello @jbrockmendel! Thanks for updating the PR.
Comment last updated on October 10, 2018 at 14:25 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #23073 +/- ##
==========================================
+ Coverage 92.19% 92.2% +<.01%
==========================================
Files 169 169
Lines 50911 50916 +5
==========================================
+ Hits 46939 46945 +6
+ Misses 3972 3971 -1
Continue to review full report at Codecov.
|
Nice change, but I think we expect |
OK, I was wondering why pep8speaks was complaining about those. I'm used to seeing the warnings in the other direction. Will update. |
Just check the linting settings, you may want to look in more detail before changing. |
this looks fine. Do we have a lint rule to flag the line-continuation? alt do it in lint.sh (this can be a followup). @datapythonista you ok here? merge away. |
I was checking again, and looks like indded our standard is to have the operator after the line break and not before. For example: https://github.com/pandas-dev/pandas/blob/master/pandas/core/series.py#L243 So, I think it makes sense to make the changes to this PR, unless we want to change the convention at this point, and change the others. I personally don't have a preference, and I don't know what's supposed to be the way to avoid both Those are the cases where we're ignoring
|
@datapythonista hmm, that is not convention. though its possible we have both flavors of this as not checking before. |
I didn't think this was our convention as much as what's suggested (though not enforced) by PEP8 https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator |
I don't think we're at all consistent about it. My preference would certainly be to leave the before/after issue to a separate Issue/PR. But I'm happy to defer to @datapythonista if you think there's a Right Way To Do It. |
Sorry, I just saw that I think it would be a good practice to follow the PEP8 recommendation (@WillAyd link) at some point, but that's surely for a different PR (and we'll have to wait for a newer version of Happy to merge this, but I think it makes sense to wait for #23101, or |
Thanks @jbrockmendel, #23101 is merged, so the linting should complain about the binary operations now. |
Related: #11954.
This gets most of the non-
textwrap.dedent
cases.