Spaces:
Runtime error
Runtime error
Update .pre-commit-config.yaml
Browse files- .pre-commit-config.yaml +70 -35
.pre-commit-config.yaml
CHANGED
|
@@ -1,37 +1,72 @@
|
|
| 1 |
exclude: patch
|
| 2 |
repos:
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
exclude: patch
|
| 2 |
repos:
|
| 3 |
+
# Base code quality hooks (unchanged from your config)
|
| 4 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
| 5 |
+
rev: v4.2.0
|
| 6 |
+
hooks:
|
| 7 |
+
- id: check-executables-have-shebangs
|
| 8 |
+
- id: check-json
|
| 9 |
+
- id: check-merge-conflict
|
| 10 |
+
- id: check-shebang-scripts-are-executable
|
| 11 |
+
- id: check-toml
|
| 12 |
+
- id: check-yaml
|
| 13 |
+
- id: double-quote-string-fixer
|
| 14 |
+
- id: end-of-file-fixer
|
| 15 |
+
- id: mixed-line-ending
|
| 16 |
+
args: ['--fix=lf']
|
| 17 |
+
- id: requirements-txt-fixer
|
| 18 |
+
- id: trailing-whitespace
|
| 19 |
+
|
| 20 |
+
# Documentation formatting
|
| 21 |
+
- repo: https://github.com/myint/docformatter
|
| 22 |
+
rev: v1.4
|
| 23 |
+
hooks:
|
| 24 |
+
- id: docformatter
|
| 25 |
+
args: ['--in-place']
|
| 26 |
+
|
| 27 |
+
# Import sorting
|
| 28 |
+
- repo: https://github.com/pycqa/isort
|
| 29 |
+
rev: 5.12.0
|
| 30 |
+
hooks:
|
| 31 |
+
- id: isort
|
| 32 |
+
args: ['--profile', 'black']
|
| 33 |
+
|
| 34 |
+
# Type checking
|
| 35 |
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
| 36 |
+
rev: v0.991
|
| 37 |
+
hooks:
|
| 38 |
+
- id: mypy
|
| 39 |
+
args: ['--ignore-missing-imports']
|
| 40 |
+
additional_dependencies:
|
| 41 |
+
- types-python-slugify
|
| 42 |
+
- types-PyYAML
|
| 43 |
+
- types-requests
|
| 44 |
+
|
| 45 |
+
# Formatting
|
| 46 |
+
- repo: https://github.com/google/yapf
|
| 47 |
+
rev: v0.32.0
|
| 48 |
+
hooks:
|
| 49 |
+
- id: yapf
|
| 50 |
+
args: ['--style', '{based_on_style: google, indent_width: 2}']
|
| 51 |
+
|
| 52 |
+
# AI/ML specific additions
|
| 53 |
+
- repo: https://github.com/PyCQA/bandit
|
| 54 |
+
rev: 1.7.4
|
| 55 |
+
hooks:
|
| 56 |
+
- id: bandit
|
| 57 |
+
args: ['-x', 'tests', '-ll']
|
| 58 |
+
exclude: 'migrations|test_.*|tests/'
|
| 59 |
+
|
| 60 |
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
| 61 |
+
rev: v0.0.275
|
| 62 |
+
hooks:
|
| 63 |
+
- id: ruff
|
| 64 |
+
args: ['--fix']
|
| 65 |
+
|
| 66 |
+
# Notebook checking
|
| 67 |
+
- repo: https://github.com/nbQA-dev/nbQA
|
| 68 |
+
rev: 1.7.0
|
| 69 |
+
hooks:
|
| 70 |
+
- id: nbqa-ruff
|
| 71 |
+
additional_dependencies: ['ruff==0.0.275']
|
| 72 |
+
- id: nbqa-mypy
|