1- # For pre-commit.ci
2- ci :
3- # Defer autoupdate to quarterly (there is no 'off' button) to have renovate pick up first
4- autoupdate_schedule : quarterly
5- skip : [pylint, markdownlint, testing]
6- submodules : true
7-
81default_language_version :
92 # force all unspecified python hooks to run python3
103 python : python3.13
114
125repos :
136 # Run manually in CI skipping the branch checks
14- # RUFF disabled, code is not up to par with HA standards
15- # - repo: https://github.com/astral-sh/ruff-pre-commit
16- # rev: v0.1.7
17- # hooks:
18- # - id: ruff
19- # args:
20- # - --fix
21-
7+ - repo : https://github.com/astral-sh/ruff-pre-commit
8+ rev : v0.11.13
9+ hooks :
10+ - id : ruff
11+ name : " Ruff check"
12+ args :
13+ - --fix
14+ - id : ruff-format
15+ name : " Ruff format"
2216 - repo : https://github.com/pre-commit/pre-commit-hooks
2317 rev : v5.0.0
2418 hooks :
2519 - id : check-executables-have-shebangs
20+ name : " Checking executables for #!" "
2621 stages: [manual]
2722 - id: no-commit-to-branch
23+ name: " Verifying branch"
2824 args :
2925 - --branch=main
3026 - repo : https://github.com/asottile/pyupgrade
3127 rev : v3.20.0
3228 hooks :
3329 - id : pyupgrade
30+ name : " Checking pyupgrade"
3431 args : [--py39-plus]
35- # Moved codespell configuration to setup.cfg as per 'all-files' issues not reading args
3632 - repo : https://github.com/codespell-project/codespell
3733 rev : v2.4.1
3834 hooks :
3935 - id : codespell
36+ name : " Check Code Spelling"
37+ args :
38+ - --ignore-words-list=aiport,astroid,checkin,currenty,hass,iif,incomfort,lookin,nam,NotIn
39+ # Previous list, remove before merge
40+ # - ignore-words-list = additionals,alle,alot,ba,bre,bund,currenty,datas,dof,dur,ether,farenheit,falsy,fo,haa,hass,hist,iam,iff,iif,incomfort,ines,ist,leeg,lightsensor,mut,nam,nd,pres,pullrequests,referer,resset,rime,ser,serie,sur,te,technik,ue,uint,unsecure,visability,wan,wanna,withing,zar
41+ - --skip="./.*,*.csv,*.json,*.ambr"
42+ - --quiet-level=2
4043 exclude_types : [csv, json]
4144 - repo : https://github.com/PyCQA/bandit
4245 rev : 1.8.5
4346 hooks :
4447 - id : bandit
48+ name : " Bandit checking"
4549 args :
4650 - --quiet
4751 - --format=custom
@@ -51,25 +55,34 @@ repos:
5155 rev : v1.37.1
5256 hooks :
5357 - id : yamllint
58+ name : " YAML linting"
5459 - repo : https://github.com/biomejs/pre-commit
5560 rev : v1.9.4
5661 hooks :
5762 - id : biome-lint
58- additional_dependencies :
["@biomejs/[email protected] "] 5963 name : " Verifying/updating code with biome (improved prettier)"
64+ additional_dependencies :
["@biomejs/[email protected] "] 6065 - repo : https://github.com/cdce8p/python-typing-update
6166 rev : v0.7.2
6267 hooks :
6368 # Run `python-typing-update` hook manually from time to time
6469 # to update python typing syntax.
6570 # Will require manual work, before submitting changes!
6671 - id : python-typing-update
72+ name : " Python typing"
6773 stages : [manual]
6874 args :
6975 - --py39-plus
7076 - --force
7177 - --keep-updates
7278 files : ^(plugwise_usb|tests)/.+\.py$
79+ - repo : https://github.com/shellcheck-py/shellcheck-py
80+ rev : v0.10.0.1
81+ hooks :
82+ - id : shellcheck
83+ name : " Shell checking"
84+ args :
85+ - --external-sources
7386 - repo : local
7487 hooks :
7588 # Run mypy through our wrapper script in order to get the possible
@@ -105,3 +118,4 @@ repos:
105118 rev : v0.45.0
106119 hooks :
107120 - id : markdownlint
121+ name : " Markdown linting"
0 commit comments