| 1 |
repos: |
| 2 |
- repo: https://github.com/psf/black |
| 3 |
rev: 24.10.0 |
| 4 |
hooks: |
| 5 |
- id: black |
| 6 |
- repo: https://github.com/astral-sh/ruff-pre-commit |
| 7 |
rev: v0.7.0 |
| 8 |
hooks: |
| 9 |
- id: ruff |
| 10 |
types_or: ["python"] |
| 11 |
args: ["--fix"] |
| 12 |
- id: ruff-format |
| 13 |
files: ^.+\.py$ |
| 14 |
- repo: https://github.com/codespell-project/codespell |
| 15 |
rev: v2.3.0 |
| 16 |
hooks: |
| 17 |
- id: codespell |
| 18 |
args: |
| 19 |
- --quiet-level=2 |
| 20 |
# assertIn is the unittest method, not a typo of "assertion" |
| 21 |
- --ignore-words-list=assertIn |
| 22 |
exclude_types: [csv, json] |
| 23 |
- repo: https://github.com/pre-commit/pre-commit-hooks |
| 24 |
rev: v5.0.0 |
| 25 |
hooks: |
| 26 |
- id: check-executables-have-shebangs |
| 27 |
stages: [manual] |
| 28 |
- repo: https://github.com/cdce8p/python-typing-update |
| 29 |
rev: v0.7.0 |
| 30 |
hooks: |
| 31 |
# Run `python-typing-update` hook manually from time to time |
| 32 |
# to update python typing syntax. |
| 33 |
# Will require manual work, before submitting changes! |
| 34 |
# pre-commit run --hook-stage manual python-typing-update --all-files |
| 35 |
- id: python-typing-update |
| 36 |
stages: [manual] |
| 37 |
args: |
| 38 |
- --py312-plus |
| 39 |
- --force |
| 40 |
- --keep-updates |
| 41 |
files: ^.+\.py$ |
| 42 |
- repo: https://github.com/pre-commit/mirrors-prettier |
| 43 |
rev: v3.0.3 |
| 44 |
hooks: |
| 45 |
- id: prettier |
| 46 |
exclude: ^SUPPORTED_DEVICES\.md$ |
| 47 |
- repo: "https://github.com/pre-commit/mirrors-mypy" |
| 48 |
rev: "v1.12.0" |
| 49 |
hooks: |
| 50 |
- id: mypy |
| 51 |
- repo: local |
| 52 |
hooks: |
| 53 |
- id: generate-supported-devices |
| 54 |
name: Generate SUPPORTED_DEVICES.md |
| 55 |
entry: python scripts/generate_supported_devices.py |
| 56 |
language: python |
| 57 |
files: ^(src/govee_local_api/light_capabilities\.py|scripts/generate_supported_devices\.py|SUPPORTED_DEVICES\.md)$ |
| 58 |
pass_filenames: false |