Install pre-commit and fix configuration and builds #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This small PR installs
pre-commit
and documents its usage. This module is optional for developers, but it can save a lot of time when doing modifications to the repository. Now that issue #126 has been fixed, all the tests inbin/run_tests.sh
are ran and checked properly by GitHub, and things are more likely to go bad! The script checks for proper code formatting and a number of stylistic errors (e.g., too long lines, unused variables).The usage of
pre-commit
enables developers to discover these problems before runninggit push
, asblack
andflake8
are ran automatically whenever the user callsgit commit
.There is no need for developers to use this facility, so if you're happy with your workflow, this PR does not affect it.