forked from banter240/tado_hijack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
executable file
·74 lines (67 loc) · 2.31 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
executable file
·74 lines (67 loc) · 2.31 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
repos:
# Standard hooks for file integrity and basic checks.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-json
- id: pretty-format-json
args: [--autofix, --no-sort-keys, --indent=2, --no-ensure-ascii]
- id: end-of-file-fixer
- id: trailing-whitespace
# yamllint for YAML file validation.
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
# Ruff hook for fast linting and formatting.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# mypy hook for static type checking.
# Uses Python 3.14 (tadoasync requires >=3.12) with tadoasync==0.2.2 pinned,
# as the patching layer requires exactly this version.
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
language: python
language_version: python3.14
types: [python]
args: [--ignore-missing-imports, --explicit-package-bases]
additional_dependencies:
- "mypy==2.1.0"
- "tadoasync==0.2.2"
# Sourcery hook for AI-powered refactoring.
- repo: https://github.com/sourcery-ai/sourcery
rev: "v1.43.0"
hooks:
- id: sourcery
# Automatically apply fixes suggested by Sourcery
args: ["--fix"]
# Gitleaks hook for detecting secrets and sensitive information.
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1 # Use the latest stable version
hooks:
- id: gitleaks
# Local hooks for Home Assistant & HACS validation (Parity with GitHub Actions)
- repo: local
hooks:
- id: hassfest
name: local hassfest validation
entry: "../.venv/bin/python3 -m homeassistant.helpers.check_config --config ."
language: system
pass_filenames: false
always_run: true
description: "Run Home Assistant's internal config validation (Parity with CI Hassfest)."
- id: hacs-validation
name: local HACS validation
entry: "./scripts/local_hacs_validate.py"
language: system
pass_filenames: false
always_run: true
description: "Run basic HACS compliance checks (Parity with CI HACS Validation)."