mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-11 17:56:18 +03:00
Simplified code
This commit is contained in:
parent
56fa3c658a
commit
56c79b6f52
|
@ -128,16 +128,7 @@ class GimpGradientFile(GradientFile):
|
||||||
|
|
||||||
count = int(line)
|
count = int(line)
|
||||||
|
|
||||||
gradient: list[
|
self.gradient = []
|
||||||
tuple[
|
|
||||||
float,
|
|
||||||
float,
|
|
||||||
float,
|
|
||||||
list[float],
|
|
||||||
list[float],
|
|
||||||
Callable[[float, float], float],
|
|
||||||
]
|
|
||||||
] = []
|
|
||||||
|
|
||||||
for i in range(count):
|
for i in range(count):
|
||||||
s = fp.readline().split()
|
s = fp.readline().split()
|
||||||
|
@ -155,6 +146,4 @@ class GimpGradientFile(GradientFile):
|
||||||
msg = "cannot handle HSV colour space"
|
msg = "cannot handle HSV colour space"
|
||||||
raise OSError(msg)
|
raise OSError(msg)
|
||||||
|
|
||||||
gradient.append((x0, x1, xm, rgb0, rgb1, segment))
|
self.gradient.append((x0, x1, xm, rgb0, rgb1, segment))
|
||||||
|
|
||||||
self.gradient = gradient
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user