diff --git a/ctabus/__init__.py b/ctabus/__init__.py index 3461570..1455668 100644 --- a/ctabus/__init__.py +++ b/ctabus/__init__.py @@ -1,21 +1,22 @@ #!/usr/bin/python3 -from dateutil.parser import parse as date_parse from dateutil import tz +from dateutil.parser import parse as date_parse + import argparse import datetime import os +import os.path as osp import re +import shutil import socket -import time -import urllib import subprocess -import os.path as osp import sys -import shutil +import time +import urllib +from ctabus import fetch from ctabus.internal.config import log_dir from ctabus.internal.disk_cache import disk_cache, make_key -from ctabus import fetch HAS_TOAST = shutil.which('termux-toast') is not None CHICAGO_TZ = tz.gettz("America/Chicago") diff --git a/ctabus/fetch.py b/ctabus/fetch.py index 3dd74c3..a8ddf94 100644 --- a/ctabus/fetch.py +++ b/ctabus/fetch.py @@ -2,8 +2,8 @@ import json from urllib.parse import urlencode from urllib.request import urlopen -from ctabus.internal.disk_cache import disk_cache from ctabus.internal.config import API_KEY as api +from ctabus.internal.disk_cache import disk_cache def get_data(type, api_key=api, timeout=None, **args): diff --git a/ctabus/internal/disk_cache.py b/ctabus/internal/disk_cache.py index db5960f..597a726 100644 --- a/ctabus/internal/disk_cache.py +++ b/ctabus/internal/disk_cache.py @@ -1,6 +1,7 @@ -import pickle -import os import lzma +import os +import pickle + from ctabus.internal.config import cache_dir diff --git a/ctabus/internal/print2d.py b/ctabus/internal/print2d.py index 2a53ac6..e76fe8c 100644 --- a/ctabus/internal/print2d.py +++ b/ctabus/internal/print2d.py @@ -3,8 +3,8 @@ import os import sys from pydoc import pipepager, tempfilepager, plainpager, plain -from terminaltables.terminal_io import terminal_size from terminaltables import AsciiTable +from terminaltables.terminal_io import terminal_size from textwrap import fill diff --git a/ctabus/internal/search.py b/ctabus/internal/search.py index 1495bd4..26a68ca 100644 --- a/ctabus/internal/search.py +++ b/ctabus/internal/search.py @@ -1,5 +1,5 @@ -import re import json +import re import edlib