Skip to content

Commit 9df95e7

Browse files
authored
Merge pull request #4671 from radarhere/lint
Updated flake8 to 3.8.2
2 parents 61a35f9 + ec9015b commit 9df95e7

7 files changed

Lines changed: 75 additions & 75 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
types: []
1010

1111
- repo: https://gitlab.com/pycqa/flake8
12-
rev: 3.7.9
12+
rev: 3.8.2
1313
hooks:
1414
- id: flake8
1515
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]

Tests/test_font_pcf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def test_textsize(request, tmp_path):
6868
(dx, dy) = font.getsize(chr(i))
6969
assert dy == 20
7070
assert dx in (0, 10)
71-
for l in range(len(message)):
72-
msg = message[: l + 1]
71+
for i in range(len(message)):
72+
msg = message[: i + 1]
7373
assert font.getsize(msg) == (len(msg) * 10, 20)
7474

7575

Tests/test_font_pcf_charsets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def _test_textsize(request, tmp_path, encoding):
103103
assert dy == 20
104104
assert dx in (0, 10)
105105
message = charsets[encoding]["message"].encode(encoding)
106-
for l in range(len(message)):
107-
msg = message[: l + 1]
106+
for i in range(len(message)):
107+
msg = message[: i + 1]
108108
assert font.getsize(msg) == (len(msg) * 10, 20)
109109

110110

Tests/test_image_filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_consistency_3x3():
117117
# fmt: off
118118
(-1, -1, 0,
119119
-1, 0, 1,
120-
0, 1, 1),
120+
0, 1, 1),
121121
# fmt: on
122122
0.3,
123123
)
@@ -141,7 +141,7 @@ def test_consistency_5x5():
141141
-1, -1, -1, 0, 1,
142142
-1, -1, 0, 1, 1,
143143
-1, 0, 1, 1, 1,
144-
0, 1, 1, 1, 1),
144+
0, 1, 1, 1, 1),
145145
# fmt: on
146146
0.3,
147147
)

Tests/test_imagecms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ def create_test_image():
486486
# fmt: off
487487
nine_grid_deltas = [ # noqa: E131
488488
(-1, -1), (-1, 0), (-1, 1),
489-
(0, -1), (0, 0), (0, 1),
490-
(1, -1), (1, 0), (1, 1),
489+
(0, -1), (0, 0), (0, 1),
490+
(1, -1), (1, 0), (1, 1),
491491
]
492492
# fmt: on
493493
chans = []

