diff --git a/Tests/test_imagemath_lambda_eval.py b/Tests/test_imagemath_lambda_eval.py index 3915e64aa..5769c903e 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 2ffebbe71..5d83929dc 100644 --- a/src/PIL/ImageMath.py +++ b/src/PIL/ImageMath.py @@ -236,9 +236,11 @@ ops = { } -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.