From c8d21c6a9e33aacf936c52e8f400bd909b043e1a Mon Sep 17 00:00:00 2001 From: toonn Date: Sat, 5 Feb 2022 19:03:54 +0100 Subject: img_display: Use `in` Pythonism --- ranger/ext/img_display.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index 43e4203d..61e10f96 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -643,7 +643,7 @@ class KittyImageDisplayer(ImageDisplayer, FileManagerAware): image = image.resize((int(scale * image.width), int(scale * image.height)), self.backend.LANCZOS) - if image.mode != 'RGB' and image.mode != 'RGBA': + if image.mode not in ('RGB', 'RGBA'): image = image.convert('RGB') # start_x += ((box[0] - image.width) // 2) // self.pix_row # start_y += ((box[1] - image.height) // 2) // self.pix_col -- cgit 1.4.1-2-gfad0