summaryrefslogtreecommitdiff
path: root/redis/crc.py
diff options
context:
space:
mode:
authorAnas <anas.el.amraoui@live.com>2021-11-30 18:05:51 +0200
committerGitHub <noreply@github.com>2021-11-30 18:05:51 +0200
commitb94e230b17d08e6c89d134e933c706256b79bc4a (patch)
tree993bd7565169229326b810b66939587431ab9dc6 /redis/crc.py
parent368a25f9d163d784a8896f1c087582405e98e006 (diff)
downloadredis-py-b94e230b17d08e6c89d134e933c706256b79bc4a.tar.gz
Added black and isort (#1734)
Diffstat (limited to 'redis/crc.py')
-rw-r--r--redis/crc.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/redis/crc.py b/redis/crc.py
index 7d2ee50..c47e2ac 100644
--- a/redis/crc.py
+++ b/redis/crc.py
@@ -4,10 +4,7 @@ from binascii import crc_hqx
# For more information see: https://github.com/redis/redis/issues/2576
REDIS_CLUSTER_HASH_SLOTS = 16384
-__all__ = [
- "key_slot",
- "REDIS_CLUSTER_HASH_SLOTS"
-]
+__all__ = ["key_slot", "REDIS_CLUSTER_HASH_SLOTS"]
def key_slot(key, bucket=REDIS_CLUSTER_HASH_SLOTS):
@@ -20,5 +17,5 @@ def key_slot(key, bucket=REDIS_CLUSTER_HASH_SLOTS):
if start > -1:
end = key.find(b"}", start + 1)
if end > -1 and end != start + 1:
- key = key[start + 1: end]
+ key = key[start + 1 : end]
return crc_hqx(key, 0) % bucket