forked from alandtse/alexa_media_player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
118 lines (114 loc) · 3.31 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
116
117
118
# Check out https://pre-commit.com/ for documentation
# and https://pre-commit.com/hooks.html for more hooks
minimum_pre_commit_version: 2.9.0
repos:
# --- Meta hooks ---
# - hooks:
# This one is useful, but it will fail if, e.g., you don't have a single yaml file
# - id: check-hooks-apply
# This one will fail, e.g., if you don't have a recipes/ file, which is excluded here
# - id: check-useless-excludes
# repo: meta
# --- Built-in hooks --
- hooks:
- id: check-symlinks
- id: check-case-conflict
- id: fix-byte-order-marker
- id: end-of-file-fixer
- id: check-merge-conflict
- id: debug-statements
- id: check-toml
- id: check-json
exclude: >
(?x)^(
.vscode/settings.json|
.vscode/launch.json|
.devcontainer/devcontainer.json
)$
# This one is slow and doesn't check for much
# - detect-private-key
# This is very slow, so I recommend disabling it.
# - id: check-added-large-files
# The Conda recipe meta.yaml files are actually templates, not valid YAML
- id: check-yaml
exclude: ^recipes/.*
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
# --- Commit msg checks ---
- hooks:
- id: commitizen
stages: ["commit-msg"]
repo: https://github.com/commitizen-tools/commitizen
rev: 3.10.0
# --- Linters ---
# - hooks:
# - id: dockerfile_lint
# repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
# rev: v1.1.2
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.10.1
- repo: https://github.com/pre-commit/mirrors-prettier
hooks:
- id: prettier
exclude: ^custom_components/alexa_media/translations|CHANGELOG.md
rev: v3.0.3
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
hooks:
- id: yamllint
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=tests/bandit.yaml
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
# - repo: local
# hooks:
# - id: pytest-check
# name: pytest-check
# entry: pytest
# language: system
# pass_filenames: false
# always_run: true
- repo: https://github.com/floatingpurr/sync_with_poetry
rev: "1.1.0"
hooks:
- id: sync_with_poetry
args: []
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies:
- tomli
exclude_types: [csv, json]
exclude: (^tests/fixtures/|CHANGELOG.md)
- repo: https://github.com/PyCQA/prospector
rev: 1.10.2
hooks:
- id: prospector
exclude: ^(tests)/.+\.py$
ci:
autofix_commit_msg: |
style: auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "build: pre-commit autoupdate"
autoupdate_schedule: weekly
skip: []
submodules: false