-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (143 loc) · 4.42 KB
/
pyproject.toml
File metadata and controls
160 lines (143 loc) · 4.42 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[project]
name = "os-autoinst-scripts"
dynamic = ["version"]
description = "Collection of scripts for os-autoinst and openQA"
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
authors = [
{ name = "SUSE LLC" },
]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"httpx",
"requests",
"sh",
"pynetbox",
"tenacity",
"typer",
]
[tool.setuptools]
packages = []
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"pytest-mock",
"coverage",
"radon",
"ruff",
"vulture",
"ty>=0.0.21",
]
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
branch = true
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = true
[tool.ruff]
line-length = 120
preview = true
[tool.ruff.lint]
# E, F: Standard pycodestyle and Pyflakes (default flake8)
# D: pydocstyle (for D100, D101, etc.)
# Q: flake8-quotes (for Q000)
# PL: Pylint
extend-select =[
"E", "F", "D", "Q", "PL",
"T100", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"T2", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
"TD", # https://docs.astral.sh/ruff/rules/#flake8-todos-td
"W",
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"ERA",
"B",
"SIM",
"C4",
"T10",
"FIX",
"ISC",
"ICN",
"INP",
"PIE",
"T20",
"RSE",
"RET",
"SLF",
"FURB",
"EXE",
"BLE",
"A",
"DTZ",
"LOG",
"G",
"C90",
"PERF",
"PGH",
"ARG",
"RUF",
"ANN",
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
"FBT", # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
"TRY", # https://docs.astral.sh/ruff/rules/#tryceratops-try
"DOC", # https://docs.astral.sh/ruff/rules/#pydoclint-doc
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
"ASYNC", # https://docs.astral.sh/ruff/rules/#flake8-async-async
"COM", # https://docs.astral.sh/ruff/rules/#flake8-commas-com
"CPY", # https://docs.astral.sh/ruff/rules/#flake8-copyright-cpy
"EM", # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
"INT", # https://docs.astral.sh/ruff/rules/#flake8-gettext-int
"PYI", # https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
"PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
"SLOT", # https://docs.astral.sh/ruff/rules/#flake8-slots-slot
"TID", # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
"TC", # https://docs.astral.sh/ruff/rules/#flake8-type-checking-tc
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"FLY", # https://docs.astral.sh/ruff/rules/#flynt-fly
"NPY", # https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
"PD", # https://docs.astral.sh/ruff/rules/#pandas-vet-pd
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
"PLE", # https://docs.astral.sh/ruff/rules/#error-ple
"PLR", # https://docs.astral.sh/ruff/rules/#refactor-plr
"PLW", # https://docs.astral.sh/ruff/rules/#warning-plw
"FA", # https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
ignore = [
"D203", # incorrect-blank-line-before-class
"PLC1802", # use-implicit-booleaness-not-len
"D213", # multi-line-summary-second-line
"PLR0904", # too-many-public-methods
"DOC201", # docstring-missing-returns
"DOC501", # docstring-missing-exception
"COM812", # missing-trailing-comma
]
[tool.ruff.lint.mccabe]
max-complexity = 9
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["PLR2004", "ANN401", "PLR0913", "S101", "S105", "S106", "PLR0917", "D103"]
[tool.ruff.format]
# Enable reformatting of code snippets in docstrings.
docstring-code-format = true
[tool.ty.analysis]
allowed-unresolved-imports = ["netsnmp"]
[tool.ruff.lint.flake8-copyright]
author = "SUSE LLC"
notice-rgx = "Copyright"
[tool.ty.rules]
# sh uses __getattr__ to dynamically wrap system commands (e.g. ping), so its
# members are not statically resolvable. netsnmp is a C extension installed as
# a system package (python3-netsnmp) and has no stubs available on PyPI.
unresolved-import = "ignore"
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"os.system".msg = "Use `subprocess.run` or `sh` library instead."
"subprocess.call".msg = "Use `subprocess.run` with `check=True`."
[tool.ty.terminal]
error-on-warning = true