[Spambayes-checkins] SF.net SVN: spambayes:[3208] trunk/spambayes/testtools

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Tue Nov 25 04:39:02 CET 2008


Revision: 3208
          http://spambayes.svn.sourceforge.net/spambayes/?rev=3208&view=rev
Author:   montanaro
Date:     2008-11-25 03:39:02 +0000 (Tue, 25 Nov 2008)

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

Modified Paths:
--------------
    trunk/spambayes/testtools/es2hs.py
    trunk/spambayes/testtools/incremental.py

Modified: trunk/spambayes/testtools/es2hs.py
===================================================================
--- trunk/spambayes/testtools/es2hs.py	2008-11-25 03:37:57 UTC (rev 3207)
+++ trunk/spambayes/testtools/es2hs.py	2008-11-25 03:39:02 UTC (rev 3208)
@@ -43,8 +43,6 @@
 def main():
     """Main program; parse options and go."""
 
-    global loud
-
     everything = None
     spam = []
 
@@ -71,7 +69,8 @@
     spamsizes = {}
 
     for s in spam:
-        if loud: print "Scanning spamdir (%s):" % s
+        if loud:
+            print "Scanning spamdir (%s):" % s
         files = os.listdir(s)
         for f in files:
             if f[0] in ('1', '2', '3', '4', '5', '6', '7', '8', '9'):
@@ -85,7 +84,8 @@
     os.makedirs(spamdir)
     os.makedirs(hamdir)
 
-    if loud: print "Scanning everything"
+    if loud:
+        print "Scanning everything"
     for f in os.listdir(everything):
         if f[0] in ('1', '2', '3', '4', '5', '6', '7', '8', '9'):
             name = os.path.join(everything, f)

Modified: trunk/spambayes/testtools/incremental.py
===================================================================
--- trunk/spambayes/testtools/incremental.py	2008-11-25 03:37:57 UTC (rev 3207)
+++ trunk/spambayes/testtools/incremental.py	2008-11-25 03:39:02 UTC (rev 3208)
@@ -30,7 +30,7 @@
 from spambayes import msgs
 import email
 from email import Message
-import regimes
+from testtools import regimes
 
 try:
     True, False
@@ -76,10 +76,10 @@
         # The number of test instances correctly and incorrectly classified.
         self.nham_right = 0
         self.nham_wrong = 0
-        self.nham_unsure = 0;
+        self.nham_unsure = 0
         self.nspam_right = 0
         self.nspam_wrong = 0
-        self.nspam_unsure = 0;
+        self.nspam_unsure = 0
 
         # Lists of bad predictions.
         self.ham_wrong_examples = []    # False positives:  ham called spam.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the Spambayes-checkins mailing list