-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
155 lines (136 loc) · 3.41 KB
/
setup.cfg
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
[tool:pytest]
testpaths = tests
norecursedirs = .git testing_config
asyncio_mode = auto
[autoflake8]
in-place = True
recursive = False
expand-star-imports = False
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build
[flake8]
exclude = .venv,.git,.tox,docs,venv,bin,lib,deps,build
# To work with Black
max-line-length = 88
# E501: line too long
# W503: Line break occurred before a binary operator
# E203: Whitespace before ':'
# D202 No blank lines allowed after function docstring
ignore =
E501,
W503,
E203,
D202
per-file-ignores =
custom_components/*: SFS301
tests/*: SFS301
[isort]
# https://github.com/timothycrosley/isort
# https://github.com/timothycrosley/isort/wiki/isort-Settings
# splits long import on multiple lines indented by 4 spaces
profile = black
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
default_section = THIRDPARTY
known_first_party = tests
forced_separate = tests
combine_as_imports = true
use_parentheses = true
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
line_length = 88
indent = " "
[mypy]
python_version = 3.12
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
follow_imports = silent
ignore_missing_imports = true
no_implicit_optional = true
strict_equality = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
show_error_codes = True
show_error_context = True
error_summary = True
install_types = True
non_interactive = True
disable_error_code =
arg-type,
assignment,
attr-defined,
call-arg,
dict-item,
index,
misc,
no-any-return,
no-untyped-call,
no-untyped-def,
override,
return-value,
union-attr,
var-annotated
[pydocstyle]
ignore =
D202,
D203,
D213
[pyupgrade]
py312plus = True
[codespell]
exclude = setup.cfg
ignore-words-list = hass,dout
skip = ./.*,test/*
quiet-level = 2
[tox:tox]
envlist = cov_erase, py312, lint, black, coverage
skip_missing_interpreters = True
[gh-actions]
python =
3.12: py312, lint, black, coverage
[testenv]
setenv = PYTHONPATH = {toxinidir}
install_command = pip install {opts} {packages}
commands = py.test --cov custom_components/powerllm --cov-append --cov-report= --timeout=9 --durations=10 -p no:sugar {posargs}
deps =
-r{toxinidir}/requirements_test_all.txt
[testenv:pylint]
ignore_errors = True
deps =
-r{toxinidir}/requirements_test_all.txt
commands =
pylint {posargs} custom_components
skip_install = True
[testenv:lint]
deps = pre-commit
commands =
pre-commit run --hook-stage manual pyupgrade --all-files
pre-commit run --hook-stage manual autoflake --all-files
pre-commit run --hook-stage manual flake8 --all-files
pre-commit run --hook-stage manual isort --all-files --show-diff-on-failure
pre-commit run --hook-stage manual codespell --all-files --show-diff-on-failure
pre-commit run --hook-stage manual ruff --all-files
skip_install = True
[testenv:black]
deps = pre-commit
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
commands =
pre-commit run --hook-stage manual black --all-files --show-diff-on-failure
skip_install = True
[testenv:cov_erase]
deps = coverage
commands = coverage erase
skip_install = True
[testenv:coverage]
deps = coverage
commands = coverage report
skip_install = True
[coverage:run]
relative_files = True