From 1808e4963e7da1b18319fdca44866dc2a71c62a0 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 14 Jan 2017 11:46:11 +0100 Subject: Use absolute_imports from __future__ --- alot/__main__.py | 2 ++ alot/account.py | 2 ++ alot/addressbook/__init__.py | 2 ++ alot/addressbook/abook.py | 1 + alot/addressbook/external.py | 2 ++ alot/buffers.py | 2 ++ alot/commands/__init__.py | 2 ++ alot/commands/bufferlist.py | 2 ++ alot/commands/envelope.py | 2 ++ alot/commands/globals.py | 2 ++ alot/commands/search.py | 2 ++ alot/commands/taglist.py | 2 ++ alot/commands/thread.py | 2 ++ alot/commands/utils.py | 2 ++ alot/completion.py | 2 ++ alot/crypto.py | 2 ++ alot/db/__init__.py | 2 ++ alot/db/attachment.py | 2 ++ alot/db/envelope.py | 2 ++ alot/db/manager.py | 2 ++ alot/db/message.py | 2 ++ alot/db/thread.py | 2 ++ alot/db/utils.py | 2 ++ alot/helper.py | 2 ++ alot/settings/__init__.py | 2 ++ alot/settings/checks.py | 2 ++ alot/settings/manager.py | 2 ++ alot/settings/theme.py | 2 ++ alot/settings/utils.py | 2 ++ alot/ui.py | 2 ++ alot/utils/booleanaction.py | 2 ++ alot/walker.py | 2 ++ alot/widgets/bufferlist.py | 2 ++ alot/widgets/globals.py | 2 ++ alot/widgets/search.py | 2 ++ alot/widgets/thread.py | 2 ++ alot/widgets/utils.py | 2 ++ docs/source/api/conf.py | 1 + docs/source/conf.py | 1 + docs/source/generate_commands.py | 1 + docs/source/generate_configs.py | 1 + extra/colour_picker.py | 1 + tests/commands/init_test.py | 2 ++ tests/db/envelop_test.py | 1 + tests/db/thread_test.py | 1 + tests/helper_test.py | 1 + tests/settings/checks_test.py | 1 + 47 files changed, 84 insertions(+) diff --git a/alot/__main__.py b/alot/__main__.py index d68b5b87..8694311d 100644 --- a/alot/__main__.py +++ b/alot/__main__.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import argparse import logging import os diff --git a/alot/account.py b/alot/account.py index 5e66e9bf..7d57a94c 100644 --- a/alot/account.py +++ b/alot/account.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import abc import glob import logging diff --git a/alot/addressbook/__init__.py b/alot/addressbook/__init__.py index da0863f4..cda2d8bd 100644 --- a/alot/addressbook/__init__.py +++ b/alot/addressbook/__init__.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2015 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import re import abc diff --git a/alot/addressbook/abook.py b/alot/addressbook/abook.py index 207d8153..b620fbac 100644 --- a/alot/addressbook/abook.py +++ b/alot/addressbook/abook.py @@ -1,6 +1,7 @@ # Copyright (C) 2011-2015 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import import os from . import AddressBook diff --git a/alot/addressbook/external.py b/alot/addressbook/external.py index 5c88b291..6a89dd15 100644 --- a/alot/addressbook/external.py +++ b/alot/addressbook/external.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2015 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import re from ..helper import call_cmd diff --git a/alot/buffers.py b/alot/buffers.py index 8dcb7352..e2640d5d 100644 --- a/alot/buffers.py +++ b/alot/buffers.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import logging import os diff --git a/alot/commands/__init__.py b/alot/commands/__init__.py index 47315fc3..5df88747 100644 --- a/alot/commands/__init__.py +++ b/alot/commands/__init__.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import argparse import glob import logging diff --git a/alot/commands/bufferlist.py b/alot/commands/bufferlist.py index 73bd12a4..1a9bbdeb 100644 --- a/alot/commands/bufferlist.py +++ b/alot/commands/bufferlist.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from ..commands import Command, registerCommand from . import globals diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index d293a616..5082cc8f 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import argparse import datetime import email diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 396bc06b..f74a1662 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import argparse import code import email diff --git a/alot/commands/search.py b/alot/commands/search.py index 5fb8324a..f304973d 100644 --- a/alot/commands/search.py +++ b/alot/commands/search.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import argparse import logging diff --git a/alot/commands/taglist.py b/alot/commands/taglist.py index 1fa01369..5f90519f 100644 --- a/alot/commands/taglist.py +++ b/alot/commands/taglist.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from . import Command, registerCommand from .globals import SearchCommand diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 34256c05..e4334637 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import argparse import logging import mailcap diff --git a/alot/commands/utils.py b/alot/commands/utils.py index 3239f865..2d285f07 100644 --- a/alot/commands/utils.py +++ b/alot/commands/utils.py @@ -1,6 +1,8 @@ # Copyright (C) 2015 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import re import logging from twisted.internet.defer import inlineCallbacks, returnValue diff --git a/alot/completion.py b/alot/completion.py index 41d04b8d..082cae12 100644 --- a/alot/completion.py +++ b/alot/completion.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import abc import argparse import glob diff --git a/alot/crypto.py b/alot/crypto.py index dc9a0077..30de529f 100644 --- a/alot/crypto.py +++ b/alot/crypto.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import os from cStringIO import StringIO import gpgme diff --git a/alot/db/__init__.py b/alot/db/__init__.py index e3aded24..37da86e6 100644 --- a/alot/db/__init__.py +++ b/alot/db/__init__.py @@ -2,6 +2,8 @@ # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from .thread import Thread from .message import Message DB_ENC = 'UTF-8' diff --git a/alot/db/attachment.py b/alot/db/attachment.py index a1b7bc04..b35092e5 100644 --- a/alot/db/attachment.py +++ b/alot/db/attachment.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import os import tempfile import email.charset as charset diff --git a/alot/db/envelope.py b/alot/db/envelope.py index a2463e9c..2a67a79c 100644 --- a/alot/db/envelope.py +++ b/alot/db/envelope.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import glob import logging import os diff --git a/alot/db/manager.py b/alot/db/manager.py index 7f2cf7eb..6bbaca2f 100644 --- a/alot/db/manager.py +++ b/alot/db/manager.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from collections import deque import errno import logging diff --git a/alot/db/message.py b/alot/db/message.py index 049a3521..b553bce2 100644 --- a/alot/db/message.py +++ b/alot/db/message.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import email import email.charset as charset import functools diff --git a/alot/db/thread.py b/alot/db/thread.py index ca244d5f..619558b6 100644 --- a/alot/db/thread.py +++ b/alot/db/thread.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from datetime import datetime from .message import Message diff --git a/alot/db/utils.py b/alot/db/utils.py index acffe019..cdbd1a4a 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import os import email import email.charset as charset diff --git a/alot/helper.py b/alot/helper.py index b33c0125..5e957bea 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -2,6 +2,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from datetime import timedelta from datetime import datetime from collections import deque diff --git a/alot/settings/__init__.py b/alot/settings/__init__.py index b1449c29..11137d1d 100644 --- a/alot/settings/__init__.py +++ b/alot/settings/__init__.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from .manager import SettingsManager settings = SettingsManager() diff --git a/alot/settings/checks.py b/alot/settings/checks.py index 6f909524..125d1860 100644 --- a/alot/settings/checks.py +++ b/alot/settings/checks.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import mailbox import re from urwid import AttrSpec, AttrSpecError diff --git a/alot/settings/manager.py b/alot/settings/manager.py index 40a36c66..5e9727f8 100644 --- a/alot/settings/manager.py +++ b/alot/settings/manager.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import imp import os import re diff --git a/alot/settings/theme.py b/alot/settings/theme.py index 7c4dac15..c05a4db0 100644 --- a/alot/settings/theme.py +++ b/alot/settings/theme.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import os from .utils import read_config diff --git a/alot/settings/utils.py b/alot/settings/utils.py index 3b9f1ecc..3cdb51ad 100644 --- a/alot/settings/utils.py +++ b/alot/settings/utils.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + from configobj import ConfigObj, ConfigObjError, flatten_errors from validate import Validator from urwid import AttrSpec diff --git a/alot/ui.py b/alot/ui.py index 9d9e365a..7ac4ccc3 100644 --- a/alot/ui.py +++ b/alot/ui.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import logging import os import signal diff --git a/alot/utils/booleanaction.py b/alot/utils/booleanaction.py index 82fcedd2..4c9ce1ed 100644 --- a/alot/utils/booleanaction.py +++ b/alot/utils/booleanaction.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import argparse diff --git a/alot/walker.py b/alot/walker.py index feba99b6..11296473 100644 --- a/alot/walker.py +++ b/alot/walker.py @@ -1,6 +1,8 @@ # Copyright (C) 2011-2012 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file +from __future__ import absolute_import + import logging import urwid diff --git a/alot/widgets/bufferlist.py b/alot/widgets/bufferlist.py index 0ab315c5..4f9187be 100644 --- a/alot/widgets/bufferlist.py +++ b/alot/widgets/bufferlist.py @@ -5,6 +5,8 @@ """ Widgets specific to Bufferlist mode """ +from __future__ import absolute_import + import urwid diff --git a/alot/widgets/globals.py b/alot/widgets/globals.py index b4fae0c8..388ae76c 100644 --- a/alot/widgets/globals.py +++ b/alot/widgets/globals.py @@ -5,6 +5,8 @@ """ This contains alot-specific :class:`urwid.Widget` used in more than one mode. """ +from __future__ import absolute_import + import re import operator import urwid diff --git a/alot/widgets/search.py b/alot/widgets/search.py index d960e919..a0f23b5e 100644 --- a/alot/widgets/search.py +++ b/alot/widgets/search.py @@ -4,6 +4,8 @@ """ Widgets specific to search mode """ +from __future__ import absolute_import + import urwid from ..settings import settings diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 9b8d029d..10e5d59f 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -4,6 +4,8 @@ """ Widgets specific to thread mode """ +from __future__ import absolute_import + import logging import urwid from urwidtrees import Tree, SimpleTree, CollapsibleTree diff --git a/alot/widgets/utils.py b/alot/widgets/utils.py index 15a2c60b..86eb49b7 100644 --- a/alot/widgets/utils.py +++ b/alot/widgets/utils.py @@ -5,6 +5,8 @@ """ Utility Widgets not specific to alot """ +from __future__ import absolute_import + import urwid diff --git a/docs/source/api/conf.py b/docs/source/api/conf.py index 348a8b6e..101fce21 100644 --- a/docs/source/api/conf.py +++ b/docs/source/api/conf.py @@ -10,6 +10,7 @@ # # All configuration values have a default; values that are commented out # serve to show the default. +from __future__ import absolute_import import sys, os diff --git a/docs/source/conf.py b/docs/source/conf.py index 3f1e17ae..5ebab550 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # alot documentation build configuration file +from __future__ import absolute_import import sys, os diff --git a/docs/source/generate_commands.py b/docs/source/generate_commands.py index 0fd1fb01..19719544 100755 --- a/docs/source/generate_commands.py +++ b/docs/source/generate_commands.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import sys import os HERE = os.path.dirname(__file__) diff --git a/docs/source/generate_configs.py b/docs/source/generate_configs.py index b79f3f69..2b9cc806 100755 --- a/docs/source/generate_configs.py +++ b/docs/source/generate_configs.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import sys import os HERE = os.path.dirname(__file__) diff --git a/extra/colour_picker.py b/extra/colour_picker.py index badb494e..8c28a2ee 100755 --- a/extra/colour_picker.py +++ b/extra/colour_picker.py @@ -31,6 +31,7 @@ Palette test. Shows the available foreground and background settings in monochrome, 16 color, 88 color and 256 color modes. """ +from __future__ import absolute_import import re import sys diff --git a/tests/commands/init_test.py b/tests/commands/init_test.py index 189ffc8e..f5a37997 100644 --- a/tests/commands/init_test.py +++ b/tests/commands/init_test.py @@ -2,6 +2,8 @@ """Test suite for alot.commands.__init__ module.""" +from __future__ import absolute_import + import argparse import unittest diff --git a/tests/db/envelop_test.py b/tests/db/envelop_test.py index 1895d827..14f5fa1f 100644 --- a/tests/db/envelop_test.py +++ b/tests/db/envelop_test.py @@ -1,4 +1,5 @@ # encoding=utf-8 +from __future__ import absolute_import import unittest diff --git a/tests/db/thread_test.py b/tests/db/thread_test.py index 7f802e15..678a5e59 100644 --- a/tests/db/thread_test.py +++ b/tests/db/thread_test.py @@ -15,6 +15,7 @@ # along with this program. If not, see . """Tests for the alot.db.thread module.""" +from __future__ import absolute_import import datetime import unittest diff --git a/tests/helper_test.py b/tests/helper_test.py index e333c2f9..5a5c60da 100644 --- a/tests/helper_test.py +++ b/tests/helper_test.py @@ -1,6 +1,7 @@ # encoding=utf-8 """Test suite for alot.helper module.""" +from __future__ import absolute_import import unittest diff --git a/tests/settings/checks_test.py b/tests/settings/checks_test.py index 917e2438..86269c29 100644 --- a/tests/settings/checks_test.py +++ b/tests/settings/checks_test.py @@ -1,4 +1,5 @@ # encoding=utf-8 +from __future__ import absolute_import import unittest -- cgit v1.2.3