Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrittervg committed Sep 3, 2024
1 parent 56bf292 commit 0a93b55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def func_wrapper(*args, **kwargs):
obj.logger.log("Beginning %s" % func.__qualname__, level=LogLevel.Info)
obj.logger.log(" Arguments: %s" % (str(args) + " " + str(kwargs) if print_arg_list else "[Omitted %s args]" % str(len(args) + len(kwargs))), level=LogLevel.Debug)
ret = func(*args, **kwargs)
if type(ret) == list:
if ret is list:
obj.logger.log("Function returned a list of %s objects" % len(ret), level=LogLevel.Debug)
else:
return_string = str(ret)
Expand Down
4 changes: 3 additions & 1 deletion components/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import pickle
import functools
import time
import functools

from dateutil.parser import parse


class Struct:
def __init__(self, **entries):
self.__dict__.update(entries)
Expand Down Expand Up @@ -142,6 +142,8 @@ def decorate(func):

# Retry calling a function `times` times, sleeping between each tries, with an exponential backoff
# This is to be used on API calls, that are likely to fail


def retry(_func=None, *, times=10, sleep_s=1, exp=2):
def decorator_retry(func):
@functools.wraps(func)
Expand Down

0 comments on commit 0a93b55

Please sign in to comment.