Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
71 lines (61 loc) · 1.66 KB
/
Copy pathpyproject.toml
File metadata and controls
71 lines (61 loc) · 1.66 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
[project]
name = "promexp"
version = "2.0.0b2"
description = "Simple Prometheus metrics exporter for broadcasters"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"psutil>=7.2.2",
"typer>=0.27.0",
]
[dependency-groups]
dev = [
"mypy >=1.19",
"pytest >=9.0",
"ruff >=0.14.13",
]
#
# Tools
#
[tool.ruff]
fix = true
line-length = 88
[tool.ruff.format]
indent-style = "space"
line-ending = "auto"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"BLE", # blind exceptions. I don't like them either, but they are useful in some cases
"COM812", # OK: messes with formatter
"D", # docstrings. Naaah.
"EM", # OK: String literals in exception messages (why not?)
"FBT", # Boolean positional argument (WTF?)
"FIX002", # TODOs
"ISC001", # OK: Incompatible with formatting
"PLR2004", # OK: Magic numbers (just a few)
"PTH", # path-like objects
"S101", # OK: I like asserts. They make mypy happy
"S104", # OK: bind to all interfaces (We need this)
"S110", # OK: except: pass
"S608", # sql injections. let's wait for template strings
"SIM105", # OK: contextlib.suppress is ugly
"TD002", # Author name in TODOs
"TD003", # Issue link in TODOs
"TRY003", # OK: Avoid specicying long messages outside of exceptions
"ANN", # Any
"ERA", # Commented out code
"RUF012", # ClassVar
"G004", # Logging messages using fstring
"S108",
]
[tool.mypy]
strict = true
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
exclude = "tests/|.venv/"