-
Notifications
You must be signed in to change notification settings - Fork 58
/
pyproject.toml
123 lines (104 loc) · 3.46 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
[tool.mypy]
python_version = "3.10"
plugins = ["pydantic.mypy"]
strict = true
disallow_subclassing_any = false
disallow_untyped_decorators = false # Needed for FastAPI decorators
disallow_any_generics = false
disallow_untyped_calls = false
disallow_incomplete_defs = false
disallow_untyped_defs = false
no_implicit_reexport = false
warn_return_any = false
[[tool.mypy.overrides]]
# Following pydantic imports currently gives 2000 errors
module = ["pydantic.*"]
follow_imports = "skip"
[[tool.mypy.overrides]]
module = ["bytes.*", "cveapi.*"]
disallow_any_generics = true
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
no_implicit_reexport = true
[tool.setuptools_scm]
write_to = "_version.py"
[tool.vulture]
min_confidence = 90
exclude = ["/tests/", "*venv*", "rocky/tools/migrations"]
paths = ["."]
[tool.ruff]
fix = true
# Exclude a variety of commonly ignored directories.
extend-exclude = [
"__pycache__"
]
line-length = 120
# Support Python 3.10 and higher
target-version = "py310"
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint]
# Enable classic flake8, pyflakes, eradicate, and tidyimport
# To be extended with DJ, PT, RUF, C90, D, PL, RET
select = ["E", "F", "ERA", "W", "TID", "I", "G", "INP", "T20", "UP", "ISC", "PTH", "SIM", "PLC", "A", "S"]
ignore = [
"A003", # Built-in shadowing is usually not a problem and some built-ins have very generic names
"SIM103", # Creating long return statements is often less readable
"SIM108", # Ternary operator is not always more readable
"S101", # Assert use is normal in pytest tests
"S104", # Binding to all is normal in containers
"S105", # Disabled because of false positives
"S106", # Disabled because of false positives
"S308", # Mark_safe usage is okay
"S324", # Insecure hash functions can still be useful
"S603", # Disabled because of false positives
"S607", # Disabled because of false positives
]
# Add "Example" to allowed code comments
task-tags = ["Example", "todo", "TODO", "FIXME"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401","F403"]
"whitelist.py" = ["F821", "INP"]
"rocky/*/migrations/*.py" = ["E501"]
"octopoes/bits/check_csp_header/check_csp_header.py" = ["ERA001"]
"boefjes/boefjes/plugins/kat_binaryedge/http_web/normalize.py" = ["ERA001"]
"*/packaging/*" = ["INP"]
"*/.ci/*" = ["INP"]
"conf.py" = ["INP", "PTH", "A"]
"conftest.py" = ["INP"]
"setup.py" = ["INP"]
"manage.py" = ["INP"]
"*/tests/*" = ["T20"]
"boefjes/boefjes/plugins/*" = ["PTH"]
"boefjes/images/*" = ["INP001"]
"scripts/*.py" = ["INP001", "T201"]
"cveapi/cveapi.py" = ["INP001"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"rocky.settings".msg = "Use django.conf.settings"
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.codespell]
ignore-words-list = 'edn,juxt,assertIn'
[tool.poetry]
name = "openkat"
version = "0.0.1.dev1"
description = "OpenKAT Coordination package"
authors = ["MinVWS <[email protected]>"]
license = "EUPL"
readme = "README.rst"
[build-system]
requires = ["poetry-core>=1.0.0","setuptools>=65", "setuptools_scm[toml]>=7.1"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = "^3.10"
sphinx = "^8.1.3"
sphinx_rtd_theme = "^3.0.2"
sphinxcontrib-mermaid = "^1.0.0"
myst-parser = "^4.0.0"
settings-doc = "^4.3.1"
colorama = "0.4.6" # Required on all platforms, not just win32
autodoc-pydantic = "^2.2.0"
# Needed for settings-doc and autodoc
croniter = "^6.0.0"
jsonschema = "^4.17.0"