Revision: 3190
http://spambayes.svn.sourceforge.net/spambayes/?rev=3190&view=rev
Author: montanaro
Date: 2008-11-25 01:55:20 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
pylint nits
Modified Paths:
--------------
trunk/spambayes/spambayes/TestToolsUI.py
Modified: trunk/spambayes/spambayes/TestToolsUI.py
===================================================================
--- trunk/spambayes/spambayes/TestToolsUI.py 2008-11-25 01:54:19 UTC (rev
3189)
+++ trunk/spambayes/spambayes/TestToolsUI.py 2008-11-25 01:55:20 UTC (rev
3190)
@@ -38,8 +38,8 @@
import random
import StringIO
-import ProxyUI
-import oe_mailbox
+from spambayes import ProxyUI
+from spambayes import oe_mailbox
from spambayes import msgs
from spambayes import TestDriver
from spambayes import OptionsClass
@@ -60,9 +60,9 @@
# Dynamically add any current experimental/deprecated options.
for opt in options.options(True):
- sect, opt = opt[1:].split(']', 1)
+ _sect, _opt = opt[1:].split(']', 1)
if opt[:2].lower() == "x-":
- testtools_ini_map += ((sect, opt),)
+ testtools_ini_map += ((_sect, _opt),)
class TestToolsUserInterface(ProxyUI.ProxyUserInterface):
"""Serves the HTML user interface for the test tools."""
@@ -93,8 +93,8 @@
('TestToolsUI', 'source'),
('TestToolsUI', 'n'),)
- option_choice = self._buildConfigPageBody(\
- configTable, testtools_ini_map)
+ option_choice = self._buildConfigPageBody(configTable,
+ testtools_ini_map)
option_choice.action_page.action = "cvresults"
option_choice.introduction = "Select the options for your test " \
"(these will be run against the " \
@@ -529,15 +529,15 @@
set_num, nsets = portion.split('/')
- all = os.listdir(directory)
- random.seed(hash(max(all)) ^ msgs.SEED)
- random.shuffle(all)
+ files = os.listdir(directory)
+ random.seed(hash(max(files)) ^ msgs.SEED)
+ random.shuffle(files)
- set_size = len(all) // int(nsets)
+ set_size = len(files) // int(nsets)
set_num = int(set_num)
- set = all[set_num*set_size:((set_num+1)*set_size)-1]
- set.sort()
- for fname in set:
+ fileset = files[set_num*set_size:((set_num+1)*set_size)-1]
+ fileset.sort()
+ for fname in fileset:
yield msgs.Msg(directory, fname)
class HamCacheStream(CacheStream):
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