Revision: 3188
          http://spambayes.svn.sourceforge.net/spambayes/?rev=3188&view=rev
Author:   montanaro
Date:     2008-11-25 01:53:58 +0000 (Tue, 25 Nov 2008)

Log Message:
-----------
pylint nits

Modified Paths:
--------------
    trunk/spambayes/spambayes/UserInterface.py

Modified: trunk/spambayes/spambayes/UserInterface.py
===================================================================
--- trunk/spambayes/spambayes/UserInterface.py  2008-11-25 01:53:22 UTC (rev 
3187)
+++ trunk/spambayes/spambayes/UserInterface.py  2008-11-25 01:53:58 UTC (rev 
3188)
@@ -81,15 +81,16 @@
 import StringIO
 from email.Iterators import typed_subpart_iterator
 
-import oe_mailbox
+from spambayes import oe_mailbox
 
-import PyMeldLite
-import Dibbler
-import tokenizer
+from spambayes import PyMeldLite
+from spambayes import Dibbler
+from spambayes import tokenizer
 from spambayes import Version
 from spambayes import storage
 from spambayes import FileCorpus
-from Options import options, optionsPathname, defaults, OptionsClass, _
+from spambayes.Options import options, optionsPathname, defaults, \
+     OptionsClass, _
 
 IMAGES = ('helmet', 'status', 'config', 'help',
           'message', 'train', 'classify', 'query')
@@ -994,7 +995,7 @@
         for section, option in parm_map:
             if option is not None:
                 if not options.no_restore(section, option):
-                    options.set(section, option, d.get(section,option))
+                    options.set(section, option, d.get(section, option))
 
         options.update_file(optionsPathname)
 
@@ -1058,7 +1059,7 @@
         remote_servers = options["pop3proxy", "remote_servers"]
         if remote_servers:
             domain_guess = remote_servers[0]
-            for pre in ["pop.", "pop3.", "mail.",]:
+            for pre in ["pop.", "pop3.", "mail."]:
                 if domain_guess.startswith(pre):
                     domain_guess = domain_guess[len(pre):]
         else:
@@ -1074,7 +1075,7 @@
         else:
             if hasattr(sys, "frozen"):
                 temp_dir = win32api.GetTempPath()
-                for name in ["SpamBayesService", "SpamBayesServer",]:
+                for name in ["SpamBayesService", "SpamBayesServer"]:
                     for i in xrange(3):
                         pn = os.path.join(temp_dir, "%s%d.log" % (name,
                                                                   (i+1)))
@@ -1212,19 +1213,16 @@
         try:
             from textwrap import fill
         except ImportError:
+            # No textwrap module, so do the same stuff (more-or-less)
+            # ourselves.
+            def fill(text, width):
+                if len(text) <= width:
+                    return text
+                wordsep_re = re.compile(r'(-*\w{2,}-(?=\w{2,})|' # hyphenated 
words
+                                        r'(?<=\S)-{2,}(?=\w))')  # em-dash
+                chunks = wordsep_re.split(text)
+                chunks = filter(None, chunks)
             pass
-        else:
-            return "\n".join([fill(paragraph, width) \
-                              for paragraph in text.split('\n')])
-        # No textwrap module, so do the same stuff (more-or-less) ourselves.
-        def fill(text, width):
-            if len(text) <= width:
-                return text
-            wordsep_re = re.compile(r'(-*\w{2,}-(?=\w{2,})|'   # hyphenated 
words
-                                    r'(?<=\S)-{2,}(?=\w))')    # em-dash
-            chunks = wordsep_re.split(text)
-            chunks = filter(None, chunks)
-            return '\n'.join(self._wrap_chunks(chunks, width))
         return "\n".join([fill(paragraph, width) \
                           for paragraph in text.split('\n')])
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Spambayes-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to