-
Notifications
You must be signed in to change notification settings - Fork 857
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
76 lines (76 loc) · 1.97 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
76 lines (76 loc) · 1.97 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
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.28.0
hooks:
- id: gitleaks
name: "🔒 gitleaks · Detect hardcoded secrets"
- repo: https://github.com/psf/black
rev: 26.3.1
hooks:
- id: black
name: "🐍 black · Format code"
args: [
"--config",
"./pyproject.toml",
]
exclude: ^doc/
- repo: https://github.com/PyCQA/isort
rev: 7.0.0
hooks:
- id: isort
name: "🐍 isort · Sort imports"
args:
[
"--settings-path",
"./pyproject.toml",
]
files: ^(pennylane/|tests/)
- repo: https://github.com/gauge-sh/tach-pre-commit
rev: v0.29.0
hooks:
- id: tach
name: "🐍 tach · Check module dependencies"
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: pyupgrade
name: "🐍 pyupgrade · Check language features"
args: [--py312-plus]
- repo: local
hooks:
- id: pylint
name: "🐍 pylint · Lint codebase"
entry: pylint
language: system
types: [python]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
"--rcfile=.pylintrc", # Link to your config file
]
files: ^pennylane/
- id: pylint-test
name: "🐍 pylint · Lint test suite"
entry: pylint
language: system
types: [python]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
"--rcfile=tests/.pylintrc", # Link to your config file
]
files: ^tests/
- id: labs-pylint-test
name: "🐍 pylint · Lint labs test suite"
entry: pylint
language: system
types: [python]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
"--rcfile=tests/.pylintrc", # Link to your config file
]
files: ^pennylane/labs/tests/