-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
129 lines (114 loc) · 2.43 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
[build-system]
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 6"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
# this is used populated when creating a git archive
# and when there is .git dir and/or there is no git installed
fallback_version = "9999.$Format:%h-%cs$"
[tool.pytest.ini_options]
norecursedirs = [
".git",
"bin",
"dist",
"build",
"_build",
"etc",
"local",
"ci",
"docs",
"man",
"share",
"samples",
".cache",
".settings",
"Include",
"include",
"Lib",
"lib",
"lib64",
"Lib64",
"Scripts",
"thirdparty",
"tmp",
"venv",
".venv",
"tests/data",
"*/tests/test_data",
".eggs",
"src/*/data",
"tests/*/data"
]
python_files = "*.py"
python_classes = "Test"
python_functions = "test"
addopts = [
"-rfExXw",
"--strict-markers",
"--doctest-modules"
]
[tool.ruff]
line-length = 100
extend-exclude = []
target-version = "py310"
include = [
"pyproject.toml",
"src/**/*.py",
"etc/**/*.py",
"test/**/*.py",
"tests/**/*.py",
"doc/**/*.py",
"docs/**/*.py",
"*.py",
"."
]
# ignore test data and testfiles: they should never be linted nor formatted
exclude = [
# main style
"**/tests/data/**/*",
# scancode-toolkit
"**/tests/*/data/**/*",
# dejacode, purldb
"**/tests/testfiles/**/*",
# vulnerablecode, fetchcode
"**/tests/*/test_data/**/*",
"**/tests/test_data/**/*",
# django migrations
"**/migrations/**/*"
]
[tool.ruff.lint]
# Rules: https://docs.astral.sh/ruff/rules/
select = [
# "E", # pycodestyle
# "W", # pycodestyle warnings
"D", # pydocstyle
# "F", # Pyflakes
# "UP", # pyupgrade
# "S", # flake8-bandit
"I", # isort
# "C9", # McCabe complexity
]
ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415", "I001"]
[tool.ruff.lint.isort]
force-single-line = true
lines-after-imports = 1
default-section = "first-party"
known-first-party = ["src", "tests", "etc/scripts/**/*.py"]
known-third-party = ["click", "pytest"]
sections = { django = ["django"] }
section-order = [
"future",
"standard-library",
"django",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
# Place paths of files to be ignored by ruff here
"tests/*" = ["S101"]
"test_*.py" = ["S101"]
[tool.doc8]
ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"]
max-line-length=100