[LNT] r267799 - Fixup bot warnings

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 14:44:20 PDT 2016


Author: cmatthews
Date: Wed Apr 27 16:44:20 2016
New Revision: 267799

URL: http://llvm.org/viewvc/llvm-project?rev=267799&view=rev
Log:
Fixup bot warnings

Fixup some unused stuff in my test, as well as PEP8 errors

Modified:
    lnt/trunk/lnt/server/config.py
    lnt/trunk/lnt/server/db/rules/rule_blacklist_benchmarks_by_name.py
    lnt/trunk/lnt/server/db/rules_manager.py
    lnt/trunk/tests/server/db/blacklist.py

Modified: lnt/trunk/lnt/server/config.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/config.py?rev=267799&r1=267798&r2=267799&view=diff
==============================================================================
--- lnt/trunk/lnt/server/config.py (original)
+++ lnt/trunk/lnt/server/config.py Wed Apr 27 16:44:20 2016
@@ -84,6 +84,7 @@ class DBInfo:
     def __str__(self):
         return "DBInfo(" + self.path + ")"
 
+
 class Config:
     @staticmethod
     def fromData(path, data):
@@ -119,18 +120,17 @@ class Config:
                       dict([(k, DBInfo.fromData(dbDirPath, v,
                                                 default_email_config,
                                                 0))
-                                     for k, v in data['databases'].items()]),
+                           for k, v in data['databases'].items()]),
                       blacklist)
     
     @staticmethod
     def dummyInstance():
-        baseDir = tempfile.mkdtemp()        
+        baseDir = tempfile.mkdtemp()
         dbDir = '.'
-        dbDirPath = os.path.join(baseDir, dbDir)
         profileDirPath = os.path.join(baseDir, 'profiles')
-        tempDir = os.path.join(baseDir, 'tmp')        
+        tempDir = os.path.join(baseDir, 'tmp')
         secretKey = None
-        dbInfo = {'dummy': DBInfo.dummyInstance(),}
+        dbInfo = {'dummy': DBInfo.dummyInstance()}
         blacklist = None
         
         return Config('LNT', 'http://localhost:8000', dbDir, tempDir, profileDirPath, secretKey, dbInfo, blacklist)

Modified: lnt/trunk/lnt/server/db/rules/rule_blacklist_benchmarks_by_name.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/rules/rule_blacklist_benchmarks_by_name.py?rev=267799&r1=267798&r2=267799&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/rules/rule_blacklist_benchmarks_by_name.py (original)
+++ lnt/trunk/lnt/server/db/rules/rule_blacklist_benchmarks_by_name.py Wed Apr 27 16:44:20 2016
@@ -12,7 +12,8 @@ from flask import current_app
 ignored = None
 
 
-# Try and find the blacklist. 
+# Try and find the blacklist.
+
 def populate_blacklist():
     global ignored
     ignored = []

Modified: lnt/trunk/lnt/server/db/rules_manager.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/rules_manager.py?rev=267799&r1=267798&r2=267799&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/rules_manager.py (original)
+++ lnt/trunk/lnt/server/db/rules_manager.py Wed Apr 27 16:44:20 2016
@@ -50,6 +50,7 @@ HOOKS = {'post_test_hook':[],
          'is_useful_change': []}
 DESCRIPTIONS = {}
 
+
 def register_hooks():
     """Exec all the rules files.  Gather the hooks from them
     and load them into the hook dict for later use.

Modified: lnt/trunk/tests/server/db/blacklist.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/db/blacklist.py?rev=267799&r1=267798&r2=267799&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/blacklist.py (original)
+++ lnt/trunk/tests/server/db/blacklist.py Wed Apr 27 16:44:20 2016
@@ -4,7 +4,6 @@
 import unittest
 import logging
 import sys
-import datetime
 from lnt.server.config import Config
 from lnt.server.db import v4db
 
@@ -29,12 +28,8 @@ class BlacklistProcessingTest(unittest.T
         ts_db = self.ts_db = self.db.testsuite['nts']
         
         order1234 = self.order1234 = self._mkorder(ts_db, "1234")
-        order1235 = self.order1235 = self._mkorder(ts_db, "1235")
         order1236 = self.order1236 = self._mkorder(ts_db, "1236")
-        order1237 = self.order1237 = self._mkorder(ts_db, "1237")
-        order1238 = self.order1238 = self._mkorder(ts_db, "1238")
 
-        start_time = end_time = datetime.datetime.utcnow()
         machine = self.machine = ts_db.Machine("test-machine")
         ts_db.add(machine)
         
@@ -76,7 +71,7 @@ class BlacklistProcessingTest(unittest.T
 
         valid = blacklist.filter_by_benchmark_name(ts, fc1)
         self.assertTrue(valid, "Expect this to not be filtered.")
-        valid = blacklist.filter_by_benchmark_name(ts ,fc2)
+        valid = blacklist.filter_by_benchmark_name(ts, fc2)
         self.assertTrue(valid, "Expect this to not be filtered.")
         bad = blacklist.filter_by_benchmark_name(ts, fc3)
         self.assertFalse(bad, "Expect this to be filtered by regex.")




More information about the llvm-commits mailing list