forked from albumentations-team/albumentations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
187 lines (176 loc) · 2.79 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"wheel",
]
[tool.ruff]
# Exclude a variety of commonly ignored directories.
target-version = "py38"
line-length = 120
indent-width = 4
# Assume Python 3.8
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"benchmark",
"buck-out",
"build",
"dist",
"node_modules",
"setup.py",
"site",
"site-packages",
"tests",
"tools",
"venv",
]
format.indent-style = "space"
# Like Black, respect magic trailing commas.
format.quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
format.line-ending = "auto"
format.skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
lint.select = [
"A",
"ANN",
"ARG",
"ASYNC",
"B",
"BLE",
"C4",
"C90",
"COM",
"CPY",
"D",
"DJ",
"DTZ",
"E",
"EM",
"ERA",
"EXE",
"F",
"FBT",
"FIX",
"FLY",
"FURB",
"G",
"I",
"ICN",
"INP",
"INT",
"ISC",
"LOG",
"N",
"NPY",
"PD",
"PERF",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"PYI",
"Q",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"SLF",
"SLOT",
"T10",
"T20",
"TCH",
"TD",
"TID",
"TRIO",
"TRY",
"UP",
"W",
"YTT",
]
lint.ignore = [
"A002",
"ANN101",
"ANN102",
"ANN204",
"ANN401",
"ARG001",
"ARG002",
"B008",
"B027",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D205",
"D415",
"EM101",
"EM102",
"F403",
"FBT001",
"FBT002",
"FBT003",
"G004",
"PLR0913",
"PTH123",
"S311",
"TRY003",
]
# Allow fix for all enabled rules (when `--fix`) is provided.
lint.explicit-preview-rules = true
lint.fixable = [
"ALL",
]
lint.unfixable = [
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Like Black, use double quotes for strings.
lint.pydocstyle.convention = "google"
[tool.mypy]
plugins = [
"pydantic.mypy",
]
python_version = "3.8"
ignore_missing_imports = true
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true