Skip to content

Commit d485afc

Browse files
committed
style: Auto-format with ruff
1 parent 4003bcd commit d485afc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

zulip/zulip/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,11 +662,15 @@ def end_error_retry(succeeded: bool) -> None:
662662
if res.status_code == 429 and self.auto_retry_rate_limits:
663663
try:
664664
# Zulip will return the wait time in the either the (JSON) body or header
665-
wait_time = float(res.json().get("retry-after", res.headers.get("Retry-After", 1.0)))
665+
wait_time = float(
666+
res.json().get("retry-after", res.headers.get("Retry-After", 1.0))
667+
)
666668
except Exception:
667669
wait_time = 1.0
668670
if self.verbose:
669-
print(f"Rate limit hit! Sleeping for {wait_time} seconds before retrying...")
671+
print(
672+
f"Rate limit hit! Sleeping for {wait_time} seconds before retrying..."
673+
)
670674
time.sleep(wait_time)
671675
continue
672676

0 commit comments

Comments
 (0)