From 037f223debd0aabfab3e2aad880765764f973d31 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 3 Aug 2017 14:34:55 -0700 Subject: settings: do not store SettingsManager instance in __init__.py This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076 --- alot/widgets/globals.py | 2 +- alot/widgets/search.py | 2 +- alot/widgets/thread.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'alot/widgets') diff --git a/alot/widgets/globals.py b/alot/widgets/globals.py index 95b55465..6756149d 100644 --- a/alot/widgets/globals.py +++ b/alot/widgets/globals.py @@ -13,7 +13,7 @@ import operator import urwid from ..helper import string_decode -from ..settings import settings +from ..settings.const import settings from ..db.attachment import Attachment from ..errors import CompletionError diff --git a/alot/widgets/search.py b/alot/widgets/search.py index 32a078c7..905887cc 100644 --- a/alot/widgets/search.py +++ b/alot/widgets/search.py @@ -8,7 +8,7 @@ from __future__ import absolute_import import urwid -from ..settings import settings +from ..settings.const import settings from ..helper import shorten_author_string from .utils import AttrFlipWidget from .globals import TagWidget diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 1635d52d..31b89e9b 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -12,7 +12,7 @@ from urwidtrees import Tree, SimpleTree, CollapsibleTree from .globals import TagWidget from .globals import AttachmentWidget -from ..settings import settings +from ..settings.const import settings from ..db.utils import decode_header, X_SIGNATURE_MESSAGE_HEADER from ..db.utils import extract_body -- cgit v1.2.3