-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
131 lines (119 loc) · 4.07 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
[tool.poetry.scripts]
yardstick = "yardstick.cli.cli:cli"
[tool.poetry]
name = "yardstick"
version = "0.0.0" # note: this is automagically managed -- no need to manually change this
description = "Tool for comparing the results from vulnerability scanners"
authors = ["Alex Goodman <[email protected]>"]
license = "Apache 2.0"
exclude = [
"tests/**/*"
]
[tool.poetry.dependencies]
python = ">=3.11,<=3.13"
click = "^8"
dataclasses-json = "^0.6.7"
tabulate = "^0.9.0"
prompt-toolkit = "^3.0.48"
Pygments = "^2.18.0"
requests = "^2.32.3"
GitPython = "^3.1.43"
rfc3339 = "^6.2"
Colr = "^0.9.1"
omitempty = "^0.1.1"
importlib-metadata = ">=7.0.1,<9.0.0"
mergedeep = "^1.3.4"
dataclass-wizard = "^0.25.0"
PyYAML = ">= 6.0.0, < 7.0" # note: required for enterprise
[tool.poetry.group.dev.dependencies]
pytest-mock = "^3.14.0"
pytest = "^8.3.3"
black = "^24.10.0"
pre-commit = "^4.0.1"
mypy = "^1.13"
isort = "^5.13.2"
pylint = "^3.3.1"
autoflake = "^2.3"
tox = "^4.23.2"
ruff = "^0.7.2"
pytest-unordered = "^0.6.1"
pytest-sugar = "^1.0.0"
pytest-clarity = "^1.0.1"
pytest-cov = "^6.0.0"
pytest-picked = "^0.5.0"
pytest-xdist = "^3.6.1"
types-requests = "^2.32.0.20241016"
types-tabulate = "^0.9.0.20240106"
types-pyyaml = "^6.0.12.20240917"
types-pygments = "^2.18.0.20240506"
[build-system]
requires = ["poetry-core>=1.3.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry-dynamic-versioning]
enable = true
[tool.mypy]
check_untyped_defs = 0
ignore_missing_imports = 1
ignore_errors = 0
strict_optional = 0
warn_unused_ignores = 0
warn_redundant_casts = 1
warn_unused_configs = 1
[tool.pytest.ini_options]
cache_dir = ".cache/pytest"
[tool.ruff]
cache-dir = ".cache/ruff"
# allow for a wide-birth relative to what black will correct to
line-length = 150
[lint]
ignore = [
"ARG001", # unused args are ok, as they communicate intent in interfaces, even if not used in impls.
"ARG002", # unused args are ok, as they communicate intent in interfaces, even if not used in impls.
"G004", # it's ok to use formatted strings for logging
"PGH004", # no blanket "noqa" usage, can be improved over time, but not now
"PLR2004", # a little too agressive, not allowing any magic numbers
"PLW2901", # "Outer for loop variable X overwritten by inner assignment target", not useful in most cases
"RUF100", # no blanket "noqa" usage, can be improved over time, but not now
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` -- not compatible with python 3.9 (even with __future__ import)
"S603", # subprocess calls are common and necessary in this codebase
"S607", # we cannot rely on exact paths to all tools invoked for all users so must rely on PATH resolution
]
select = [
"A", # flake8-builtins
# "ANN", # flake8-annotations # this is great, but let mypy handle this so it can honor type:ignore comments without noqa comments too
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C", # mccabe
"C4", # flake8-comprehensions
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"E", # pycodestyle, errors
# "EM", # flake8-errmsg # seems to aggressive relative to the current codebase
# "ERA", # flake8-eradicate # not all code in comments should be removed
"EXE", # flake8-executable
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint (this can be broken down into more checks if needed)
"PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib # the codebase is not ready for this yet, but would be nice to add
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLF", # flakes8-self
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
# "TRY", # tryceratops # seems to aggressive relative to the current codebase
"UP", # pyupgrade
"W", # pycodestyle, warnings
"YTT", # flake8-2020
]