-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathpyproject.toml
More file actions
96 lines (87 loc) · 2.17 KB
/
pyproject.toml
File metadata and controls
96 lines (87 loc) · 2.17 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
[project]
name = "thewatchman"
version = "0.0.0"
description = "thewatchman"
readme = "README.md"
requires-python = ">=3.13.2"
dependencies = [
"homeassistant>=2025.4.4",
"prettytable>=3.17.0",
]
[dependency-groups]
dev = [
"pre-commit>=4.5.1",
"pytest>=8.3.5",
"pytest-homeassistant-custom-component>=0.13.236",
"pytest-cov>=6.0.0",
"pytest-asyncio>=0.25.0",
"ruff>=0.15.0",
"mypy>=1.15.0",
"pylint>=3.3.4",
"colorlog>=6.9.0",
]
[tool.pytest.ini_options]
# add current folder to modules path
pythonpath = "."
testpaths = [
"tests",
]
asyncio_mode = "auto"
addopts = "-p no:xdist"
[tool.ruff]
#line-length = 88
#target-version = "py313"
src = ["custom_components/watchman"]
[tool.ruff.lint]
ignore = [
"A005", # It is just wrong
"ANN401", # Opiniated warning on disallowing dynamically typed expressions
"D203", # Conflicts with other rules
"D213", # Conflicts with other rules
"RUF012", # Just broken
"TC006", # Checks for unquoted type expressions in typing.cast() calls.
"TID252", # Relative imports
"S101", # asserts in tests
"EM101", #Exception must not use a string literal
"EM102", # Exception must not use an f-string literal
"EM103", # Exception must not use .format() call
# Formatter conflicts
"COM812",
"COM819",
"D206",
"E501",
"ISC001",
"Q000",
"Q001",
"Q002",
"Q003",
"W191",
]
select = ["ALL"]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"homeassistant.helpers.area_registry" = "ar"
"homeassistant.helpers.config_validation" = "cv"
"homeassistant.helpers.device_registry" = "dr"
"homeassistant.helpers.entity_registry" = "er"
"homeassistant.helpers.issue_registry" = "ir"
voluptuous = "vol"
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = [
"homeassistant",
]
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101"]
[tool.pylint."MESSAGES CONTROL"]
# Reasons disabled:
# format - handled by ruff
# duplicate-code - unavoidable
# used-before-assignment - false positives with TYPE_CHECKING structures
disable = [
"abstract-method",
"duplicate-code",
"format",
"unexpected-keyword-arg",
"used-before-assignment",
]