diff --git a/.pylintrc b/.pylintrc index b260c0fd401..2303baed81d 100644 --- a/.pylintrc +++ b/.pylintrc @@ -652,5 +652,6 @@ min-public-methods=1 # Exceptions that will emit a warning when being caught. Defaults to # "BaseException, Exception". -overgeneral-exceptions=BaseException, - Exception +overgeneral-exceptions=BaseException,Exception + + diff --git a/python/grass/jupyter/map.py b/python/grass/jupyter/map.py index 013ff693470..261734404f5 100644 --- a/python/grass/jupyter/map.py +++ b/python/grass/jupyter/map.py @@ -188,9 +188,11 @@ def wrapper(**kwargs): def show(self): """Displays a PNG image of map""" # Lazy import to avoid an import-time dependency on IPython. - from IPython.display import Image # pylint: disable=import-outside-toplevel - - return Image(self._filename) + from IPython.display import ( + Image, + display, # pylint: disable=import-outside-toplevel + ) + display(Image(self._filename)) def save(self, filename): """Saves a PNG image of map to the specified *filename*""" diff --git a/python/grass/jupyter/map3d.py b/python/grass/jupyter/map3d.py index dd373f315a7..630be65e99e 100644 --- a/python/grass/jupyter/map3d.py +++ b/python/grass/jupyter/map3d.py @@ -232,6 +232,8 @@ def render(self, **kwargs): def show(self): """Displays a PNG image of map""" # Lazy import to avoid an import-time dependency on IPython. - from IPython.display import Image # pylint: disable=import-outside-toplevel - - return Image(self._filename) + from IPython.display import ( + Image, + display, + ) # pylint: disable=import-outside-toplevel + display(Image(self._filename))