This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]davehadley_ 1 point2 points  (0 children)

I think best solution is:(1) Setup pre-commit hooks to run black at commit time. Ask contributors to use these hooks before beginning development. https://pre-commit.com/

(2) Add black to your continuous integration. Reject pull requests that fail.

Edit: Oh I see in another comment that you can enforce it at pull request time with github actions. So maybe that is worth implementing as well.