Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
121 lines (112 loc) · 4.75 KB
/
Copy pathpyproject.toml
File metadata and controls
121 lines (112 loc) · 4.75 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
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
[build-system]
# In setuptools before version 61.0.0 there is no support for writing the
# project's packaging metadata in pyproject.toml
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "linuxfabrik-lib"
version = "8.2.0"
description = "Python 3.9+ utility library: argument parsing, output formatting, HTTP, shell, disk, SQLite/MySQL, caching, version checks, plus API clients."
readme = "README.md"
authors = [
{ name = "Linuxfabrik GmbH, Zurich, Switzerland", email = "info@linuxfabrik.ch" },
]
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Information Technology",
"Intended Audience :: Manufacturing",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: The Unlicense (Unlicense)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System",
"Topic :: System :: Monitoring",
"Topic :: System :: Networking :: Monitoring",
]
keywords = ["lib", "libs", "monitoring", "monitoring plugins", "icinga", "nagios"]
dependencies = [
"beautifulsoup4",
"httpx[http2]>=0.26", # url.py passes `proxy=`, which httpx accepts since 0.26
"lxml",
"psutil",
"pymysql",
"pypsrp",
"pywinrm",
"smbprotocol",
"xmltodict",
]
requires-python = ">=3.9"
[project.urls]
Homepage = "https://github.com/Linuxfabrik/lib"
Documentation = "https://github.com/Linuxfabrik/lib/blob/master/README.md"
Source = "https://github.com/Linuxfabrik/lib"
Tracker = "https://github.com/Linuxfabrik/lib/issues"
Download = "https://github.com/Linuxfabrik/lib/releases"
[tool.ruff]
line-length = 88
target-version = 'py39'
[tool.ruff.lint]
select = [
'B', # flake8-bugbear (potential bugs)
'C4', # flake8-comprehensions
'E', # pycodestyle errors
'F', # pyflakes (logic errors)
'I', # isort (import sorting)
'RUF', # Ruff-specific rules
'SIM', # flake8-simplify
'UP', # pyupgrade (modernize syntax for py39+)
'W', # pycodestyle warnings
]
ignore = [
'E501', # line too long (handled by code review, not auto-enforcement)
'RUF002', # ambiguous Unicode in docstrings (typographic quotes from docs)
'RUF003', # ambiguous Unicode in comments (en dashes in ASCII art)
'SIM102', # nested if statements (sometimes clearer than combined conditions)
'SIM105', # contextlib.suppress (try/except/pass is more explicit)
'UP009', # UTF-8 encoding declaration (we keep our standard file header)
'UP015', # redundant open() mode (we keep explicit modes for clarity)
]
[tool.ruff.format]
docstring-code-format = true
quote-style = 'single'
[tool.bandit]
# B110 (try/except/pass) and B112 (try/except/continue): intentional patterns
# in lib for graceful degradation - cleanup errors must not crash callers.
# B311 (pseudo-random): lib uses `random` for non-cryptographic purposes only.
skips = ['B110', 'B112', 'B311']
[tool.bandit.assert_used]
# A test suite may assert with the bare statement, so B101 does not apply under
# tests/. bandit still scans the directory for every other finding.
# The first two patterns are the ones shared with the other Linuxfabrik repos, whose
# tests live in `tests/*.py`. This repository runs its suites as extension-less
# `unit-test/run` scripts, which neither pattern matches, so that layout is listed
# as well.
skips = ['*/tests/*.py', 'tests/*.py', '*/unit-test/run']
[tool.setuptools]
# packages are not in the root of the repository or do not correspond exactly to
# the directory structure, so we need to configure package_dir
# https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
package-dir = {'lib' = '.'}
# Declare the package explicitly. Without this, setuptools auto-discovery walks
# the repository root with followlinks=True. The per-module `tests/*/lib`
# symlinks point back to the root, so the walk recurses through them endlessly
# and the build hangs. There is a single flat `lib` package, so list it directly.
packages = ['lib']
[tool.vulture]
# The upstream hook runs with `pass_filenames: false` and expects the scope to be
# declared here. Without `paths` vulture is invoked with no argument at all and
# aborts, so the hook never actually analysed anything.
exclude = ['.tox/', 'build/', 'dist/']
min_confidence = 80
paths = ['.']