Add pre-commit as a runner for black

`pre-commit` provides an easy way for devs to never miss committing
code without running black, and an easy way to to invoke black from
CI. In the future we can use it to run codespell, and new-to-us
tools like flake8

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2025-03-03 10:55:20 -05:00 committed by Pavel Hrdina
parent f4c57a4d3b
commit 8d18bdc1e5

10
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black