Closed tommyod closed 4 years ago
If you merge this, please squash merge. The previous PR was not squash-merged, leading to 7 commits, polluting the git history.
Great, thanks. Since I made small changes recently and some conflicts appeared, I'll run black locally and commit and then merge the commits for .travis
Added the black code formatter.
The code should be formatted consistently. This makes it easier for many people to work on the project (read some opinions e.g. here). Black is one of many formatters that are possible to use. I like black because it's simple - after working on the code one simply runs
black -l 79
to auto-format the code, seeblack --help
.While the formatter for this project does not have to be black, there should be some formatter so a code style is enforced.
I ran black on the code, and it produces a large diff. Most of this is just trivial changes to the codebase. If you want to verify that I haven't done anything malicious with the actual code, create a new branch, run black locally and check the diff:
The code above should demonstrate that the only change I've made is running black.