File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,17 +112,23 @@ def __init__(
112112 "System`" ,
113113 "Global`" ,
114114 )
115+
116+ # Importing "mathics.format" populates the Symbol of the
117+ # PrintForms and OutputForms sets.
118+ #
119+ # If "importlib" is used instead of "import", then we get:
120+ # TypeError: boxes_to_text() takes 1 positional argument but
121+ # 2 were given
122+ # Rocky: this smells of something not quite right in terms of
123+ # modularity.
124+
125+ import mathics .format # noqa
126+
115127 self .printforms = list (PrintForms )
116128 self .outputforms = list (OutputForms )
117129 self .trace_evaluation = False
118130 self .timing_trace_evaluation = False
119131
120- # This loads all the formatting functions.
121- # It needs to be early because it can be used in
122- # messages during the builtins loading.
123- # Rocky: this smells of something not quite right in terms of modularity.
124- import mathics .format
125-
126132 if add_builtin :
127133 from mathics .builtin import modules , contribute
128134 from mathics .settings import ROOT_DIR
You can’t perform that action at this time.
0 commit comments