forked from cfpb/consumerfinance.gov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
116 lines (108 loc) · 2.2 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
[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", "wagtailsharing"]
known_first_party = [
"agreements",
"alerts",
"ask_cfpb",
"cfgov",
"core",
"data_research",
"deployable_zipfile",
"diversity_inclusion",
"form_explainer",
"hmda",
"housing_counselor",
"jobmanager",
"legacy",
"login",
"mega_menu",
"paying_for_college",
"permissions_viewer",
"prepaid_agreements",
"regulations3k",
"scripts",
"search",
"teachers_digital_platform",
"v1",
"wellbeing",
"youth_employment",
]
default_section = "THIRDPARTY"
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",
]
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",
]