-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (123 loc) · 3.96 KB
/
pyproject.toml
File metadata and controls
133 lines (123 loc) · 3.96 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[tool.poetry]
name = "homeassistant-cli"
version = "1.0.1"
description = "Command-line tool for Home Assistant."
license = "Apache Software License 2.0"
readme = "README.rst"
authors = ["The Home Assistant CLI Authors <fabian@affolter-engineering.ch>"]
keywords = [ "home", "automation" ]
homepage = "https://github.com/home-assistant-ecosystem/home-assistant-cli"
repository = "https://github.com/home-assistant-ecosystem/home-assistant-cli"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Home Automation",
]
exclude = ["tests", "tests.*"]
[tool.poetry.scripts]
hass-cli = "homeassistant_cli.cli:run"
[tool.poetry.dependencies]
python = "^3.13"
aiohttp = "^3.13.3"
dateparser = "^1.2.0"
jsonpath-ng = "^1.6.1"
jinja2 = "^3.1.4"
requests = "^2.31.0"
tabulate = "^0.9.0"
ruamel-yaml = "^0.19.0"
click = "^8.1.7"
click-log = "^0.4.0"
netdisco = "^3.0.0"
packaging = "^25.0"
zeroconf = ">=0.148.0"
[tool.poetry.group.test.dependencies]
pytest = "^9.0.0"
mypy = "^1.10.0"
pytest-timeout = "^2.3.1"
requests-mock = "^1.12.1"
pytest-sugar = "^1.0.0"
pytest-cov = "^5.0.0"
types-requests = "^2.31.0.20240406"
types-dateparser = "^1.2.0.20240420"
types-tabulate = "^0.9.0.20240106"
pre-commit = "^3.0.0"
ruff = "^0.15.10"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
src = ["homeassistant_cli", "tests"]
line-length = 88
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.ruff.lint]
select = [
"B", # bugbear
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PYI", # flake8-pyi
"UP", # pyupgrade
"RUF", # ruff
"W", # pycodestyle
"PIE", # flake8-pie
"PGH004", # pygrep-hooks - Use specific rule codes when using noqa
"PLE", # pylint error
"PLW", # pylint warning
"PLR1714", # Consider merging multiple comparisons
"T100", # flake8-debugger
]
ignore = [
"B004", # Using `hasattr(x, "__call__")` to test if x is callable is unreliable.
"B007", # Loop control variable `i` not used within loop body
"B009", # Do not call `getattr` with a constant attribute value
"B010", # [*] Do not call `setattr` with a constant attribute value.
"B011", # Do not `assert False` (`python -O` removes these calls)
"B028", # No explicit `stacklevel` keyword argument found
"D203", # 1 blank line required before class docstring
"D212", # Multi-line docstring summary should start at the first line
"E721", # Do not compare types, use `isinstance()`
"F401", # Module imported but unused
"D415", # First line should end with a period, question mark, or exclamation point
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"PLW0603", # Using the global statement
"PLW0120", # remove the else and dedent its contents
"PLW2901", # for loop variable overwritten by assignment target
"PLR5501", # Use `elif` instead of `else` then `if`
"UP035", # Syntax features not supported by minimum Python version
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
known-first-party = ["homeassistant_cli"]
split-on-trailing-comma = false
[tool.mypy]
files = "homeassistant_cli, tests"
mypy_path = "homeassistant_cli"
check_untyped_defs = true
disallow_untyped_calls = true
explicit_package_bases = true
ignore_missing_imports = true
namespace_packages = true
no_implicit_optional = true
show_error_codes = true
strict = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
"no-any-return",
"no-untyped-def",
]