Skip to content

Commit b3dad03

Browse files
committed
fix: add whitespace and correct typos in __init__.py
Added missing whitespace for better readability and fixed minor typos in help_message and alert_move_message. Improved assertions and refactored redundant checks for cleaner test logic.
1 parent 52f1a88 commit b3dad03

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

zulip/zulip/__init__.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@ def do_api_query(
588588
self.ensure_session()
589589
assert self.session is not None
590590

591-
592591
headers = {
593592
"Connection": "keep-alive" if keep_alive else "close",
594593
"Keep-Alive": "timeout=120, max=100", # Keep connection alive
@@ -621,8 +620,13 @@ def do_api_query(
621620

622621
except requests.exceptions.ConnectionError:
623622
query_state["failures"] += 1
624-
logging.warning("Connection lost. Retrying %d/%d in %.1f seconds...", attempt + 1, max_retries, retry_delay)
625-
623+
logging.warning(
624+
"Connection lost. Retrying %d/%d in %.1f seconds...",
625+
attempt + 1,
626+
max_retries,
627+
retry_delay,
628+
)
629+
626630
# Reset the session to establish a new connection
627631
self.session.close()
628632
self.ensure_session()
@@ -660,7 +664,7 @@ def end_error_retry(succeeded: bool) -> None:
660664
print("Success!")
661665
else:
662666
print("Failed!")
663-
667+
664668
while True:
665669
try:
666670
kwarg = "params" if method == "GET" else "data"

0 commit comments

Comments
 (0)