-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
97 lines (86 loc) · 3.2 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
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
authors = [
{email = "thomas@gibfest.dk"},
{name = "Thomas Steen Rasmussen"}
]
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"dnspython[doh,dnssec,idna,doq] >= 2.5.0",
"PyYAML >= 6.0",
"prometheus-client >= 0.15.0",
"PySocks >= 1.7.1",
]
description = "Multi-target Prometheus exporter with an exclusive focus on DNS monitoring"
dynamic = ["version"]
keywords = ["prometheus", "dns", "monitoring"]
license = {text = "BSD 3-Clause License"}
name = "dns_exporter"
readme = "README.md"
requires-python = ">=3.9"
[project.scripts]
dns_exporter = "dns_exporter.entrypoint:main"
[project.optional-dependencies]
dev = ["pre-commit == 3.6.2", "setuptools-scm == 8.0.4"]
test = ["pytest == 8.1.1", "pytest-cov==5.0.0", "tox == 4.13.0", "requests==2.31.0", "pytest-randomly==3.15.0", "pytest-mock==3.12.0", "gera2ld.socks==0.5.0"]
docs = ["Sphinx==7.2.6", "furo==2024.1.29"]
[project.urls]
homepage = "https://github.com/tykling/dns_exporter"
documentation = "https://dnsexporter.readthedocs.org/"
[tool.setuptools_scm]
write_to = "src/dns_exporter/_version.py"
[tool.setuptools]
package-dir = {"" = "src"}
packages = ["dns_exporter"]
[tool.ruff]
target-version = "py39"
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"G004", # Logging statement uses f-string
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"EM101", # Exception must not use a string literal, assign to variable first
"COM812", # missing-trailing-comma (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"ISC001", # single-line-implicit-string-concatenation (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"src/tests/*.py" = [
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"PLR2004", # Magic value used in comparison, ...
"ANN001", # Missing type annotation for function argument ...
"ANN201", # Missing return type annotation for public function ...
"S113", # Probable use of requests call without timeout
"E501", # Line too long
]
"conftest.py" = [
"T201", # print()
"ANN001", # Missing type annotation for function argument ...
"ANN201", # Missing return type annotation for public function ...
"INP001", # File `conftest.py` is part of an implicit namespace package. Add an `__init__.py`
"PT004", # Fixture ... does not return anything, add leading underscore
]
"src/docs/source/conf.py" = [
"INP001", # File ... is part of an implicit namespace package. Add an `__init__.py`.
"A001", # Variable `copyright` is shadowing a Python builtin
]
[tool.mypy]
python_version = "3.9"
exclude = [
"build/",
"venv/",
"src/conftest.py",
"src/tests/",
"src/docs/source/conf.py",
]