generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 23
/
pyproject.toml
113 lines (103 loc) · 2.51 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
[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",
"dist",
"etc",
"local",
"ci",
"docs",
"man",
"share",
"samples",
".cache",
".settings",
"Include",
"include",
"Lib",
"lib",
"lib64",
"Lib64",
"Scripts",
"thirdparty",
"tmp",
"venv",
"tests/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 = 88
extend-exclude = ["migrations", "var"]
target-version = "py310"
[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",
"D203", # one-blank-line-before-class
"D205", # blank-line-after-summary
"D212", # multi-line-summary-first-line
"D400", # ends-in-period
"D415", # ends-in-punctuation
# TODO: we want to address these issues in the codebase, then get rid of
# the following ignores
"C901", # complex-structure
"E501", # line-too-long
"S101", # assert
"S103", # bad-file-permissions
"S113", # request-without-timeout
"S202", # tarfile-unsafe-members
"S314", # suspicious-xml-element-tree-usage
"S320", # suspicious-xmle-tree-usage
"S324", # hashlib-insecure-hash-function
"S506", # unsafe-yaml-load
"S602", # subprocess-popen-with-shell-equals-true
"E203",
"D200",
]
[tool.ruff.lint.isort]
force-single-line = true
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]
"**/testfiles/**.py" = ["F821"] # Ignore undefined names from test files
"matchcode_project/settings.py" = ["F403", "F405"] # Ignore undefined names from star imports and star imports
"purldb_public_project/settings.py" = ["F403", "F405"] # Ignore undefined names from star imports and star imports