mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +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 (
|
if (
|
||||||
not isinstance(background, (list, tuple))
|
not isinstance(background, (list, tuple))
|
||||||
or len(background) != 4
|
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(
|
raise OSError(
|
||||||
"Background color is not an RGBA tuple clamped to (0-255): %s"
|
"Background color is not an RGBA tuple clamped to (0-255): %s"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user