-
Notifications
You must be signed in to change notification settings - Fork 17
/
pyproject.toml
187 lines (175 loc) · 3.09 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
[build-system]
requires = [
"setuptools>=67.8",
"wheel",
]
[tool.cibuildwheel]
build-verbosity = "2"
build = [
"cp39-* cp310-* cp311-* cp312-* cp313-* pp39-* pp310-*",
]
skip = [
"cp36-* cp37-* cp38-* pp37-* pp38-*",
]
test-extras = "tests-min"
test-command = "pytest {project}"
before-test = [
"pip install --prefer-binary pillow",
"pip install --only-binary=:all: numpy || true",
"pip install pympler || true",
]
[tool.cibuildwheel.macos]
before-all = [
"brew install libjpeg little-cms2",
"brew uninstall --force --ignore-dependencies libheif aom",
"HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --formula {project}/libheif/macos/libheif.rb",
"HOMEBREW_PREFIX=$(brew --prefix)",
"REPAIR_LIBRARY_PATH=$HOMEBREW_PREFIX/lib",
]
repair-wheel-command = [
"DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel}",
"DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel -v --require-archs {delocate_archs} -w {dest_dir} {wheel}",
]
[tool.cibuildwheel.windows]
before-build = [
"pip install delvewheel",
]
[tool.black]
line-length = 120
target-version = [ "py39" ]
preview = true
[tool.ruff]
target-version = "py39"
line-length = 120
preview = true
lint.select = [
"A",
"B",
"C",
"D",
"E",
"F",
"FURB",
"G",
"I",
"PERF",
"PIE",
"Q",
"RET",
"RUF",
"S",
"SIM",
"UP",
"W",
]
lint.extend-ignore = [
"D105",
"D107",
"D203",
"D213",
"D401",
"E203",
"I001",
"RUF100",
]
lint.per-file-ignores."pillow_heif/__init__.py" = [
"F401",
]
lint.per-file-ignores."setup.py" = [
"S",
]
lint.extend-per-file-ignores."benchmarks/**/*.py" = [
"D",
"S404",
"S603",
]
lint.extend-per-file-ignores."docs/**/*.py" = [
"D",
]
lint.extend-per-file-ignores."examples/**/*.py" = [
"D",
"PERF",
]
lint.extend-per-file-ignores."libheif/**/*.py" = [
"D",
"PERF",
"S",
"SIM905",
]
lint.extend-per-file-ignores."tests/**/*.py" = [
"B009",
"D",
"E402",
"PERF",
"S",
"SIM115",
"UP",
]
lint.mccabe.max-complexity = 16
[tool.isort]
profile = "black"
[tool.pylint]
master.py-version = "3.8"
master.extension-pkg-allow-list = [
"_pillow_heif",
]
design.max-attributes = 14
design.max-branches = 16
design.max-locals = 18
design.max-returns = 8
similarities.min-similarity-lines = 6
basic.good-names = [
"a",
"b",
"c",
"d",
"e",
"f",
"i",
"j",
"k",
"v",
"ex",
"_",
"fp",
"im",
"HeifImagePlugin",
"AvifImagePlugin",
]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
messages_control.disable = [
"missing-class-docstring",
"missing-function-docstring",
"line-too-long",
]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
addopts = "-rs --color=yes"
[tool.coverage.run]
cover_pylib = true
include = [
"*/pillow_heif/*",
]
omit = [
"*/tests/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"DeprecationWarning",
"DEPRECATED",
]
[tool.mypy]
warn_unreachable = true
ignore_missing_imports = true
warn_no_return = true
strict_optional = true
show_error_codes = true