[PATCH] cleanup import satements

Nicolas Sebrecht nicolas.s-dev at laposte.net
Wed May 11 19:34:40 BST 2011


- conform to PEP8
- explicitly define symbols instead of 'import *'
- remove unused import

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev at laposte.net>
---
 offlineimap/repository/IMAP.py |    8 ++++++--
 offlineimap/ui/Curses.py       |    2 +-
 offlineimap/ui/TTY.py          |    2 +-
 offlineimap/ui/UIBase.py       |    1 -
 offlineimap/ui/debuglock.py    |    2 +-
 5 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py
index 18e3b4e..0bc84eb 100644
--- a/offlineimap/repository/IMAP.py
+++ b/offlineimap/repository/IMAP.py
@@ -20,8 +20,12 @@ from offlineimap.repository.Base import BaseRepository
 from offlineimap import folder, imaputil, imapserver
 from offlineimap.folder.UIDMaps import MappedIMAPFolder
 from offlineimap.threadutil import ExitNotifyThread
-import re, types, os, netrc, errno
-from threading import *
+from threading import Event
+import re
+import types
+import os
+import netrc
+import errno
 
 class IMAPRepository(BaseRepository):
     def __init__(self, reposname, account):
diff --git a/offlineimap/ui/Curses.py b/offlineimap/ui/Curses.py
index cceeaaa..9e0b9d5 100644
--- a/offlineimap/ui/Curses.py
+++ b/offlineimap/ui/Curses.py
@@ -21,7 +21,7 @@ import time
 import sys
 import os
 import signal
-import curses, curses.panel, curses.textpad, curses.wrapper
+import curses
 from Blinkenlights import BlinkenBase
 from UIBase import UIBase
 import offlineimap
diff --git a/offlineimap/ui/TTY.py b/offlineimap/ui/TTY.py
index 61019c1..cba573f 100644
--- a/offlineimap/ui/TTY.py
+++ b/offlineimap/ui/TTY.py
@@ -19,7 +19,7 @@
 from UIBase import UIBase
 from getpass import getpass
 import sys
-from threading import *
+from threading import Lock, currentThread
 
 class TTYUI(UIBase):
     def __init__(s, config, verbose = 0):
diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py
index 8047c15..4c60b2a 100644
--- a/offlineimap/ui/UIBase.py
+++ b/offlineimap/ui/UIBase.py
@@ -22,7 +22,6 @@ import sys
 import traceback
 import threading
 from StringIO import StringIO
-from Queue import Empty
 import offlineimap
 
 debugtypes = {'':'Other offlineimap related sync messages',
diff --git a/offlineimap/ui/debuglock.py b/offlineimap/ui/debuglock.py
index 7873a1f..4f2a4f9 100644
--- a/offlineimap/ui/debuglock.py
+++ b/offlineimap/ui/debuglock.py
@@ -16,7 +16,7 @@
 #    along with this program; if not, write to the Free Software
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
-from threading import *
+from threading import Lock, currentThread
 import traceback
 logfile = open("/tmp/logfile", "wt")
 loglock = Lock()
-- 
1.7.5.1.354.g761178





More information about the OfflineIMAP-project mailing list