From 7d62441dc258bd6224b8bda177f7512ed31540a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sat, 29 Aug 2020 21:10:16 +0200 Subject: [PATCH] Changed import order These changes close the lintian warning C0411. --- offlineimap/CustomConfig.py | 2 +- offlineimap/folder/Gmail.py | 2 +- offlineimap/folder/GmailMaildir.py | 4 ++-- offlineimap/folder/IMAP.py | 2 +- offlineimap/folder/Maildir.py | 2 +- offlineimap/imaplibutil.py | 3 +-- offlineimap/repository/Maildir.py | 4 ++-- offlineimap/repository/__init__.py | 2 +- test/OLItest/TestRunner.py | 2 +- test/tests/test_00_globals.py | 2 +- test/tests/test_00_imaputil.py | 2 +- 11 files changed, 13 insertions(+), 14 deletions(-) diff --git a/offlineimap/CustomConfig.py b/offlineimap/CustomConfig.py index f6ac3f2..5737993 100644 --- a/offlineimap/CustomConfig.py +++ b/offlineimap/CustomConfig.py @@ -17,8 +17,8 @@ import os import re from sys import exc_info -import six from configparser import SafeConfigParser, Error +import six from offlineimap.localeval import LocalEval diff --git a/offlineimap/folder/Gmail.py b/offlineimap/folder/Gmail.py index 15cd5f5..8f1b8ef 100644 --- a/offlineimap/folder/Gmail.py +++ b/offlineimap/folder/Gmail.py @@ -18,8 +18,8 @@ """Folder implementation to support features of the Gmail IMAP server.""" import re -import six from sys import exc_info +import six from offlineimap import imaputil, imaplibutil, OfflineImapError import offlineimap.accounts diff --git a/offlineimap/folder/GmailMaildir.py b/offlineimap/folder/GmailMaildir.py index 3865428..79a84f8 100644 --- a/offlineimap/folder/GmailMaildir.py +++ b/offlineimap/folder/GmailMaildir.py @@ -17,13 +17,13 @@ import os -import six from sys import exc_info +import six -from .Maildir import MaildirFolder import offlineimap.accounts from offlineimap import OfflineImapError from offlineimap import imaputil +from .Maildir import MaildirFolder class GmailMaildirFolder(MaildirFolder): diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index eff88e2..bbbd32a 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -22,10 +22,10 @@ import time from sys import exc_info import six -from .Base import BaseFolder from offlineimap import imaputil, imaplibutil, emailutil, OfflineImapError from offlineimap import globals from offlineimap.virtual_imaplib2 import MonthNames +from .Base import BaseFolder # Globals CRLF = '\r\n' diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py index f0be7dd..590a93c 100644 --- a/offlineimap/folder/Maildir.py +++ b/offlineimap/folder/Maildir.py @@ -19,9 +19,9 @@ import socket import time import re import os -import six from sys import exc_info from threading import Lock +import six try: from hashlib import md5 diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py index 15e0f22..d056b25 100644 --- a/offlineimap/imaplibutil.py +++ b/offlineimap/imaplibutil.py @@ -19,14 +19,13 @@ import fcntl import time import subprocess import threading -import rfc6555 import socket import errno import zlib from sys import exc_info from hashlib import sha512, sha384, sha256, sha224, sha1 - import six +import rfc6555 from offlineimap import OfflineImapError from offlineimap.ui import getglobalui diff --git a/offlineimap/repository/Maildir.py b/offlineimap/repository/Maildir.py index a3b08e6..3cd9370 100644 --- a/offlineimap/repository/Maildir.py +++ b/offlineimap/repository/Maildir.py @@ -15,12 +15,12 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +import os +from stat import * from offlineimap import folder from offlineimap.ui import getglobalui from offlineimap.error import OfflineImapError from offlineimap.repository.Base import BaseRepository -import os -from stat import * class MaildirRepository(BaseRepository): diff --git a/offlineimap/repository/__init__.py b/offlineimap/repository/__init__.py index 32ed9ed..375b23a 100644 --- a/offlineimap/repository/__init__.py +++ b/offlineimap/repository/__init__.py @@ -14,8 +14,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import six from sys import exc_info +import six try: from configparser import NoSectionError diff --git a/test/OLItest/TestRunner.py b/test/OLItest/TestRunner.py index 9d8fedd..f85d5f5 100644 --- a/test/OLItest/TestRunner.py +++ b/test/OLItest/TestRunner.py @@ -13,7 +13,6 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import offlineimap.virtual_imaplib2 as imaplib import unittest import logging import os @@ -23,6 +22,7 @@ import shutil import subprocess import tempfile import random +import offlineimap.virtual_imaplib2 as imaplib random.seed() diff --git a/test/tests/test_00_globals.py b/test/tests/test_00_globals.py index 744614b..12855a1 100755 --- a/test/tests/test_00_globals.py +++ b/test/tests/test_00_globals.py @@ -1,8 +1,8 @@ #!/usr/bin/env python # Copyright 2013 Eygene A. Ryabinkin -from offlineimap import globals import unittest +from offlineimap import globals class Opt: diff --git a/test/tests/test_00_imaputil.py b/test/tests/test_00_imaputil.py index 09ac1d0..f5f58de 100644 --- a/test/tests/test_00_imaputil.py +++ b/test/tests/test_00_imaputil.py @@ -16,11 +16,11 @@ import unittest import logging +from test.OLItest import OLITestLib from offlineimap import imaputil from offlineimap.ui import UI_LIST, setglobalui from offlineimap.CustomConfig import CustomConfigParser -from test.OLItest import OLITestLib # Things need to be setup first, usually setup.py initializes everything. # but if e.g. called from command line, we take care of default values here: