|
1 | 1 | repos: |
2 | | - - repo: https://github.com/charliermarsh/ruff-pre-commit |
3 | | - rev: v0.0.275 |
| 2 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 3 | + rev: v0.13.0 |
4 | 4 | hooks: |
5 | | - - id: ruff |
6 | | - args: |
7 | | - - --fix |
8 | | - - hooks: |
9 | | - - args: [--safe, --quiet] |
| 5 | + - id: ruff-check |
| 6 | + args: ["--fix"] |
| 7 | + - id: ruff-format |
10 | 8 | files: ^((pyisyox|examples)/.+)?[^/]+\.py$ |
11 | | - id: black |
12 | | - repo: https://github.com/psf/black |
13 | | - rev: 23.3.0 |
14 | | - - hooks: |
| 9 | + |
| 10 | + - repo: https://github.com/codespell-project/codespell |
| 11 | + rev: v2.4.1 |
| 12 | + hooks: |
15 | 13 | - id: codespell |
16 | 14 | additional_dependencies: |
17 | 15 | - tomli |
18 | | - args: [--toml, pyproject.toml] |
19 | | - repo: https://github.com/codespell-project/codespell |
20 | | - rev: v2.2.5 |
| 16 | + args: |
| 17 | + - --toml |
| 18 | + - pyproject.toml |
| 19 | + - --ignore-words-list=ETo,ETO |
| 20 | + - --quiet-level=2 |
| 21 | + exclude: ^tests/fixtures/|homeassistant/generated/|tests/components/.*/snapshots/ |
21 | 22 |
|
22 | | - - hooks: |
23 | | - - id: isort |
24 | | - repo: https://github.com/PyCQA/isort |
| 23 | + - repo: https://github.com/PyCQA/isort |
25 | 24 | rev: 5.12.0 |
| 25 | + hooks: |
| 26 | + - id: isort |
26 | 27 |
|
27 | 28 | - repo: https://github.com/pre-commit/pre-commit-hooks |
28 | | - rev: v4.4.0 |
| 29 | + rev: v6.0.0 |
29 | 30 | hooks: |
30 | 31 | - id: check-executables-have-shebangs |
31 | 32 | stages: [manual] |
32 | 33 | - id: check-json |
33 | 34 | exclude: (.vscode|.devcontainer) |
34 | 35 | - id: no-commit-to-branch |
35 | | - args: |
36 | | - - --branch=dev |
37 | | - - --branch=main |
| 36 | + args: ["--branch=dev", "--branch=main"] |
| 37 | + |
38 | 38 | - repo: https://github.com/adrienverge/yamllint.git |
39 | | - rev: v1.32.0 |
| 39 | + rev: v1.37.1 |
40 | 40 | hooks: |
41 | 41 | - id: yamllint |
42 | | - - repo: https://github.com/pre-commit/mirrors-prettier |
43 | | - rev: v3.0.0-alpha.9-for-vscode |
| 42 | + |
| 43 | + - repo: https://github.com/rbubley/mirrors-prettier |
| 44 | + rev: v3.6.2 |
44 | 45 | hooks: |
45 | 46 | - id: prettier |
| 47 | + additional_dependencies: |
| 48 | + - prettier@3.6.2 |
| 49 | + - prettier-plugin-sort-json@4.1.1 |
46 | 50 |
|
47 | 51 | - repo: local |
48 | 52 | hooks: |
49 | | - - id: pylint |
50 | | - name: pylint |
51 | | - entry: python3 -m pylint -j 0 |
52 | | - language: system |
53 | | - types: [python] |
54 | | - files: ^pyisyox/.+\.py$ |
55 | | - args: ["-rn", "-sn"] |
56 | 53 | - id: mypy |
57 | 54 | name: mypy |
58 | | - entry: mypy |
59 | | - language: system |
60 | | - types: [python] |
61 | | - files: ^pyisyox\/.+.py$ |
| 55 | + entry: script/run-in-env.sh mypy |
| 56 | + language: script |
| 57 | + require_serial: true |
| 58 | + files: ^pyisyox/.*\.py$ |
| 59 | + - id: pylint |
| 60 | + name: pylint |
| 61 | + entry: script/run-in-env.sh pylint --rcfile=.pylintrc |
| 62 | + language: script |
| 63 | + require_serial: true |
| 64 | + files: ^pyisyox/.*\.py$ |
0 commit comments