Commit dfb0e5e
committed
Tell mypy what get_flattened_data returns for an RGB image
Pillow's stub types get_flattened_data() for every mode at once, so the
switch from getdata() in 329cea3 failed the typing contract. The image is
converted to RGB first, so the pixels are int triples; cast says so.1 parent d98911a commit dfb0e5e
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
0 commit comments