-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
113 lines (100 loc) · 2.82 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
[tool.poetry]
name = "scanner-registry-action"
version = "1.0.0"
description = "A GitHub Action to scan the Registry repository"
authors = []
packages = [{ include = "boostsec" }]
include = ["boostsec/registry_validator/py.typed"]
[tool.poetry.dependencies]
python = "^3.9"
PyYAML = "^6.0"
requests = "^2.28.1"
gql = {extras = ["requests"], version = "^3.4.0"}
typer = "^0.9.0"
pydantic = "^1.10.9"
[tool.poetry.extras]
testing = [
]
[tool.poetry.group.dev.dependencies]
bandit = "1.7.2" # https://github.com/tylerwince/flake8-bandit/issues/21
black = "^23.3.0"
coverage = "^6.2"
mypy = "^1.3.0"
pytest = "^7.0.1"
pytest-cov = "^4.0.0"
ruff = "^0.0.281"
requests-mock = "^1.10.0"
types-jsonschema = "^3.2.0"
types-PyYAML = "^6.0.11"
types-requests = "^2.28.10"
pydantic-factories = "^1.17.3"
[tool.black]
target-version = ['py39']
[tool.coverage.report]
omit = ["alembic/*"]
[tool.mypy]
namespace_packages=true
explicit_package_bases=true
strict=true
show_error_codes=true
plugins=[
"pydantic.mypy",
]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.ruff]
exclude = [".venv"]
select = [
"A", # flake8-builtins
#"ARG", # flake8-unused-arguments # TODO: re-enable
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"E", # pycodestyle
"ERA", # flake8-eradicate
"F", # Pyflakes
"G", # flake8-logging-format
"I", # isort
"N", # pep8-naming
"PT", # flake8-pytest-style
"RUF", # ruff
"S", # flake8-bandit
"W", # pycodestyle
]
ignore = [
"B904", # Raise without from inside except
"D104", # Missing docstring in public package
"D203", # 1 blank line required before class docstring (conflicts with D211)
"D213", # Multi-line docstring summary should start at the second line (conflicts with D212)
"G004", # Logging statement uses f-string
"N818", # exception name '...' should be named with an Error suffix
]
[tool.ruff.isort]
known-third-party = ["boostsec"]
known-first-party = ["boostsec.registry_validator"]
[tool.ruff.mccabe]
max-complexity = 7
[tool.ruff.pep8-naming]
classmethod-decorators = [
"classmethod",
"pydantic.validator",
"pydantic.root_validator"
]
[tool.ruff.per-file-ignores]
"tests/*" = [
"S101", # Use of `assert` detected
"S105", # Possible hardcoded password
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
[tool.pytest.ini_options]
minversion = "6.0"
# Disable anyio to avoid conflict and force asyncio to load before entrypoints
# https://docs.pytest.org/en/6.2.x/writing_plugins.html#plugin-discovery-order-at-tool-startup
addopts = ["-p", "no:anyio", "-p", "asyncio"]
testpaths = ["tests"]
asyncio_mode = "auto"