forked from NVlabs/alpasim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
54 lines (53 loc) · 1.85 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
54 lines (53 loc) · 1.85 KB
1
2
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
default_language_version:
python: python3
exclude: ^(.gitlab-ci.yml|plugins/internal/cicd/gitlab/|src/grpc|plugins/internal/src/tools/migration_assistant.py) # TODO(alpasim): enable in future
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
name: Insert license header (Python; only for changed files on --all-files)
files: \.py$
entry: python tools/precommit/insert_license_changed_only.py
args:
- --license-filepath=.license-header.txt
- --comment-style=#
- --use-current-year
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# list of supported hooks: https://pre-commit.com/hooks.html
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: check-executables-have-shebangs
- id: check-toml
- id: check-case-conflict
- id: check-added-large-files
args: ["--maxkb=3072"]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
args: ["--max-line-length=120"] # TODO(alpasim): decide if we want to enforce line length
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "f56614d"
hooks:
- id: mypy
exclude: ^(src/wizard/tests)
files: ^src/wizard/.*\.py$
args:
- --config-file=mypy.ini
additional_dependencies: ["types-PyYAML", "hydra-core", "GitPython", "numpy<2.3", "pandas", "pandas-stubs", "polars>=1.0.0", "types-aiofiles"]