From ac47b75953fde2eb1e6e3c9c182c279a74e7b8c3 Mon Sep 17 00:00:00 2001 From: Andreas Florath Date: Mon, 4 Dec 2023 10:27:30 +0100 Subject: [PATCH] Update src/PIL/ImageStat.py Simplification of return statement Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- src/PIL/ImageStat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PIL/ImageStat.py b/src/PIL/ImageStat.py index efef0802f..2de24b6c7 100644 --- a/src/PIL/ImageStat.py +++ b/src/PIL/ImageStat.py @@ -62,10 +62,7 @@ class Stat: if histogram[i]: res_max = i break - if res_max >= res_min: - return res_min, res_max - else: - return (255, 0) + return res_min, res_max v = [] for i in range(0, len(self.h), 256):