Skip to content

Commit 1f87a38

Browse files
committed
Black thrift_backend.py
Signed-off-by: Jesse Whitehouse <[email protected]>
1 parent 5c1ee79 commit 1f87a38

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/databricks/sql/thrift_backend.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"_retry_delay_max": (float, 60, 5, 3600),
4444
"_retry_stop_after_attempts_count": (int, 30, 1, 60),
4545
"_retry_stop_after_attempts_duration": (float, 900, 1, 86400),
46-
"_retry_delay_default": (float, 5, 1, 60)
46+
"_retry_delay_default": (float, 5, 1, 60),
4747
}
4848

4949

@@ -77,7 +77,7 @@ def __init__(
7777
# _retry_delay_max (default: 60)
7878
# {min,max} pre-retry delay bounds
7979
# _retry_delay_default (default: 5)
80-
# Only used when GetOperationStatus fails due to a TCP/OS Error.
80+
# Only used when GetOperationStatus fails due to a TCP/OS Error.
8181
# _retry_stop_after_attempts_count (default: 30)
8282
# total max attempts during retry sequence
8383
# _retry_stop_after_attempts_duration (default: 900)
@@ -270,8 +270,7 @@ def get_elapsed():
270270
return time.time() - t0
271271

272272
def bound_retry_delay(attempt, proposed_delay):
273-
"""bound delay (seconds) by [min_delay*1.5^(attempt-1), max_delay]
274-
"""
273+
"""bound delay (seconds) by [min_delay*1.5^(attempt-1), max_delay]"""
275274
delay = int(proposed_delay)
276275
delay = max(delay, self._retry_delay_min * math.pow(1.5, attempt - 1))
277276
delay = min(delay, self._retry_delay_max)
@@ -293,7 +292,7 @@ def attempt_request(attempt):
293292
# - non-None method_return -> success, return and be done
294293
# - non-None retry_delay -> sleep delay before retry
295294
# - error, error_message always set when available
296-
295+
297296
error, error_message, retry_delay = None, None, None
298297
try:
299298
logger.debug("Sending request: {}".format(request))

0 commit comments

Comments
 (0)