-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathpyproject.toml
88 lines (77 loc) · 2.62 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
[project]
name = "mqtt-exporter"
version = "1.6.1"
description = "Simple generic MQTT Prometheus exporter for IoT working out of the box"
readme = "README.md"
license = { text = "MIT License" }
authors = [
{ name = "Kevin Petremann", email = "[email protected]" },
]
keywords = ["iot", "mqtt", "prometheus"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dynamic = ["dependencies"]
[tool.setuptools.dynamic]
dependencies = { file = ["requirements/base.txt"] }
[project.urls]
Homepage = "https://github.com/kpetremann/mqtt-exporter"
[project.scripts]
mqtt-exporter = "mqtt_exporter.main:main"
[tool.setuptools]
packages = ["mqtt_exporter"]
[tool.black]
line-length = 100
exclude = "venv/"
[tool.isort]
profile = "black"
multi_line_output = 3
skip_gitignore = true
skip = ".bzr,.direnv,.eggs,.git,.hg,.mypy_cache,.nox,.pants.d,.svn,.tox,.venv,_build,buck-out,build,dist,node_modules,venv,migrations,urls.py"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C", # flake8-comprehensions
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"G", # flake8-logging-format
"S", # bandit
"PL" # pylint
]
ignore = [
"E501", # line too long, handled by black
"C901", # function is too complex
"PLR2004", # magic value used in comparison
"PLR1711", # useless `return` statement at end of function
"PLC1901", # compare-to-empty-string
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0915", # too many statements
"B009", # do not call getattr with a constant attribute value
"B904", # raise without from inside except
"S104", # possible binding to all interfaces
]
pylint.max-args = 10
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*.py" = ["E402", "S", "PL"]
[tool.mypy]
# error whenever it encounters a function definition without type annotations
disallow_untyped_defs = true
# error whenever a function with type annotations calls a function defined without annotations
disallow_untyped_calls = true
# stop treating arguments with a None default value as having an implicit Optional type
no_implicit_optional = true
# error whenever your code uses an unnecessary cast that can safely be removed
warn_redundant_casts = true
[tool.pytest.ini_options]
asyncio_mode = "strict"