-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
115 lines (111 loc) · 3.44 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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py39-plus]
# - repo: https://github.com/psf/black
# rev: 23.12.1
# hooks:
# - id: black
# args:
# - --quiet
# files: ^((homeassistant|pylint|script|tests)/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args:
- --ignore-words-list=additionals,alle,alot,ba,bre,bund,datas,dof,dur,ether,farenheit,falsy,fo,haa,hass,hist,iam,iff,iif,incomfort,ines,ist,lightsensor,mut,nam,nd,pres,pullrequests,referer,resset,rime,ser,serie,sur,te,technik,ue,uint,unsecure,visability,wan,wanna,withing,zar
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude_types: [csv, json]
exclude: ^tests/fixtures/|homeassistant/generated/
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.3.7"
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
additional_dependencies: [pydantic]
#
# - repo: local
# hooks:
# - id: mypy
# name: mypy
# entry: scripts/run-in-env.sh mypy
# language: script
# types: [python]
# require_serial: true
# repos:
# - repo: local
# hooks:
# - id: black
# name: black
# entry: black
# language: system
# types: [python]
# require_serial: true
# - id: check-added-large-files
# name: Check for added large files
# entry: check-added-large-files
# language: system
# - id: check-toml
# name: Check Toml
# entry: check-toml
# language: system
# types: [toml]
# - id: check-yaml
# name: Check Yaml
# entry: check-yaml
# language: system
# types: [yaml]
# - id: darglint
# name: darglint
# entry: darglint
# language: system
# types: [python]
# stages: [manual]
# - id: end-of-file-fixer
# name: Fix End of Files
# entry: end-of-file-fixer
# language: system
# types: [text]
# stages: [commit, push, manual]
# # - id: flake8
# # name: flake8
# # entry: flake8
# # language: system
# # types: [python]
# # require_serial: true
# # args: [--darglint-ignore-regex, .*]
# - id: isort
# name: isort
# entry: isort
# require_serial: true
# language: system
# types_or: [cython, pyi, python]
# args: ["--filter-files"]
# - id: pyupgrade
# name: pyupgrade
# description: Automatically upgrade syntax for newer versions.
# entry: pyupgrade
# language: system
# types: [python]
# args: [--py39-plus, --keep-runtime-typing]
# - id: trailing-whitespace
# name: Trim Trailing Whitespace
# entry: trailing-whitespace-fixer
# language: system
# types: [text]
# stages: [commit, push, manual]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier