-
Notifications
You must be signed in to change notification settings - Fork 259
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
Please add automatic black formatting to workflow #894
Comments
Agreed, nice suggestion! |
Automating tedious stuff as much as possible is certainly desirable. The optimal place to automatically format the code seems to be as a local check-in hook. This makes sure that what you see in your editor is the same thing as placed in the repository. Given the largish number of dependencies you need for local testing anyway, I'm not sure if "I don't want black on my machine" is a good argument against that solution. A bad place in the middle is the current one, where in a PR (even a draft) no functional tests are performed on github when the formatting isn't up to snuff. This is rather inconvenient while still working on a PR and the functional feedback on the different platforms would be helpful, but manually reformatting before each commit is time consuming and annoying. And at the other end of the spectrum we could have black applied only at the very end when the PR is actually merged. This would make the formatting irrelevant during development, but the official repository still only contains well formatted code. Unfortunately, this still leaves pylint in play, which is even more annoying because it takes so long to run. To solve possibly both annoyances in one go, I have a different suggestion: |
Actually, I have an unfinished PR open on th Pylint repository, If the code in a PR would require fixups by I'm very familiar with Maybe we could try experimenting with this solution? |
For me it would be ideal if:
|
Black is nice, but it would be even better if it was automatically applied in PRs. Or via a black-bot. Now to be able to make a PR someone needs to have Black installed.
The text was updated successfully, but these errors were encountered: