kafarasi commited on
Commit
6c24ff9
·
verified ·
1 Parent(s): fde4797

Update .pre-commit-config.yaml

Browse files
Files changed (1) hide show
  1. .pre-commit-config.yaml +70 -35
.pre-commit-config.yaml CHANGED
@@ -1,37 +1,72 @@
1
  exclude: patch
2
  repos:
3
- - repo: https://github.com/pre-commit/pre-commit-hooks
4
- rev: v4.2.0
5
- hooks:
6
- - id: check-executables-have-shebangs
7
- - id: check-json
8
- - id: check-merge-conflict
9
- - id: check-shebang-scripts-are-executable
10
- - id: check-toml
11
- - id: check-yaml
12
- - id: double-quote-string-fixer
13
- - id: end-of-file-fixer
14
- - id: mixed-line-ending
15
- args: ['--fix=lf']
16
- - id: requirements-txt-fixer
17
- - id: trailing-whitespace
18
- - repo: https://github.com/myint/docformatter
19
- rev: v1.4
20
- hooks:
21
- - id: docformatter
22
- args: ['--in-place']
23
- - repo: https://github.com/pycqa/isort
24
- rev: 5.12.0
25
- hooks:
26
- - id: isort
27
- - repo: https://github.com/pre-commit/mirrors-mypy
28
- rev: v0.991
29
- hooks:
30
- - id: mypy
31
- args: ['--ignore-missing-imports']
32
- additional_dependencies: ['types-python-slugify']
33
- - repo: https://github.com/google/yapf
34
- rev: v0.32.0
35
- hooks:
36
- - id: yapf
37
- args: ['--parallel', '--in-place']
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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