Fixing Lint after flake upgrade (#1162)

* Fixing Lint after flake upgrade

* more lint fixes
This commit is contained in:
Richard Liaw
2017-10-26 21:02:07 -05:00
committed by Robert Nishihara
parent 6da7761d5d
commit 797f4fcbf3
11 changed files with 34 additions and 37 deletions
+2 -2
View File
@@ -224,13 +224,13 @@ class DockerRunner(object):
try:
self._stop_node(self.head_container_id)
except:
except Exception:
success = False
for container_id in self.worker_container_ids:
try:
self._stop_node(container_id)
except:
except Exception:
success = False
return success
+6 -6
View File
@@ -213,8 +213,8 @@ class SerializationTest(unittest.TestCase):
pass
# Make a list that contains itself.
l = []
l.append(l)
lst = []
lst.append(lst)
# Make an object that contains itself as a field.
a1 = ClassA()
a1.field = a1
@@ -227,7 +227,7 @@ class SerializationTest(unittest.TestCase):
d1 = {}
d1["key"] = d1
# Create a list of recursive objects.
recursive_objects = [l, a1, a2, a3, d1]
recursive_objects = [lst, a1, a2, a3, d1]
# Check that exceptions are thrown when we serialize the recursive
# objects.
@@ -639,15 +639,15 @@ class APITest(unittest.TestCase):
return x + 1
@ray.remote
def l(x):
def k2(x):
return ray.get(k.remote(x))
@ray.remote
def m(x):
return ray.get(l.remote(x))
return ray.get(k2.remote(x))
self.assertEqual(ray.get(k.remote(1)), 2)
self.assertEqual(ray.get(l.remote(1)), 2)
self.assertEqual(ray.get(k2.remote(1)), 2)
self.assertEqual(ray.get(m.remote(1)), 2)
def testGetMultiple(self):
+2 -2
View File
@@ -108,8 +108,8 @@ class TaskTests(unittest.TestCase):
return 1
n = 10 ** 4 # TODO(pcm): replace by 10 ** 5 once this is faster.
l = ray.get([f.remote() for _ in range(n)])
self.assertEqual(l, n * [1])
lst = ray.get([f.remote() for _ in range(n)])
self.assertEqual(lst, n * [1])
self.assertTrue(ray.services.all_processes_alive())
ray.worker.cleanup()