-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
85 lines (77 loc) · 2.52 KB
/
.pre-commit-config.yaml
File metadata and controls
85 lines (77 loc) · 2.52 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
75
76
77
78
79
80
81
82
83
84
85
fail_fast: true
repos:
- repo: local
hooks:
- id: poetry-check
name: poetry-check
language: system
entry: poetry check
pass_filenames: false
types: [file]
files: ^(pyproject.toml|poetry.lock)$
- id: bootstrap-requirements
name: bootstrap-requirements
language: system
entry: poetry export
args:
- --only=bootstrap
- --format=requirements.txt
- --output=scripts/bootstrap-requirements.txt_
pass_filenames: false
types: [file]
files: ^(pyproject.toml|poetry.lock|scripts/bootstrap-requirements.txt_)$
- id: generateDS
name: generateDS
language: system
entry: python scripts/generate_ds.py
args:
- pywemo/ouimeaux_device/api/xsd/device.xsd
- pywemo/ouimeaux_device/api/xsd/service.xsd
pass_filenames: false
types: [file]
files: ^(pyproject.toml|poetry.lock|scripts/generate_ds.py|pywemo/ouimeaux_device/api/xsd/.*)$
- id: ruff-check
name: ruff-check
language: system
entry: ruff check --force-exclude --fix
require_serial: true
types_or: [python, pyi]
- id: ruff-format
name: ruff-format
language: system
entry: ruff format --force-exclude
require_serial: true
types_or: [python, pyi]
- id: pylint
name: pylint
language: system
entry: pylint
args: ['--disable=fixme']
require_serial: true
types: [python]
- id: mypy
name: mypy
language: system
entry: mypy
require_serial: true
types_or: [python, pyi]
# By default mypy will prefer .pyi files to py files if both are found
# While traversing a directory. However mypy will fail if
# both wemo_services.py & wemo_services.pyi are included in the
# command line. wemo_services.py is excluded here and pyi files are
# included in the types_or as a work-around. mypy also has an
# 'exclude' option that can be placed in pyproject.toml, but similar
# to flake8 above, any files passed on the command-line bypass
# 'exclude'.
exclude: pywemo/ouimeaux_device/api/wemo_services.py
- id: rstcheck
name: rstcheck
language: system
entry: rstcheck
types: [rst]
- id: deptry
name: deptry
language: system
entry: deptry .
pass_filenames: false
types: [python]