-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
39 lines (31 loc) · 980 Bytes
/
.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
# pre-commit autoupdate
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
# isort - sort import statements
# - repo: https://github.com/pycqa/isort
# rev: 5.13.2
# hooks:
# - id: isort
# files: \.(py)$
# args: [--settings-path=pyproject.toml] # ["--profile", "black" ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
args: [ --fix ] # run linter
- id: ruff-format # run formatter
#### OPTIONAL: for keeping syntax more current
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py311-plus] # NOTE: SET TO HOME ASSISTANT VERSION
- repo: https://github.com/dosisod/refurb
rev: v2.0.0
hooks:
- id: refurb # NOTE: Update pyproject.toml to match HA Python version