-
Notifications
You must be signed in to change notification settings - Fork 82
/
.pre-commit-config.yaml
70 lines (70 loc) · 1.83 KB
/
.pre-commit-config.yaml
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
---
default_language_version:
python: python3
repos:
# check some basic stuff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# Check for files that would conflict in case-insensitive filesystems
- id: check-case-conflict
# Check for files that contain merge conflict strings
- id: check-merge-conflict
# Check Python source for debugger imports and
# py37+ `breakpoint()`
- id: debug-statements
# Clean up imports in Python using isort
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: [--filter-files]
# Format the python code with black
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
# Lint the yaml files
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
hooks:
- id: yamllint
# Lint the python code with flake
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
# run the bandit security linter
- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
hooks:
- id: bandit
args: [-c, bandit.yaml]
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: python
types: [python]
additional_dependencies: ['pylint==2.17.7']
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
"--rcfile=pylintrc"
]
# Type check the Python code with MyPy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
hooks:
- id: mypy
- repo: local
hooks:
- id: pyright
name: pyright
entry: pyright
language: node
pass_filenames: false
types: [python]
additional_dependencies: ['pyright@1.1.291']