chore(format): add pre-commit and formatter configs

This commit is contained in:
2026-03-24 22:41:40 +01:00
parent c24ab48704
commit 2755dc373a
2 changed files with 30 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
import pathlib
def test_precommit_exists():
path = pathlib.Path(".pre-commit-config.yaml")
assert path.exists(), ".pre-commit-config.yaml must exist"
content = path.read_text(encoding="utf8")
assert "repos:" in content, "pre-commit config must contain 'repos:'"
# ensure at least one formatter/linter is referenced
assert any(x in content for x in ("black", "ruff", "isort")), (
"pre-commit config must reference at least one of: black, ruff, isort"
)