-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
144 lines (130 loc) · 3.23 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
136
137
138
139
140
141
142
143
144
[project]
name = "security-constraints"
description = "Fetches security vulnerabilities and creates pip-constraints based on them."
readme = "README.md"
authors = [
{name="Anton Vikström"}
]
license = {file = "LICENSE"}
urls = {repo = "https://github.com/mam-dev/security-constraints"}
requires-python = ">=3.9"
dependencies = [
"requests",
"pyyaml",
]
dynamic = ["version"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security",
"License :: OSI Approved :: Apache Software License",
]
[project.scripts]
security-constraints = "security_constraints.main:main"
[build-system]
requires = ["setuptools>=51", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.coverage.run]
branch = true
omit = [
"*/.venv/*",
"*/venv/*",
"test/*",
]
plugins = ["coverage_pyver_pragma"]
[tool.coverage.report]
show_missing = true
fail_under = 100
[tool.pytest.ini_options]
addopts = "--cov='security_constraints' --random-order"
minversion = "6.0"
usefixtures = ["requests_mock"]
testpaths = ["test"]
[tool.mypy]
files = ["src", "test"]
warn_no_return = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
check_untyped_defs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
no_implicit_reexport = true
strict_equality = true
extra_checks = true
[tool.ruff]
src = ["src", "test"]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"UP", # pyupgrade
"S", # flake8-bandit
"D", # pydocstyle
"PT", # flake8-pytest-style
"I", # isort
"RUF", # Ruff-specific rules
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"ISC", # flake8-implicit-str-concat
"INP", # flake8-no-pep420
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"ARG", # flake8-unused-arguments
"TRY", # tryceratops
"FLY", # flynt
"RSE", # flake8-raise
"RET", # flake8-return
"FIX", # flake8-fixme
"Q", # flake8-quotes
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
]
ignore = [
"D100", "D102", "D103", "D104", "D105", "D107",
"PTH123",
"TRY003", "TRY301",
"UP032",
"ISC001",
]
[tool.ruff.lint.per-file-ignores]
"test/**/*.py" = [
"S101", "S105",
"D103",
"FBT001",
"SLF001",
"PLR2004", "PLR0913",
"ARG001",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
parametrize-names-type = "csv"
parametrize-values-type = "list"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "parents"