-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
pyproject.toml
175 lines (161 loc) · 4.91 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[build-system]
requires = ["setuptools==75.7.0", "wheel==0.45.1"]
build-backend = "setuptools.build_meta"
[project]
name = "axis"
version = "64"
license = {text = "MIT"}
description = "A Python library for communicating with devices from Axis Communications"
readme = "README.md"
authors = [{name = "Robert Svensson", email = "[email protected]"}]
keywords = ["axis", "vapix", "homeassistant"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Topic :: Home Automation",
]
requires-python = ">=3.12.0"
dependencies = [
"httpx>=0.26",
"orjson>3.9",
"packaging>23",
"xmltodict>=0.13.0",
]
[project.optional-dependencies]
requirements = [
"httpx==0.28.1",
"orjson==3.10.13",
"packaging==24.2",
"xmltodict==0.14.2",
]
requirements-test = [
"mypy==1.14.1",
"pytest==8.3.4",
"pytest-aiohttp==1.0.5",
"pytest-asyncio==0.25.1",
"pytest-cov==6.0.0",
"respx==0.22.0",
"ruff==0.8.6",
"types-xmltodict==v0.14.0.20241009",
]
requirements-dev = [
"pre-commit==4.0.1"
]
[project.urls]
"Source Code" = "https://github.com/Kane610/axis"
"Bug Reports" = "https://github.com/Kane610/axis/issues"
"Forum" = "https://community.home-assistant.io/t/axis-camera-component/"
[project.scripts]
axis = "axis.__main__:main"
[tool.coverage.report]
fail_under = 95
exclude_also = [
"if TYPE_CHECKING:"
]
[tool.setuptools.packages.find]
include = ["axis*"]
[tool.setuptools.package-data]
"axis" = ["py.typed"]
[tool.mypy]
python_version = "3.12"
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_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pytest.ini_options]
addopts = "--cov=axis --cov-report term-missing"
asyncio_mode = "auto"
log_cli = false
log_cli_level = "DEBUG"
testpaths = ["tests"]
[tool.ruff]
target-version = "py312"
lint.select = [
# "A", # flake8-builtins
"ANN", # flake8-annotations
# "ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # bugbear
"BLE", # flake8-blind-except
"C", # complexity
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # docstrings
"E", # pycodestyle
"EM", # flake8-errmsg
# "ERA", # eradicate
"EXE", # flake8-executable
"F", # pyflakes/autoflake
"FA", # flake8-future-annotations
"FIX", # flake8-fixme
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # A Linter for performance anti-patterns
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PERF", # Perflint
"PT", # pytest
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
# "SLF", # flake8-self
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TD", # flake8-todos
# "TID", # flake8-tidy-imports
# "TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
]
lint.ignore = [
"ANN101", # Missing type annotation for {name} in method
"ANN102", # Missing type annotation for {name} in classmethod
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in {name}
"COM812", # Trailing comma missing
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"E501", # Checks for lines that exceed the specified maximum character length
"ISC001", # Implicitly concatenated string literals on one line
"N818", # Exception name {name} should be named with an Error suffix
"PLR0912", # Maximum number of branches allowed for a function or method body
"PLR0913", # Too many arguments to function call ({c_args} > {max_args})
"PLR0915", # Too many statements ({statements} > {max_statements})
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"S324", # Probable use of insecure hash functions in {library}: {string}
]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["axis"]
combine-as-imports = true
[tool.ruff.lint.mccabe]
max-complexity = 25