Skip to content

Commit

Permalink
Ignore warning about use of non-cryptographic RNGs
Browse files Browse the repository at this point in the history
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
  • Loading branch information
mattt committed Oct 3, 2023
1 parent ff51f4d commit ecf354c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion replicate/client.py
Expand Up @@ -188,7 +188,7 @@ def _calculate_sleep(
pass

backoff = self.backoff_factor * (2 ** (attempts_made - 1))
jitter = (backoff * self.jitter_ratio) * random.choice([1, -1])
jitter = (backoff * self.jitter_ratio) * random.choice([1, -1]) # noqa: S311
total_backoff = backoff + jitter
return min(total_backoff, self.max_backoff_wait)

Expand Down

0 comments on commit ecf354c

Please sign in to comment.