-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.pre-commit-config.yaml
138 lines (127 loc) · 3.86 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
exclude: .mypy_cache
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
files: ^(custom_components|tests)/.+\.json$
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-yaml
exclude: mkdocs\.yml$|config/configuration.yaml
- id: debug-statements
- id: destroyed-symlinks
- id: end-of-file-fixer
exclude: .mypy_cache|node_modules
- id: fix-byte-order-marker
- id: forbid-submodules
- id: mixed-line-ending
- id: pretty-format-json
args: [--autofix, --no-sort-keys, --no-ensure-ascii]
exclude: node_modules|.mypy_cache
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--top-keys=domain,name"]
files: manifest.json
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--top-keys=name"]
files: hacs.json
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii", "--no-sort-keys"]
files: (/strings\.json$|translations/.+\.json$)
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
args:
- --branch=devel
- --branch=master
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.9.9
hooks:
- id: ruff
args:
- --fix
exclude: ^tests/
- id: ruff-format
files: ^((custom_components/openmotics)/.+)?[^/]+\.py$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.2
hooks:
- id: check-github-workflows
- id: check-github-actions
- id: check-readthedocs
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args:
- --ignore-words-list=hass
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude_types: [csv, json]
exclude: ^tests/
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=bandit.yaml
files: ^(script|tests)/.+\.py$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
exclude: .github
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: node_modules
- repo: https://github.com/cdce8p/python-typing-update
rev: v0.7.0
hooks:
# Run `python-typing-update` hook manually from time to time
# to update python typing syntax.
# Will require manual work, before submitting changes!
# pre-commit run --hook-stage manual python-typing-update --all-files
- id: python-typing-update
stages: [manual]
args:
- --py313-plus
- --force
- --keep-updates
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.2
hooks:
- id: toml-sort
args: []
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
exclude: ^docs/|^tests
additional_dependencies:
- homeassistant>=2024.12.5
# - pyhaopenmotics>=0.0.7
- repo: https://github.com/PyCQA/pylint.git
rev: v3.3.4
hooks:
- id: pylint
args: ["--exit-zero"]
files: ^(custom_components/openmotics)/.+\.py$
# - repo: https://github.com/RobertCraigie/pyright-python
# rev: v1.1.392
# hooks:
# - id: pyright