Don't let module imports have side-effects.

The pretty printer module was inscribing the trace command as a side-
effect of importing it.
This commit is contained in:
Simon Forman
2020-12-19 23:53:04 -08:00
parent 5a2758b50d
commit 1cf82b8bcb
3 changed files with 8 additions and 12 deletions
+3 -3
View File
@@ -17,12 +17,12 @@
# You should have received a copy of the GNU General Public License
# along with Thun. If not see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
from .library import initialize
from .library import initialize, inscribe
from .joy import repl
from .utils import pretty_print # Inscribe trace command.
from .utils.pretty_print import trace
inscribe(trace)
print('''\
Thun - Copyright © 2017 Simon Forman
This program comes with ABSOLUTELY NO WARRANTY; for details type "warranty".