From c3b814a15f571ac84a8ce0719d7fd88acf814caf Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 10 May 2021 21:02:28 -0700 Subject: [PATCH] move imports to the top --- jc/cli.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jc/cli.py b/jc/cli.py index c188e518..1d1ac157 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -14,6 +14,9 @@ import subprocess import json import jc import jc.appdirs as appdirs +import jc.utils +import jc.tracebackplus + # make pygments import optional try: import pygments @@ -475,8 +478,6 @@ def run_user_command(command): def main(): - import jc.utils - # break on ctrl-c keyboard interrupt signal.signal(signal.SIGINT, ctrlc) @@ -539,7 +540,6 @@ def main(): sys.exit(0) if verbose_debug: - import jc.tracebackplus jc.tracebackplus.enable(context=11) if sys.stdin.isatty() and magic_stdout is None: @@ -575,7 +575,6 @@ def main(): if debug: raise else: - import jc.utils jc.utils.error_message( f'{parser_name} parser could not parse the input data. Did you use the correct parser?\n' ' For details use the -d or -dd option. Use "jc -h" for help.')