src/PIL/JpegPresets.py

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@
112112
]},
113113
'web_high': {'subsampling': 0, # "4:4:4"
114114
'quantization': [
115-
[6, 4, 4, 6, 9, 11, 12, 16,
116-
4, 5, 5, 6, 8, 10, 12, 12,
117-
4, 5, 5, 6, 10, 12, 14, 19,
118-
6, 6, 6, 11, 12, 15, 19, 28,
119-
9, 8, 10, 12, 16, 20, 27, 31,
115+
[6, 4, 4, 6, 9, 11, 12, 16,
116+
4, 5, 5, 6, 8, 10, 12, 12,
117+
4, 5, 5, 6, 10, 12, 14, 19,
118+
6, 6, 6, 11, 12, 15, 19, 28,
119+
9, 8, 10, 12, 16, 20, 27, 31,
120120
11, 10, 12, 15, 20, 27, 31, 31,
121121
12, 12, 14, 19, 27, 31, 31, 31,
122122
16, 12, 19, 28, 31, 31, 31, 31],
123-
[7, 7, 13, 24, 26, 31, 31, 31,
124-
7, 12, 16, 21, 31, 31, 31, 31,
123+
[7, 7, 13, 24, 26, 31, 31, 31,
124+
7, 12, 16, 21, 31, 31, 31, 31,
125125
13, 16, 17, 31, 31, 31, 31, 31,
126126
24, 21, 31, 31, 31, 31, 31, 31,
127127
26, 31, 31, 31, 31, 31, 31, 31,
@@ -131,18 +131,18 @@
131131
]},
132132
'web_very_high': {'subsampling': 0, # "4:4:4"
133133
'quantization': [
134-
[2, 2, 2, 2, 3, 4, 5, 6,
135-
2, 2, 2, 2, 3, 4, 5, 6,
136-
2, 2, 2, 2, 4, 5, 7, 9,
137-
2, 2, 2, 4, 5, 7, 9, 12,
138-
3, 3, 4, 5, 8, 10, 12, 12,
139-
4, 4, 5, 7, 10, 12, 12, 12,
140-
5, 5, 7, 9, 12, 12, 12, 12,
141-
6, 6, 9, 12, 12, 12, 12, 12],
142-
[3, 3, 5, 9, 13, 15, 15, 15,
143-
3, 4, 6, 11, 14, 12, 12, 12,
144-
5, 6, 9, 14, 12, 12, 12, 12,
145-
9, 11, 14, 12, 12, 12, 12, 12,
134+
[2, 2, 2, 2, 3, 4, 5, 6,
135+
2, 2, 2, 2, 3, 4, 5, 6,
136+
2, 2, 2, 2, 4, 5, 7, 9,
137+
2, 2, 2, 4, 5, 7, 9, 12,
138+
3, 3, 4, 5, 8, 10, 12, 12,
139+
4, 4, 5, 7, 10, 12, 12, 12,
140+
5, 5, 7, 9, 12, 12, 12, 12,
141+
6, 6, 9, 12, 12, 12, 12, 12],
142+
[3, 3, 5, 9, 13, 15, 15, 15,
143+
3, 4, 6, 11, 14, 12, 12, 12,
144+
5, 6, 9, 14, 12, 12, 12, 12,
145+
9, 11, 14, 12, 12, 12, 12, 12,
146146
13, 14, 12, 12, 12, 12, 12, 12,
147147
15, 12, 12, 12, 12, 12, 12, 12,
148148
15, 12, 12, 12, 12, 12, 12, 12,
@@ -189,8 +189,8 @@
189189
'medium': {'subsampling': 2, # "4:2:0"
190190
'quantization': [
191191
[12, 8, 8, 12, 17, 21, 24, 17,
192-
8, 9, 9, 11, 15, 19, 12, 12,
193-
8, 9, 10, 12, 19, 12, 12, 12,
192+
8, 9, 9, 11, 15, 19, 12, 12,
193+
8, 9, 10, 12, 19, 12, 12, 12,
194194
12, 11, 12, 21, 12, 12, 12, 12,
195195
17, 15, 19, 12, 12, 12, 12, 12,
196196
21, 19, 12, 12, 12, 12, 12, 12,
@@ -207,16 +207,16 @@
207207
]},
208208
'high': {'subsampling': 0, # "4:4:4"
209209
'quantization': [
210-
[6, 4, 4, 6, 9, 11, 12, 16,
211-
4, 5, 5, 6, 8, 10, 12, 12,
212-
4, 5, 5, 6, 10, 12, 12, 12,
213-
6, 6, 6, 11, 12, 12, 12, 12,
214-
9, 8, 10, 12, 12, 12, 12, 12,
210+
[6, 4, 4, 6, 9, 11, 12, 16,
211+
4, 5, 5, 6, 8, 10, 12, 12,
212+
4, 5, 5, 6, 10, 12, 12, 12,
213+
6, 6, 6, 11, 12, 12, 12, 12,
214+
9, 8, 10, 12, 12, 12, 12, 12,
215215
11, 10, 12, 12, 12, 12, 12, 12,
216216
12, 12, 12, 12, 12, 12, 12, 12,
217217
16, 12, 12, 12, 12, 12, 12, 12],
218-
[7, 7, 13, 24, 20, 20, 17, 17,
219-
7, 12, 16, 14, 14, 12, 12, 12,
218+
[7, 7, 13, 24, 20, 20, 17, 17,
219+
7, 12, 16, 14, 14, 12, 12, 12,
220220
13, 16, 14, 14, 12, 12, 12, 12,
221221
24, 14, 14, 12, 12, 12, 12, 12,
222222
20, 14, 12, 12, 12, 12, 12, 12,
@@ -226,18 +226,18 @@
226226
]},
227227
'maximum': {'subsampling': 0, # "4:4:4"
228228
'quantization': [
229-
[2, 2, 2, 2, 3, 4, 5, 6,
230-
2, 2, 2, 2, 3, 4, 5, 6,
231-
2, 2, 2, 2, 4, 5, 7, 9,
232-
2, 2, 2, 4, 5, 7, 9, 12,
233-
3, 3, 4, 5, 8, 10, 12, 12,
234-
4, 4, 5, 7, 10, 12, 12, 12,
235-
5, 5, 7, 9, 12, 12, 12, 12,
236-
6, 6, 9, 12, 12, 12, 12, 12],
237-
[3, 3, 5, 9, 13, 15, 15, 15,
238-
3, 4, 6, 10, 14, 12, 12, 12,
239-
5, 6, 9, 14, 12, 12, 12, 12,
240-
9, 10, 14, 12, 12, 12, 12, 12,
229+
[2, 2, 2, 2, 3, 4, 5, 6,
230+
2, 2, 2, 2, 3, 4, 5, 6,
231+
2, 2, 2, 2, 4, 5, 7, 9,
232+
2, 2, 2, 4, 5, 7, 9, 12,
233+
3, 3, 4, 5, 8, 10, 12, 12,
234+
4, 4, 5, 7, 10, 12, 12, 12,
235+
5, 5, 7, 9, 12, 12, 12, 12,
236+
6, 6, 9, 12, 12, 12, 12, 12],
237+
[3, 3, 5, 9, 13, 15, 15, 15,
238+
3, 4, 6, 10, 14, 12, 12, 12,
239+
5, 6, 9, 14, 12, 12, 12, 12,
240+
9, 10, 14, 12, 12, 12, 12, 12,
241241
13, 14, 12, 12, 12, 12, 12, 12,
242242
15, 12, 12, 12, 12, 12, 12, 12,
243243
15, 12, 12, 12, 12, 12, 12, 12,

src/PIL/PalmImagePlugin.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030
(102, 255, 204), (102, 204, 204), (102, 153, 204), (102, 102, 204),
3131
(102, 51, 204), (102, 0, 204), (102, 255, 153), (102, 204, 153),
3232
(102, 153, 153), (102, 102, 153), (102, 51, 153), (102, 0, 153),
33-
(51, 255, 255), (51, 204, 255), (51, 153, 255), (51, 102, 255),
34-
(51, 51, 255), (51, 0, 255), (51, 255, 204), (51, 204, 204),
35-
(51, 153, 204), (51, 102, 204), (51, 51, 204), (51, 0, 204),
36-
(51, 255, 153), (51, 204, 153), (51, 153, 153), (51, 102, 153),
37-
(51, 51, 153), (51, 0, 153), (0, 255, 255), (0, 204, 255),
38-
(0, 153, 255), (0, 102, 255), (0, 51, 255), (0, 0, 255),
39-
(0, 255, 204), (0, 204, 204), (0, 153, 204), (0, 102, 204),
40-
(0, 51, 204), (0, 0, 204), (0, 255, 153), (0, 204, 153),
41-
(0, 153, 153), (0, 102, 153), (0, 51, 153), (0, 0, 153),
33+
(51, 255, 255), (51, 204, 255), (51, 153, 255), (51, 102, 255),
34+
(51, 51, 255), (51, 0, 255), (51, 255, 204), (51, 204, 204),
35+
(51, 153, 204), (51, 102, 204), (51, 51, 204), (51, 0, 204),
36+
(51, 255, 153), (51, 204, 153), (51, 153, 153), (51, 102, 153),
37+
(51, 51, 153), (51, 0, 153), (0, 255, 255), (0, 204, 255),
38+
(0, 153, 255), (0, 102, 255), (0, 51, 255), (0, 0, 255),
39+
(0, 255, 204), (0, 204, 204), (0, 153, 204), (0, 102, 204),
40+
(0, 51, 204), (0, 0, 204), (0, 255, 153), (0, 204, 153),
41+
(0, 153, 153), (0, 102, 153), (0, 51, 153), (0, 0, 153),
4242
(255, 255, 102), (255, 204, 102), (255, 153, 102), (255, 102, 102),
4343
(255, 51, 102), (255, 0, 102), (255, 255, 51), (255, 204, 51),
4444
(255, 153, 51), (255, 102, 51), (255, 51, 51), (255, 0, 51),
@@ -57,25 +57,25 @@
5757
(102, 255, 51), (102, 204, 51), (102, 153, 51), (102, 102, 51),
5858
(102, 51, 51), (102, 0, 51), (102, 255, 0), (102, 204, 0),
5959
(102, 153, 0), (102, 102, 0), (102, 51, 0), (102, 0, 0),
60-
(51, 255, 102), (51, 204, 102), (51, 153, 102), (51, 102, 102),
61-
(51, 51, 102), (51, 0, 102), (51, 255, 51), (51, 204, 51),
62-
(51, 153, 51), (51, 102, 51), (51, 51, 51), (51, 0, 51),
63-
(51, 255, 0), (51, 204, 0), (51, 153, 0), (51, 102, 0),
64-
(51, 51, 0), (51, 0, 0), (0, 255, 102), (0, 204, 102),
65-
(0, 153, 102), (0, 102, 102), (0, 51, 102), (0, 0, 102),
66-
(0, 255, 51), (0, 204, 51), (0, 153, 51), (0, 102, 51),
67-
(0, 51, 51), (0, 0, 51), (0, 255, 0), (0, 204, 0),
68-
(0, 153, 0), (0, 102, 0), (0, 51, 0), (17, 17, 17),
69-
(34, 34, 34), (68, 68, 68), (85, 85, 85), (119, 119, 119),
60+
(51, 255, 102), (51, 204, 102), (51, 153, 102), (51, 102, 102),
61+
(51, 51, 102), (51, 0, 102), (51, 255, 51), (51, 204, 51),
62+
(51, 153, 51), (51, 102, 51), (51, 51, 51), (51, 0, 51),
63+
(51, 255, 0), (51, 204, 0), (51, 153, 0), (51, 102, 0),
64+
(51, 51, 0), (51, 0, 0), (0, 255, 102), (0, 204, 102),
65+
(0, 153, 102), (0, 102, 102), (0, 51, 102), (0, 0, 102),
66+
(0, 255, 51), (0, 204, 51), (0, 153, 51), (0, 102, 51),
67+
(0, 51, 51), (0, 0, 51), (0, 255, 0), (0, 204, 0),
68+
(0, 153, 0), (0, 102, 0), (0, 51, 0), (17, 17, 17),
69+
(34, 34, 34), (68, 68, 68), (85, 85, 85), (119, 119, 119),
7070
(136, 136, 136), (170, 170, 170), (187, 187, 187), (221, 221, 221),
7171
(238, 238, 238), (192, 192, 192), (128, 0, 0), (128, 0, 128),
72-
(0, 128, 0), (0, 128, 128), (0, 0, 0), (0, 0, 0),
73-
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
74-
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
75-
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
76-
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
77-
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
78-
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0))
72+
(0, 128, 0), (0, 128, 128), (0, 0, 0), (0, 0, 0),
73+
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
74+
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
75+
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
76+
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
77+
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0),
78+
(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0))
7979
# fmt: on
8080

8181

0 commit comments

Comments
 (0)