chore: strictly enforce local validation rules via pre-commit
Browse files- .pre-commit-config.yaml +20 -11
.pre-commit-config.yaml
CHANGED
|
@@ -1,13 +1,22 @@
|
|
| 1 |
repos:
|
| 2 |
-
- repo:
|
| 3 |
-
# Ruff version.
|
| 4 |
-
rev: v0.15.13
|
| 5 |
-
hooks:
|
| 6 |
-
# Run the linter.
|
| 7 |
-
- id: ruff-check
|
| 8 |
-
# Run the formatter.
|
| 9 |
-
- id: ruff-format
|
| 10 |
-
- repo: https://github.com/pre-commit/mirrors-mypy
|
| 11 |
-
rev: '' # Use the sha / tag you want to point at
|
| 12 |
hooks:
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
repos:
|
| 2 |
+
- repo: local
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
hooks:
|
| 4 |
+
- id: ruff-check
|
| 5 |
+
name: Ruff Linter
|
| 6 |
+
entry: ruff check .
|
| 7 |
+
language: system
|
| 8 |
+
types: [python]
|
| 9 |
+
pass_filenames: false
|
| 10 |
+
|
| 11 |
+
- id: mypy-strict
|
| 12 |
+
name: MyPy Strict Type Check
|
| 13 |
+
entry: mypy src tests --ignore-missing-imports
|
| 14 |
+
language: system
|
| 15 |
+
types: [python]
|
| 16 |
+
pass_filenames: false
|
| 17 |
+
|
| 18 |
+
- id: gradio-smoke-test
|
| 19 |
+
name: Gradio Fail-Fast Validation
|
| 20 |
+
entry: .venv/bin/python3 -c "import app"
|
| 21 |
+
language: system
|
| 22 |
+
pass_filenames: false
|