mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Simplify chained comparison
This commit is contained in:
parent
935bdfa516
commit
74ccda3aff
|
@ -222,7 +222,7 @@ def _save_all(im, fp, filename):
|
|||
if (
|
||||
not isinstance(background, (list, tuple))
|
||||
or len(background) != 4
|
||||
or not all(v >= 0 and v < 256 for v in background)
|
||||
or not all(0 <= v < 256 for v in background)
|
||||
):
|
||||
raise OSError(
|
||||
"Background color is not an RGBA tuple clamped to (0-255): %s"
|
||||
|
|
Loading…
Reference in New Issue
Block a user