-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
pyproject.toml
174 lines (160 loc) · 4.37 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
[build-system]
requires = ["setuptools>=68", "setuptools_scm[toml]>=7.1"]
build-backend = "setuptools.build_meta"
[project]
name = "python-openhab"
description = "python library for accessing the openHAB REST API"
authors = [{ name = "Georges Toth", email = "[email protected]" }]
license = { text = "AGPLv3+" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
keywords = ["openHAB"]
requires-python = ">=3.9"
dependencies = [
"python-dateutil~=2.8",
"pydantic<3",
"Authlib~=1.2",
"httpx~=0.24",
]
dynamic = ["version"]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/sim0nx/python-openhab"
Download = "https://github.com/sim0nx/python-openhab"
Tracker = "https://github.com/sim0nx/python-openhab/issues"
Documentation = "http://python-openhab.readthedocs.io/en/latest/?badge=latest"
Source = "https://github.com/sim0nx/python-openhab"
[project.optional-dependencies]
docs = [
"mkdocs-material",
"mkdocstrings[crystal,python]",
]
dev = [
"mypy",
"ruff",
"types-python-dateutil",
"typeguard",
]
test = [
"pytest",
"pytest-sugar",
"coverage",
"beautifulsoup4",
]
[tool.setuptools_scm]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages]
find = { namespaces = false }
[tool.setuptools.package-data]
openhab = ["py.typed"]
[tool.mypy]
show_error_context = true
show_column_numbers = true
ignore_missing_imports = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
disallow_untyped_calls = false
warn_no_return = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_optional = true
check_untyped_defs = false
[tool.ruff]
line-length = 160
indent-width = 2
target-version = "py39"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"D", # pydocstyle
"N", # pep8-naming
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM103", # flake8-errmsg - dot-format-in-exception
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
# "SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"TD", # flake8-todos
"FIX", # flake8-fixme
"ERA", # eradicate
"PL", # Pylint
"PLC", # Convention
"PLE", # Error
"PLR", # Refactor
"PLW", # Warning
"B904", # reraise-no-cause
"FLY", # flynt
# "PERF", # Perflint
"RUF013", # implicit-optional
]
unfixable = ['ERA001']
extend-select = ['Q', 'RUF100', 'C90']
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'single' }
ignore = [
"C901", # too complex
"E501", # line too long
"B008", # do not perform function call in argument defaults
"ANN101", # missing-type-self
"ANN401", # any-type
"ANN002", # missing-type-args
"ANN003", # missing-type-kwargs
"ANN102", # missing-type-cls
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"PLW0603", # Using the global statement
"PLR0912", # Too many branches
"COM812", # missing-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"Q001", # bad-quotes-multiline-string
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # Use of `assert` detected
"D", # docstring
"RET504", # Unnecessary assignment before `return` statement
]
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint.pydocstyle]
convention = "google"