-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
131 lines (118 loc) · 2.83 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
[project]
name = "ember_mug_component"
readme = "README.md"
description = "Home Assistant Custom Integration for Ember Mugs."
authors = [
{ name = "Jesse Sopel", email = "[email protected]" },
]
license = { file = "LICENSE.md" }
requires-python = ">=3.12"
dynamic = ["version"]
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"homeassistant>=2024.8.1",
"bleak-retry-connector>=3.5.0",
"bleak>=0.22.2",
"python-ember-mug==1.1.0",
]
[project.optional-dependencies]
test = [
"pytest>=7.2.1",
"pytest-cov>=3.0.0",
"pytest-asyncio>=0.20.2",
"home-assistant-bluetooth",
"pytest-homeassistant-custom-component",
# Requirements for HASS
"pyserial>=3.5", # For HASS serial component
"bluetooth-auto-recovery>=1.4.2", # For HASS Bluetooth component
"pyudev==0.24.1", # For HASS usb component
]
[project.urls]
"Source code" = "https://github.com/sopelj/hass-ember-mug-component/"
"Bug Tracker" = "https://github.com/sopelj/hass-ember-mug-component/issues"
"Changelog" = "https://github.com/sopelj/hass-ember-mug-component/blob/main/CHANGELOG.md"
[tool.hatch.version]
path = "custom_components/ember_mug/manifest.json"
pattern = "\"version\": \"(?P<version>[^\"]+)"
[tool.hatch.envs.default]
python = "3.13"
[tool.hatch.envs.test]
features = ["test"]
[[tool.hatch.envs.test.matrix]]
python = ["3.12"]
homeassistant = ["2024.8.3", "2024.10.4"]
[[tool.hatch.envs.test.matrix]]
python = ["3.13"]
homeassistant = ["2024.12"]
[tool.hatch.envs.test.scripts]
cov = "pytest --asyncio-mode=auto --cov=custom_components --cov-branch --cov-report=xml --cov-report=term-missing tests -vvv"
no-cov = "cov --no-cov"
[tool.black]
line-length = 120
target-version = ["py312"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"def main",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:"
]
[tool.ruff]
fix = true
line-length = 120
target-version = "py312"
[tool.ruff.lint]
select = [
"A",
"ASYNC",
"B",
"COM",
"C4",
"D",
"E",
"ERA",
"F",
"FA",
"FLY",
"G",
"I",
"N",
"PTH",
"PT",
"PL",
"PLE",
"Q",
"RET",
"RSE",
"RUF",
"S",
"SLF",
"SIM",
"TD",
"TCH",
"UP",
]
ignore = ["D203", "D212", "PLR2004", "PLR0913", "RUF012"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"D103", # No docstrings in tests needed
"S101", # We needs asserts in tests
"SLF001",
]
[tool.mypy]
ignore_errors = true
ignore_missing_imports = false
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_configs = true