From 4a4b2a0ce9be8d7dd7a4904f461f967a5c62eb61 2017-09-20 09:12:17 From: Thomas Kluyver Date: 2017-09-20 09:12:17 Subject: [PATCH] Change some if -> elif in display Image code --- diff --git a/IPython/core/display.py b/IPython/core/display.py index e45f32a..3f97269 100644 --- a/IPython/core/display.py +++ b/IPython/core/display.py @@ -1098,9 +1098,9 @@ class Image(DisplayObject): if ext is not None: if ext == u'jpg' or ext == u'jpeg': format = self._FMT_JPEG - if ext == u'png': + elif ext == u'png': format = self._FMT_PNG - if ext == u'gif': + elif ext == u'gif': format = self._FMT_GIF else: format = ext.lower()