mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
v0.7.0
This commit is contained in:
@@ -131,12 +131,6 @@ class ColorFactory(object):
|
||||
self.hash_based = hash_based
|
||||
|
||||
def get(self, s):
|
||||
"""
|
||||
Get a consistent color from the same string using a hash function
|
||||
|
||||
>>> color("foo")
|
||||
'#FF5A5F'
|
||||
"""
|
||||
if self.hash_based:
|
||||
s = s.encode('utf-8')
|
||||
h = hashlib.md5(s)
|
||||
|
||||
Reference in New Issue
Block a user