Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Martin <[email protected]>
  • Loading branch information
bmmtstb committed Aug 5, 2024
1 parent bf56946 commit db327fb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dgs/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ def wrapper(*args, **kwargs):
if len(args) > 0:
message += f"\nargs: `{','.join(a for a in args)}`"
if len(kwargs) > 0:
message += f"\nkwargs: {','.join(f'{k}: {v}' for k, v in kwargs.items() if isinstance(v, (int, float, str)))}"
message += (
f"\nkwargs: "
f"{','.join(f'{k}: {v}' for k, v in kwargs.items() if isinstance(v, (int, float, str)))}"
)

send_discord_notification(message)
return result
Expand All @@ -322,7 +325,10 @@ def wrapper(*args, **kwargs):
if len(args) > 0:
message += f"\nargs: `{','.join(a for a in args)}`"
if len(kwargs) > 0:
message += f"\nkwargs: {','.join(f'{k}: {v}' for k, v in kwargs.items() if isinstance(v, (int, float, str)))}"
message += (
f"\nkwargs: "
f"{','.join(f'{k}: {v}' for k, v in kwargs.items() if isinstance(v, (int, float, str)))}"
)
message += f"\nError: {traceback.format_exc()}"
send_discord_notification(message)
raise e
Expand Down

0 comments on commit db327fb

Please sign in to comment.