-
Notifications
You must be signed in to change notification settings - Fork 7
Black and pylint don't agree on bad-continuation #6
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
Comments
@dherrada FYI, from the Black documentation: |
Thanks, that's good to know |
@dherrada I don't want to default to disabling Pylint even if the change seems inconsequential. Please look into why Pylint and Black prefer the different spacing, so we can begin to discuss which to go with. This seems like an issue you will likely continue to run into. We should make an informed decision. |
@dherrada What is the actual pylint failure? Is it |
@dherrada Please research this for half an hour and then report back at that time with what you've found. If you haven't found anything at that point, we'll work together on it. |
@kattni Yeah, it is bad-continuation. Looking at black's docs right now |
@kattni So from what I've gathered, PEP8 is fine with either style:
In this case, one indent in from the line with the ): is enough to clearly distinguish it, which would mean that pylint is technically in the wrong on this one by saying the formatting black prefers is incorrect. Looks like this is a really common problem when using black and pylint. |
Excellent. Great job finding that! We are under no circumstances going to disable |
@kattni Would you like me to push and make a pr? |
@dherrada We haven't patched the libs with the easy way to update the version of Pylint being used. Will it still pass 1.9.2 with that change? |
@kattni Yep, it will |
@dherrada Perfect. Yes please push and make a PR. |
Updated title to include actual issue. @dherrada Please make sure the titles of these issues are more descriptive moving forward so when we look at the master issue on the Bundle, it will be clearer what we've discussed already. |
@kattni I'll make sure to do that |
FYI I already disabled |
@tannewt I don't agree with disabling it globally. There are plenty of situations where Pylint finds other instances of bad continuation. I realise there is the bug in Pylint where it disagrees with Black, but I question whether we should be handling this locally in that single instance and let Pylint continue to find it in other instances. |
Do you have examples where pylint finds bad continuations that black doesn't? I assume that black handles all of that sort of formatting. |
I don't. If Black handles all of it, then I guess we can disable it. @dherrada Please submit a PR to this repo to add |
@kattni Ok. I've done that |
@kattni I can close this issue, correct? |
@dherrada Correct. |
@tannewt Moving forward, if you intend to update the |
Ok will do @kattni. I have nothing else in the pipeline. |
Pylint prefers this:
Black prefers this:
Personally, I think it'd be easier to just do a pylint disable there because the change seems pretty inconsequential, and I'm not sure how one would do a black disable or if it is even a thing.
Main issue:
adafruit/Adafruit_CircuitPython_Bundle#232
The text was updated successfully, but these errors were encountered: