Skip to content

Commit

Permalink
Ignore warnings 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 Sep 5, 2023
1 parent 12829c6 commit 15a5748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion replicate/client.py
Expand Up @@ -181,7 +181,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 15a5748

Please sign in to comment.