-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
92 lines (80 loc) · 3.16 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "home-assistant-vantage"
version = "0.13.5"
description = "Home Assistant integration for Vantage InFusion home automation controllers."
readme = "README.md"
requires-python = ">=3.12"
authors = [{ name = "James Smith", email = "james@loopj.com" }]
classifiers = ["Private :: Do Not Upload"]
dependencies = [
"aiovantage==0.17.2",
"homeassistant==2024.12.3",
"colorlog==6.9.0",
]
[project.optional-dependencies]
dev = ["pyright==1.1.392.post0", "ruff==0.9.3", "bumpver==2024.1130"]
[tool.hatch.build.targets.wheel]
include = ["custom_components/vantage"]
[tool.ruff.lint]
select = [
"B007", # Loop control variable {name} not used within loop body
"B014", # Exception handler with duplicate exception
"C", # complexity
"D", # docstrings
"E", # pycodestyle
"F", # pyflakes/autoflake
"ICN001", # import concentions; {name} should be imported as {asname}
"PGH004", # Use specific rule codes when using noqa
"PLC0414", # Useless import alias. Import alias does not rename original package.
"SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
"SIM117", # Merge with-statements that use the same scope
"SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys()
"SIM201", # Use {left} != {right} instead of not {left} == {right}
"SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a}
"SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'.
"SIM401", # Use get from dict with default instead of an if block
"T20", # flake8-print
"TRY004", # Prefer TypeError exception for invalid type
"RUF006", # Store a reference to the return value of asyncio.create_task
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D404", # First word of the docstring should not be This
"D406", # Section name should end with a newline
"D407", # Section name underlining
"D411", # Missing blank line before section
"E501", # line too long
"E731", # do not assign a lambda expression, use a def
]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.mccabe]
max-complexity = 25
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["homeassistant"]
combine-as-imports = true
[tool.pyright]
typeCheckingMode = "strict"
reportPrivateImportUsage = "none"
reportIncompatibleVariableOverride = "none"
[tool.bumpver]
current_version = "0.13.5"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "Bump version {old_version} -> {new_version}"
commit = true
tag = true
push = true
[tool.bumpver.file_patterns]
"pyproject.toml" = ['current_version = "{version}"', 'version = "{version}"']
"custom_components/vantage/manifest.json" = ['"version": "{version}"']
# Uncomment to enable editable mode for aiovantage
# [tool.uv.sources]
# aiovantage = { path = "../aiovantage", editable = true }