cookiecutter-adafruit-circuitpython
cookiecutter-adafruit-circuitpython copied to clipboard
Double check black config against MicroPython
They run it with --line-length 99: https://github.com/micropython/micropython/pull/5700/files#diff-022e22ed1ca3d4ac963996318c4cd5e1R174
@dherrada take a gander when you have a few minutes
@tannewt, @siddacious and I were just discussing this and I think that there is a very valid reason to add this. Because pylint sets the line length limit at 100, it would make sense for black to do the same. Sorry for such a late response. I'm rather bad at keeping track of my github notifications
@dherrada Can we automate it? I wouldn't do it by hand. I don't think its that worth it.
@tannewt Yeah, I believe @sommersoft has got a pretty good workflow for patching the build.yml.
Wouldn't this change requiring patching all Python files? Shouldn't we re-wrap everything if we change the line length?
@tannewt I was thinking that we shouldn't re-wrap lines already wrapped at 88 characters, since that would be hard to do any other way than by hand, but that it would make sense for it to wrap at 99 in the future
Will the black check complain if we change the config without changing the files?
I don't think so, but I can definitely test this in a few libraries.
@dherrada where is this at?
@siddacious thanks for reminding me. I'll take a look today
@tannewt Yep, black will complain if we do that. However, I think since all the black disables that need to be added have already been added, and every PR merged in the last few months has been formatted by black, we should actually be pretty safe to run the updated black directive in an automated fashion
@tannewt Oh, just realized I should also mention that black will change things it turned into multiline things to single line things if it is now allowed. Essentially, anything in-between 88 and 99 characters that was turned into a multi-line thing will now be in a single line.
@dherrada Sounds like a plan. Happy to see it updated even if a few things change.
@sommersoft Would there be any way to actually run black (not black --check) on all the libraries and then have it change the directive using adabot?