Skip to content

Commit

Permalink
feat: remove f-strings from debug loggers (#108)
Browse files Browse the repository at this point in the history
* feat: remove f-strings from debug loggers

* chore: `black .`

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
BobTheBuidler and github-actions[bot] authored Dec 4, 2024
1 parent 0a53717 commit c2cdb0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions multicall/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def decode_output(
else:
decoded = [None] * (1 if not returns else len(returns)) # type: ignore

logger.debug(f"returns: {returns}")
logger.debug(f"decoded: {decoded}")
logger.debug("returns: %s", returns)
logger.debug("decoded: %s", decoded)

if returns:
return {
Expand Down
14 changes: 5 additions & 9 deletions multicall/multicall.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
def __call__(self) -> Dict[str, Any]:
start = time()
response = await_awaitable(self)
logger.debug(f"Multicall took {time() - start}s")
logger.debug("Multicall took %ss", time() - start)
return response

def __await__(self) -> Dict[str, Any]:
Expand All @@ -110,7 +110,7 @@ async def coroutine(self) -> Dict[str, Any]:
async def fetch_outputs(
self, calls: List[Call], ConnErr_retries: int = 0, id: str = ""
) -> List[CallResponse]:
logger.debug(f"coroutine {id} started")
logger.debug("coroutine %s started", id)

if calls is None:
calls = self.calls
Expand All @@ -126,16 +126,12 @@ async def fetch_outputs(
outputs = await gather(
[
run_in_subprocess(
Call.decode_output,
output,
call.signature,
call.returns,
success,
Call.decode_output, output, call.signature, call.returns, success
)
for call, (success, output) in zip(calls, outputs)
]
)
logger.debug(f"coroutine {id} finished")
logger.debug("coroutine %s finished", id)
return outputs
except Exception as e:
_raise_or_proceed(e, len(calls), ConnErr_retries=ConnErr_retries)
Expand All @@ -149,7 +145,7 @@ async def fetch_outputs(
)

return_val = await run_in_subprocess(unpack_batch_results, batch_results)
logger.debug(f"coroutine {id} finished")
logger.debug("coroutine %s finished", id)
return return_val

@property
Expand Down

0 comments on commit c2cdb0f

Please sign in to comment.