diff --git a/src/sage/repl/rich_output/display_manager.py b/src/sage/repl/rich_output/display_manager.py index 282044046cb..d0051cdb025 100644 --- a/src/sage/repl/rich_output/display_manager.py +++ b/src/sage/repl/rich_output/display_manager.py @@ -24,14 +24,14 @@ The Sage display manager using the doctest backend """ -#***************************************************************************** +# **************************************************************************** # Copyright (C) 2015 Volker Braun # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ -#***************************************************************************** +# **************************************************************************** import warnings @@ -57,6 +57,7 @@ class DisplayException(Exception): """ pass + class OutputTypeException(DisplayException): """ Wrong Output container. @@ -78,6 +79,7 @@ class OutputTypeException(DisplayException): """ pass + class RichReprWarning(UserWarning): """ Warning that is throws if a call to ``_rich_repr_`` fails. @@ -540,7 +542,7 @@ def _preferred_text_formatter(self, obj, plain_text=None, **kwds): if type(plain_text) is not OutputPlainText: raise OutputTypeException('backend returned wrong output type, require PlainText') return plain_text - out = self._backend.plain_text_formatter(obj, **kwds) + out = self._backend.plain_text_formatter(obj, **kwds) if type(out) is not OutputPlainText: raise OutputTypeException('backend returned wrong output type, require PlainText') return out @@ -744,7 +746,7 @@ def threejs_scripts(self, online): """ if online: from sage.misc.package import installed_packages - version = installed_packages()['threejs'] + version = installed_packages()['threejs'].split('.')[0] return """ @@ -834,6 +836,4 @@ def display_immediately(self, obj, **rich_repr_kwds): self._backend.display_immediately(plain_text, rich_output) - - get_display_manager = DisplayManager.get_instance