Add black pre-commit hook

This switched `codegen` from the `autopep8` formatting to the `black`
one, and applies it to `bulk_mad_generator.py` as well. We can enroll
more python scripts to it in the future.
This commit is contained in:
Paolo Tranquilli
2025-06-10 12:25:39 +02:00
parent 7a632e8a47
commit 14d48e9d58
28 changed files with 3479 additions and 1641 deletions

View File

@@ -14,11 +14,11 @@ repos:
hooks:
- id: clang-format
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: autopep8
files: ^misc/codegen/.*\.py
- id: black
files: ^(misc/codegen/.*|misc/scripts/models-as-data/bulk_generate_mad)\.py$
- repo: local
hooks: