mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-03 03:50:09 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
61b1eeb39f
commit
d0837bd36a
|
@ -51,7 +51,7 @@ def test_palette__has_correct_color_indexes():
|
|||
]
|
||||
|
||||
for i, color in enumerate(colors_in_test_palette):
|
||||
assert tuple(palette[i * 3: i * 3 + 3]) == color
|
||||
assert tuple(palette[i * 3 : i * 3 + 3]) == color
|
||||
|
||||
|
||||
def test_palette_counts_number_of_colors_in_file():
|
||||
|
|
|
@ -45,13 +45,12 @@ class GimpPaletteFile:
|
|||
if len(v) < 3:
|
||||
raise ValueError("bad palette entry")
|
||||
|
||||
palette[index * 3: index * 3 + 3] = v
|
||||
palette[index * 3 : index * 3 + 3] = v
|
||||
index += 1
|
||||
|
||||
self.palette = bytes(palette)
|
||||
self.n_colors = index
|
||||
|
||||
|
||||
def getpalette(self):
|
||||
|
||||
return self.palette, self.rawmode
|
||||
|
|
Loading…
Reference in New Issue
Block a user