From 902e3812a82cc3fd613305cd85ba45648bae4bb5 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 15 Feb 2022 21:45:35 +1100 Subject: [PATCH] Use ternary operator --- src/PIL/Image.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 2977cfd38..78149e091 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -203,10 +203,7 @@ ENCODERS = {} # -------------------------------------------------------------------- # Modes -if sys.byteorder == "little": - _ENDIAN = "<" -else: - _ENDIAN = ">" +_ENDIAN = "<" if sys.byteorder == "little" else ">" def _conv_type_shape(im):