Revision: 3183
http://spambayes.svn.sourceforge.net/spambayes/?rev=3183&view=rev
Author: montanaro
Date: 2008-11-25 01:48:34 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
pylint nits
Modified Paths:
--------------
trunk/spambayes/spambayes/hammie.py
Modified: trunk/spambayes/spambayes/hammie.py
===================================================================
--- trunk/spambayes/spambayes/hammie.py 2008-11-25 01:47:48 UTC (rev 3182)
+++ trunk/spambayes/spambayes/hammie.py 2008-11-25 01:48:34 UTC (rev 3183)
@@ -1,5 +1,6 @@
#! /usr/bin/env python
+import math
from spambayes import mboxutils
from spambayes import storage
@@ -122,14 +123,13 @@
basic_disp = disp
disp += "; %.*f" % (options["Headers", "header_score_digits"], prob)
if options["Headers", "header_score_logarithm"]:
- if prob<=0.005 and prob>0.0:
+ if prob <= 0.005 and prob > 0.0:
import math
- x=-math.log10(prob)
- disp += " (%d)"%x
- if prob>=0.995 and prob<1.0:
- import math
- x=-math.log10(1.0-prob)
- disp += " (%d)"%x
+ x = -math.log10(prob)
+ disp += " (%d)" % x
+ if prob >= 0.995 and prob < 1.0:
+ x = -math.log10(1.0-prob)
+ disp += " (%d)" % x
del msg[header]
msg.add_header(header, disp)
@@ -151,7 +151,7 @@
def filter(self, msg, header=None, spam_cutoff=None,
ham_cutoff=None, debugheader=None,
debug=None, train=None):
- prob, result = self.score_and_filter(
+ _prob, result = self.score_and_filter(
msg, header, spam_cutoff, ham_cutoff, debugheader,
debug, train)
return result
@@ -281,6 +281,6 @@
if __name__ == "__main__":
# Everybody's used to running hammie.py. Why mess with success? ;)
- import hammiebulk
+ from spambayes import hammiebulk
hammiebulk.main()
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