-
Notifications
You must be signed in to change notification settings - Fork 22
/
.pre-commit-config.yaml
39 lines (39 loc) · 1.37 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
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
hooks:
- id: ruff
args: [ --fix ]
files: ^(homeassistant|script|tests|custom_components)/.+\.py$
- id: ruff-format
files: ^(homeassistant|script|tests|custom_components)/.+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
args:
- --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude_types: [ csv, json ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-executables-have-shebangs
stages: [ manual ]
- id: check-json
# These hooks require the locally installed venv (for example myPyllant for mypy)
- repo: local
hooks:
- id: mypy
name: mypy
entry: run_venv.sh mypy --pretty --show-error-codes --show-error-context
language: script
pass_filenames: true
files: ^(tests|custom_components)/.+\.py$
- id: pytest
name: pytest
entry: run_venv.sh pytest --no-cov
language: script
pass_filenames: false
files: ^(tests|custom_components)/.+\.(py|json|yaml)$