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 PR introduces a pre-commit configuration file.
To use pre-commit, install the tool, perhaps using pipx or perhaps adding it to a virtual environment you use for the repository.
Then, run this command to install the tool as a git pre-commit hook:
Then, whenever you modify a file (or files) in the repository, pre-commit will run the configured hooks against the modified files. If the files are modified by the hooks, the git commit will fail and you'll have an opportunity to review and stage the changes made by the hooks.
To format the files in this repo, you can run this command (but be aware that pyupgrade will need to be run three times because there is a specific line in
ClassLoader.py
that pyupgrade incrementally updates).I strongly recommend enabling pre-commit.ci, which -- like coveralls -- will automatically run an additional action against incoming PRs. The difference is that pre-commit.ci will automatically push an additional commit to the PR if one of the modified files doesn't conform to the code format rules.