From d6f0f58a0aeaac32e96da87d9bde22746b3ca84c Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Sat, 12 Oct 2019 15:42:00 -0500 Subject: [PATCH] Moved all imports to the top of the file --- ctabus/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ctabus/__init__.py b/ctabus/__init__.py index 4d549ef..836c007 100644 --- a/ctabus/__init__.py +++ b/ctabus/__init__.py @@ -20,6 +20,8 @@ from ctabus import fetch from ctabus.internal.config import log_dir, recent_list from ctabus.internal.disk_cache import disk_cache, make_key from ctabus.internal.notification import NotificationManager, HAS_NOTIFICATION +from ctabus.internal.print2d import create_table, render_table +from ctabus.internal.search import Search, StopSearch HAS_TOAST = shutil.which("termux-toast") is not None CHICAGO_TZ = tz.gettz("America/Chicago") @@ -103,8 +105,6 @@ def pprint_delta(delta): class Table: - imported = False - def __init__(self, dicts): self.dicts = dicts self.display = None @@ -128,7 +128,6 @@ class Table: ] def get_index_interactive(self): - from ctabus.internal.print2d import create_table, render_table if self.display is None: raise Exception("Display columns not set") @@ -147,7 +146,6 @@ class Table: return which def get_name_interactive(self, data_column): - from ctabus.internal.print2d import create_table, render_table if self.display is None: raise Exception("Display columns not set") @@ -242,8 +240,6 @@ def show( def _picker(args): - # save on import time slightly - from ctabus.internal.search import Search, StopSearch # routes if not args.route: