-
Notifications
You must be signed in to change notification settings - Fork 31
/
pyproject.toml
135 lines (122 loc) · 4.04 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
[tool.poetry]
name = "fritz-exporter"
version = "2.5.1"
description = "Prometheus exporter for AVM Fritz! Devices"
authors = ["Patrick Dreker <[email protected]>"]
license = "Apache 2.0"
readme = "README.md"
homepage = "https://github.com/pdreker/fritz_exporter"
repository = "https://github.com/pdreker/fritz_exporter"
documentation = "https://fritz-exporter.readthedocs.io"
keywords = ["prometheus", "fritz", "router", "grafana"]
classifiers = [
"Development Status :: 6 - Mature",
"Environment :: Console",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: System :: Monitoring"
]
include = [ "LICENSE.md" ]
packages = [{include = "fritzexporter"}]
[tool.poetry.dependencies]
python = "^3.11"
prometheus-client = ">=0.6.0"
fritzconnection = ">=1.0.0"
pyyaml = "*"
requests = "*"
attrs = ">=22.2,<25.0"
defusedxml = "^0.7.1"
[tool.poetry.group.dev.dependencies]
pytest = "*"
pytest-mock = "*"
types-pyyaml = "*"
types-requests = "*"
mypy = ">=0.971,<1.12"
coverage = ">=6.4.4,<8.0.0"
pytest-cov = ">=3,<6"
ruff = ">=0.1.7,<0.8.0"
[tool.poetry.scripts]
fritzexporter = "fritzexporter.__main__:main"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--cov-branch --cov . --cov-report xml --cov-config .coveragerc"
testpaths = [
"tests",
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 100
target-version = "py311"
extend-exclude = [
"tests",
"docs",
]
# other rules:
# * "DJ" for Django
# * "PYI" for type stubs etc.
# * "PD" for PandasVet
# * "NPY" for NumPy
select = [
"E", "W", # PyCodeStyle
"F", # PyFlakes
"C90", # McCabe (Function Complexity
"I", # ISort
"N", # PEP8 Naming Conventions
# "D", # PyDocStyle
"UP", # pyupgrade
"YTT", # flake8-2020 ('Yield from' etc.)
"ANN", # flake8-annotations (missing type annotations)
"ASYNC", # flake8-async (various async issues)
"S", # flake8-bandit (security issues)
"BLE", # blind exceptions
"FBT", # boolean traps (Anti-Pattern, Google it.)
"B", # bugbear (various anti-patterns)
"A", # flake8-builtins (shadowing builtins)
"COM", # flake8-commas (comma placement at line-end)
"C4", # flake8-comprehensions (comprehension issues like unnecessary list comprehensions etc.)
"DTZ", # avoid usage of naive datetime objects
"T10", # watch for Debugger imports
"EM", # ensure error messages are not formatted as f-strings and similar
"FA", # flake8-future-annotations (ensure type hint annotation use mnodern syntax)
"ISC", # implicit string concatenation
"G", # flake8-logging-format (ensure logging format strings are valid)
"INP", # do not use implicit namspace packages
"PIE", # various anti-patterns and misfeatures
"T20", # watch for print() calls
"PT", # pytest style issues
"Q", # quotes (ensure consistent usage of single/double quotes)
"RSE", # some "raise" syntax issues
"RET", # return values anti-patterns
"SLF", # flake8-self (do not access "_private" attributes from outside)
"SLOT", # flake8-slots (ensure usage of __slots__)
"SIM", # flake8-simplify (simplify various constructs)
"INT", # gettext issues (format strings etc.)
"ARG", # disallow unused arguments
"PTH", # use pathlib instead of os.path
"TD", # enforce some syntax on TODO comments
"FIX", # highlight TODO, FIXME, XXX etc.
"PGH", # pygrep-hooks (policing "noqa" and similar)
"PL", # PyLint (various issues)
"TRY", # try/except/else/finally anti-patterns (try.ceratops)
"FLY", # join vs. f-strings
"PERF", # various performance issues
"FURB", # modernize various constructs
"LOG", # logging issues
"RUF", # ruff (various issues)
]
ignore = ['E203', 'COM812', 'ISC001', 'ANN101', 'ANN102', 'ANN204']
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
exclude = [
'^tests/',
'^docs/',
]
[[tool.mypy.overrides]]
module = "fritzconnection.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "defusedxml.*"
ignore_missing_imports = true