diff --git a/Tests/test_imagemath_lambda_eval.py b/Tests/test_imagemath_lambda_eval.py index 3915e64aae1..5769c903e49 100644 --- a/Tests/test_imagemath_lambda_eval.py +++ b/Tests/test_imagemath_lambda_eval.py @@ -1,7 +1,5 @@ from __future__ import annotations -import pytest - from PIL import Image, ImageMath diff --git a/src/PIL/ImageMath.py b/src/PIL/ImageMath.py index 2ffebbe71c5..5d83929dc0a 100644 --- a/src/PIL/ImageMath.py +++ b/src/PIL/ImageMath.py @@ -236,9 +236,11 @@ def imagemath_convert(self: _Operand, mode: str) -> _Operand: } -def lambda_eval(expression: Callable[[dict[str, Any]], Any], +def lambda_eval( + expression: Callable[[dict[str, Any]], Any], _dict: dict[str, Any] = {}, - **kw: Any,) -> Any: + **kw: Any, +) -> Any: """ Returns the result of an image function.