/
pyproject.toml
93 lines (84 loc) · 1.81 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
[tool.black]
line-length = 79
target-version = ['py38']
include = '\.pyi?$'
extend-exclude = '''
(
/(
migrations
)/
)
'''
[tool.isort]
profile = "black"
line_length = 79
lines_after_imports = 2
skip = ["f", ".tox", "migrations", ".venv", "venv"]
known_django = ["django"]
known_wagtail = ["wagtail"]
src_paths = ["cfgov"]
# Necessary due to the conflicting cfgov/jinja2 top-level template directory.
known_third_party = ["jinja2"]
sections = [
"STDLIB",
"DJANGO",
"WAGTAIL",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER"
]
[tool.bandit]
exclude_dirs = [
"*/tests/*",
"settings/local.py",
"settings/test.py",
]
skips = [
"B308",
"B703",
# Calls to requests.get() that don't include a timeout.
# TODO: We need to address those with relevant error handling of a timeout.
"B113",
]
[tool.ruff]
exclude = [
# These are directories that it's a waste of time to traverse
".git",
".tox",
".venv",
"config",
"develop-apps",
"docs",
"esbuild",
"requirements",
"node_modules",
"site",
"venv",
# And directories in cfgov that don't have python files to lint
"__pycache__",
"*/jinja2",
"cfgov/static_built",
"cfgov/templates",
"cfgov/unprocessed",
# Generated migration files will throw errors. We need to find a way
# to exclude django-generated migrations while including
# manually-written migrations.
"*/migrations/*.py",
# Our settings files might need to conform to different readability
# standards
"cfgov/cfgov/settings",
]
[tool.ruff.lint]
ignore = [
# Assigned Lambdas are fine.
"E731",
# B905 checks for a `strict=` parameter on calls to `zip()`, but that
# parameter isn't available on Python < 3.10.
"B905"
]
select = [
"E",
"F",
"W",
"B",
]