diff --git a/mathics/builtin/box/graphics3d.py b/mathics/builtin/box/graphics3d.py index df8b53c67..03f3ac8ec 100644 --- a/mathics/builtin/box/graphics3d.py +++ b/mathics/builtin/box/graphics3d.py @@ -2,8 +2,6 @@ """ Boxing Symbols for 3D Graphics """ -# Docs are not yet ready for prime time. Maybe after release 6.0.0. -no_doc = True import json import numbers @@ -27,6 +25,9 @@ from mathics.core.symbols import Symbol, SymbolTrue from mathics.eval.nevaluator import eval_N +# Docs are not yet ready for prime time. Maybe after release 7.0.0. +no_doc = True + class Graphics3DBox(GraphicsBox): """ diff --git a/mathics/core/evaluation.py b/mathics/core/evaluation.py index a45b172f3..af4401a7e 100644 --- a/mathics/core/evaluation.py +++ b/mathics/core/evaluation.py @@ -471,7 +471,7 @@ def message(self, symbol_name: str, tag, *msgs) -> "Message": symbol_shortname = self.definitions.shorten_name(symbol) if settings.DEBUG_PRINT: - print("MESSAGE: %s::%s (%s)" % (symbol_shortname, tag, msgs)) + print(f"MESSAGE: {symbol_shortname}::{tag} ({msgs})") text = self.definitions.get_value(symbol, "System`Messages", pattern, self) if text is None: @@ -481,7 +481,7 @@ def message(self, symbol_name: str, tag, *msgs) -> "Message": ) if text is None: - text = String("Message %s::%s not found." % (symbol_shortname, tag)) + text = String(f"Message {symbol_shortname}::{tag} not found.") text = self.format_output( Expression(SymbolStringForm, text, *(from_python(arg) for arg in msgs)), @@ -587,8 +587,9 @@ def __init__(self, symbol: Union[Symbol, str], tag: str, text: str) -> None: use a string. tag: a short slug string that indicates the kind of message - In Django we need to use a string for symbol, since we need something that is JSON serializable - and a Mathics3 Symbol is not like this. + In Django we need to use a string for symbol, since we need + something that is JSON serializable and a Mathics3 Symbol is not + like this. """ super(Message, self).__init__() self.is_message = True # Why do we need this? @@ -607,7 +608,7 @@ def get_data(self): "message": True, "symbol": self.symbol, "tag": self.tag, - "prefix": "%s::%s" % (self.symbol, self.tag), + "prefix": f"{self.symbol}::{self.tag}", "text": self.text, } diff --git a/mathics/core/exceptions.py b/mathics/core/exceptions.py index 06a0e2ff3..e1c7cb179 100644 --- a/mathics/core/exceptions.py +++ b/mathics/core/exceptions.py @@ -1,4 +1,7 @@ # -*- coding: utf-8 -*- +""" +Various Exception objects used in Mathics3. +""" class BoxExpressionError(Exception): @@ -35,4 +38,7 @@ def __init__(self, *message): self._message = message def message(self, evaluation): + """ + Transfer this exception to evaluation's ``message`` method. + """ evaluation.message(*self._message) diff --git a/requirements-full.txt b/requirements-full.txt index 4514496f2..529cc51b7 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -5,4 +5,4 @@ psutil # SystemMemory and MemoryAvailable pyocr # Used for TextRecognize scikit-image >= 0.17 # FindMinimum can use this; used by Image as well unidecode # Used in Transliterate -wordcloud # Used in builtin/image.py by WordCloud() +wordcloud >= 1.9.3 # Used in builtin/image.py by WordCloud(). Previous versions assume "image.textsize" which no longer exists