-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (81 loc) · 2.63 KB
/
.pre-commit-config.yaml
File metadata and controls
89 lines (81 loc) · 2.63 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-merge-conflict
- id: check-toml
- id: check-json
- id: debug-statements
# - id: check-added-large-files
# args: ['--maxkb=10000']
# - id: name-tests-test
# args: ['--pytest-test-first']
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
name: black
args: ['--config', 'pyproject.toml']
language_version: python3
# args: ['--line-length=88']
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort
args: ['--settings-path', 'pyproject.toml']
# args: ['--profile=black']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
name: ruff
args: ['--config', 'pyproject.toml']
# args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
name: mypy
args: ['--config-file', 'pyproject.toml', '--ignore-missing-imports', '--strict']
# additional_dependencies: [torch, numpy, pydantic, types-requests]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
name: bandit
args: ['--configfile', 'pyproject.toml']
# args: ['-r', 'torchsom/', '--exclude', 'tests', '--skip', 'B101,B311,B601']
# - id: bandit
# name: bandit-tests
# args: ['-r', 'tests/', '--skip', 'B101,B311,B601']
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
name: pydocstyle
args: ['--config', 'pyproject.toml']
# additional_dependencies: [toml]
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
name: interrogate
args: ['--config', 'pyproject.toml']
# args: ['torchsom/', '--verbose', '--ignore-init-method', '--ignore-magic', '--ignore-module', '--fail-under=80']
# - repo: local
# hooks:
# - id: pytest-check
# name: pytest-check
# description: Run pytest with configuration from pyproject.toml
# # stages: [commit]
# types: [python]
# entry: pytest
# language: system
# # args: [] # LONG Leave empty to use pytest configuration from pyproject.toml
# args: ['-x', '-v', 'tests/unit/', '-m', 'gpu', '--tb=short'] # SHORT
# pass_filenames: false
# always_run: true