-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
213 lines (169 loc) · 5.53 KB
/
pyproject.toml
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#
### project ##########################################################################
#
[project]
name = "evohome-async"
dynamic = ["version"]
description = "An async client for connecting to Honeywell's TCC RESTful API."
readme = "README.md"
authors = [{ name = "David Bonnes", email = "[email protected]" }]
maintainers = [{ name = "David Bonnes", email = "[email protected]" }]
dependencies = ["aiohttp>=3.10.5", "voluptuous>=0.15.2"]
requires-python = ">=3.12"
license = "Apache-2.0"
keywords = [
"evohome",
"honeywell",
"resideo",
"round thermostat",
"tcc",
"vision pro",
]
classifiers = [
"Topic :: Home Automation",
"License :: OSI Approved :: Apache Software License",
]
#
[project.scripts]
evo-client = "evohomeasync2.client:main"
#
[project.urls]
"Homepage" = "https://github.com/zxdavb/evohome-async"
"Bug Tracker" = "https://github.com/zxdavb/evohome-async/issues"
"Wiki" = "https://github.com/zxdavb/evohome-async/wiki"
#
### build-system #####################################################################
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
sources = ["src"]
[tool.hatch.build.targets.wheel]
packages = ["src/evohomeasync", "src/evohomeasync2", "src/evocommon"]
[tool.hatch.version]
path = "src/evohomeasync2/__init__.py"
#
### pytest ###########################################################################
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
norecursedirs = "deprecated/*"
#
### mypy ############################################################################
[tool.mypy]
exclude = ["docs", "tests/tests_cc"]
files = ["cli", "src", "tests"]
no_implicit_optional = true
# see: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
# Start off with these
warn_unused_configs = true
warn_redundant_casts = true # this is not per-module
warn_unused_ignores = true
# Getting these passing should be easy
extra_checks = true # now incl.: strict_concatenate = true
strict_equality = true
# Strongly recommend enabling this one as soon as you can
check_untyped_defs = true
# These shouldn't be too much additional work, but may be tricky to
# get passing if you use a lot of untyped libraries
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
# These next few are various gradations of forcing use of type annotations
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
# This one isn't too hard to get passing, but return on investment is lower
# no_implicit_reexport = true
# This one can be tricky to get passing if you use a lot of untyped libraries
warn_return_any = true
disallow_any_unimported = true
warn_no_return = true
warn_unreachable = true
#
[[tool.mypy.overrides]]
module = ["tests.tests_rf.common"]
disable_error_code = ["type-arg"] # 21
#
[[tool.mypy.overrides]]
module = ["tests.tests_rf.faked_server.vendor"]
disable_error_code = ["type-arg"] # 14
#
## ruff ##############################################################################
[tool.ruff]
exclude = ["docs/*.py", "tests/tests_cc"]
src = ["cli", "src", "tests"]
target-version = "py313"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
# "ARG", # flake8-unused-args
"ASYNC", # flake8-async
"B", # flake8-bugbear (opinionated anti-patterns)
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe complexity
"DTZ", # flake8-datetimez
# "D", # pydocstyle
"E", # pycodestyle
"EXE", # flake8-executable (shebang)
"F", # Pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FURB", # refurb (misc anti-patterns)
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # perflint (performance anti-patterns)
"PGH", # pygrep hooks
"PIE", # flake8-pie (misc lint)
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff (misc lint/anti-patterns)
"S", # flake8-bandit (security)
"SIM", # flake8-simplify
# "SLF", # flake8-self (aka private-member-access)
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops (try/except anti-patterns)
# "T10", # flake8-debugger
"T20", # flake8-print
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"ANN401", # Don't use type Any
"D202", # No blank lines allowed after function docstring
"E501", # Line too long
"G004", # Logging statement uses f-string
"ISC001", # Implicitly concatenated strings on a single line (conflicts with ruff)
"N806", # Variable in function should be lowercase
"PLR0913", # Too many arguments in function definition
"PLR2044", # Line with empty comment
"S101", # Assertions are removed when Python is run with optimization
"TRY003", # Long exception messages
]
[tool.ruff.lint.per-file-ignores]
"./tests/*" = ["S101"]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
voluptuous = "vol"
[tool.ruff.lint.isort]
combine-as-imports = true
force-sort-within-sections = false
split-on-trailing-comma = false
#
## coverage ##########################################################################
[tool.coverage.run]
omit = ["cli/*", "tests*/*"]
[tool.coverage.report]
show_missing = true