Skip to content

Commit 17b4a50

Browse files
committed
Added simplification
1 parent 95df619 commit 17b4a50

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

django_redis/client/herd.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def _is_expired(x, herd_timeout: int) -> bool:
2626
return True
2727
val = x + random.randint(1, herd_timeout)
2828

29-
if val >= herd_timeout:
30-
return True
31-
return False
29+
return val >= herd_timeout
3230

3331

3432
class HerdClient(DefaultClient):

0 commit comments

Comments
 (0)