Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
118 lines (100 loc) · 2.97 KB
/
Copy pathpyproject.toml
File metadata and controls
118 lines (100 loc) · 2.97 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
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
[project]
name = "home-assistant-omnik-inverter"
version = "4.0.0"
description = "Read data from your Omnik Inverter using home assistant."
authors = [{ name = "Robbin Janssen", email = "robbinjanssen@gmail.com" }]
license = "MIT"
readme = "README.md"
requires-python = ">=3.14.2,<3.15"
dependencies = ["omnikinverter==2.0.0"]
[dependency-groups]
dev = [
"codespell==2.4.2",
"mypy==2.4.0",
"prek==0.5.5",
"pylint==4.1.3",
"pytest-homeassistant-custom-component==0.13.372",
"ruff==0.17.0",
"yamllint==1.38.0",
]
[tool.uv]
# This repository is a Home Assistant integration, not a Python package.
package = false
[tool.mypy]
# Specify the target platform details in config, so your developers are
# free to run mypy on Windows, Linux, or macOS and get consistent
# results.
platform = "linux"
python_version = "3.14"
explicit_package_bases = true
# flake8-mypy expects the two following for sensible formatting
show_column_numbers = true
# show error messages from unrelated files
follow_imports = "normal"
# suppress errors about unsatisfied imports
ignore_missing_imports = true
# be strict
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
no_implicit_reexport = true
strict_optional = true
warn_incomplete_stub = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
# Home Assistant re-exports names, e.g. BinarySensorDeviceClass, without __all__.
module = "homeassistant.*"
implicit_reexport = true
[tool.pylint.BASIC]
good-names = ["_", "ex", "fp", "i", "id", "j", "k", "on", "Run", "T"]
[tool.pylint."MESSAGES CONTROL"]
disable = [
"too-few-public-methods",
"too-many-positional-arguments",
"duplicate-code",
"format",
"unsubscriptable-object",
]
[tool.pylint.SIMILARITIES]
ignore-imports = true
[tool.pylint.FORMAT]
max-line-length = 88
[tool.pylint.DESIGN]
max-attributes = 20
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
[tool.ruff]
target-version = "py314"
lint.select = ["ALL"]
lint.ignore = [
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
"CPY001", # No copyright headers in source files
"D203", # Conflicts with other rules
"D213", # Conflicts with other rules
"D417", # False positives in some occasions
"PLR2004", # Just annoying, not really useful
"SLOT000", # Has a bug with enums: https://github.com/astral-sh/ruff/issues/5748
# Conflicts with the Ruff formatter
"COM812",
"ISC001",
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["S101", "SLF001"]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
fixture-parentheses = false
[tool.ruff.lint.isort]
known-first-party = ["custom_components"]
[tool.ruff.lint.mccabe]
max-complexity = 25