Black only runs in python 3.6 and up. We can use it to format and check 2.7
and 3.5, but it will not run in our existing openjdk based docker image
without significant modifications.
That and the fact that we are primarily interested in checking, not
changing, are why I think pycodestyle is the
+1 to what Fokko said, Black looks like the right tool. I did a quick
check and the python 3 codebase looks healthy for Black however there
will be some work to do in the python 2 one.
On Wed, May 29, 2019 at 9:04 AM Driesprong, Fokko wrote:
>
> Why change to pycodestyle? We can still use black
Why change to pycodestyle? We can still use black for this, right? The
command:
black --check --diff .
will throw a non-zero exit code when there is something to format.
Cheers, Fokko
Op wo 29 mei 2019 om 04:04 schreef Michael A. Smith :
> If all we want is the diff/exit code, then we should
If all we want is the diff/exit code, then we should use pycodestyle
instead of black. I'll change course to work on that.
On Tue, May 28, 2019 at 5:24 AM Driesprong, Fokko
wrote:
> Fully agree with you Ismaël.
>
>
> The issue is that it CAN write directly. For example here:
>
Fully agree with you Ismaël.
The issue is that it CAN write directly. For example here:
https://github.com/Fokko/avro/pull/35 If you ask dependabot to merge it, it
will be merged into master. And therefore it will ask for write access to
the repository. Recently dependabot has been acquired
+1 for Black, great idea and in line we the changes we did with
spotless for the Java code base.
About dependabot I think this is an interesting case to discuss in
upstream apache lists. So far ASF allows bots that do not touch the
code, for example for metadata, as we do with the autolabeler
Thanks, Michael for working on this. I think having an auto formatter for
Python is valuable since it will decrease the conflicts in the future. For
now, we need to do a big PR to get all the files in the correct format.
We need to add to the CI: black --check --diff . This will throw a non-zero
I am working on making all the py and py3 code consistent with
https://github.com/python/black, but once done it’d be great if we could
keep it consistent. I will look into adding hooks and stuff for
yetus/TravisCI, but is there a way to have an automation that can
periodically do all the