Lint Cython files (#4097)

This commit is contained in:
Philipp Moritz
2019-02-20 22:29:25 -08:00
committed by Robert Nishihara
parent acf4d53b55
commit bcd5af78c7
11 changed files with 239 additions and 129 deletions
+6 -4
View File
@@ -32,7 +32,8 @@ def check_id(b):
if not isinstance(b, bytes):
raise TypeError("Unsupported type: " + str(type(b)))
if len(b) != kUniqueIDSize:
raise ValueError("ID string needs to have length " + str(kUniqueIDSize))
raise ValueError("ID string needs to have length " +
str(kUniqueIDSize))
cdef extern from "ray/constants.h" nogil:
@@ -106,9 +107,10 @@ cdef class UniqueID:
return type(self), (self.binary(),)
def redis_shard_hash(self):
# NOTE: The hash function used here must match the one in GetRedisContext in
# src/ray/gcs/tables.h. Changes to the hash function should only be made
# through std::hash in src/common/common.h
# NOTE: The hash function used here must match the one in
# GetRedisContext in src/ray/gcs/tables.h. Changes to the
# hash function should only be made through std::hash in
# src/common/common.h
return self.data.hash()