Added type hints by radarhere · Pull Request #8319 · python-pillow/Pillow

These ignores are to prevent

src/PIL/Image.py:1939: error: Argument 1 to "_getscaleoffset" has incompatible type "Union[Callable[[int], float], Callable[[_E], Union[_E, float]]]";
expected "Callable[[_E], Union[_E, float]]" [arg-type]
scale, offset = _getscaleoffset(lut)
^~~
src/PIL/Image.py:1942: error: Argument 1 has incompatible type "int"; expected "_E" [arg-type]
flatLut = [lut(i) for i in range(256)] * self.im.bands

It is because Callable[[_E], _E | float] is for the first line, and Callable[[int], float] is for the second line, and I don't think there's an elegant way to differentiate the values.