django-unicorn
django-unicorn copied to clipboard
Add `pre-commit`
Add configuration for pre-commit.
- Should include
ruffand potentiallymypychecks (if it doesn't slow things down too much) -- look at - Should this only run on commits to
main? - Add setup steps to new CONTRIBUTING.md doc (WIP)
I spotted a failing Dependabot issue for Black that was created back in March, which can be a problem for pre-commit:
Sadly, Dependabot does not support pre-commit (nor will it anytime soon). To keep hooks and Python packages in sync, you must manually track hook updates by running pre-commit autoupdate regularly.
A mismatch between the Black Python package and pre-commit hook versions can lead to wrongly formatted code. Similar issues can occur with other quality tools.
I don't have a practical solution for this situation, but it is something to consider.
Cc. @epw1624 (we discovered this during a Zoom call)