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 exit code if there is something to format. So that the author of the PR needs to apply black to let the CI pass. We should make this part of the build.sh of the python3 project. I don't think that such a CI service exists, and I also think it is a bad idea. The author should format his code on forehand. I've also looked in setting up Dependabot for Avro, but this is against the Apache rules because the Dependabot integration requires write permissions on the repository which isn't allowed. Hope this helps. Cheers, Fokko Op di 28 mei 2019 om 03:39 schreef Michael A. Smith <[email protected]>: > 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 formatting for us, and open pull requests with any > changes required? > > I mean like dependabot, but instead of opening a pr to update dependencies, > it opens a pr that does isort, black, docformatter, or whatever we want. > > This way, we get consistent style without it being an “enforcement > priority” in prs by humans. If someone has a valuable contribution, we > don’t have to do a back-and-forth with them about style and formatting. > > If there’s interest I could look into implementing something with existing > CI tools, or using github actions. > > What do y’all think? >
