Skip to content

Commit

Permalink
ImageStat: simplify if block
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Murray <[email protected]>
  • Loading branch information
nulano and radarhere authored Apr 16, 2024
1 parent 8b62538 commit 2e73bed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PIL/ImageStat.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def __init__(
"""
if isinstance(image_or_list, Image.Image):
self.h = image_or_list.histogram(mask)
else:
elif isinstance(image_or_list, list):
self.h = image_or_list
if not isinstance(self.h, list):
else:
msg = "first argument must be image or list" # type: ignore[unreachable]
raise TypeError(msg)
self.bands = list(range(len(self.h) // 256))
Expand Down

0 comments on commit 2e73bed

Please sign in to comment.