Skip to content

Commit

Permalink
Sonar cloud resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Sep 6, 2024
1 parent 28034e0 commit 7e5b295
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion synapseclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def setEndpoints(
# Update endpoints if we get redirected
if not skip_checks:
response = with_retry(
lambda: self._requests_session.get(
lambda point=point: self._requests_session.get(
endpoints[point],
allow_redirects=False,
headers=synapseclient.USER_AGENT,
Expand Down
13 changes: 12 additions & 1 deletion synapseclient/core/dozer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ def clear_listeners():
del _listeners[:]


def doze(secs, listener_check_interval_secs=0.1, trace_span_name="doze") -> None:
def doze(
secs: float,
listener_check_interval_secs: float = 0.1,
trace_span_name: str = "doze",
) -> None:
"""Sleep for a given number of seconds while checking registered listeners.
Arguments:
secs: the number of seconds to sleep
listener_check_interval_secs: the interval at which to check the listeners
trace_span_name: the name of the trace span
"""
with tracer.start_as_current_span(name=trace_span_name):
end_time = time.time() + secs
while time.time() < end_time:
Expand Down

0 comments on commit 7e5b295

Please sign in to comment.