Skip to content

Commit

Permalink
style: Please pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ue-Dev committed May 22, 2024
1 parent 8740d7a commit 6817b9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@ def logger_config(cls) -> logging.Logger:

class ErrorAndDebugFilter(logging.Filter):
def filter(self, record):
return record.levelno in (logging.ERROR, logging.DEBUG, logging.CRITICAL)
return record.levelno in (
logging.ERROR,
logging.DEBUG,
logging.CRITICAL,
)

class StdOutFilter(logging.Filter):
def filter(self, record):
return record.levelno not in (logging.ERROR, logging.DEBUG, logging.CRITICAL)
return record.levelno not in (
logging.ERROR,
logging.DEBUG,
logging.CRITICAL,
)

log = logging.getLogger()
logging.Formatter.converter = (
Expand All @@ -53,7 +61,8 @@ def filter(self, record):
log.setLevel(logging.INFO)

formatter = colorlog.ColoredFormatter(
fmt="%(log_color)s" + "[%(asctime)s] %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s",
fmt="%(log_color)s"
+ "[%(asctime)s] %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s",
datefmt="%d/%m/%Y %H:%M:%S",
reset=True,
log_colors={
Expand Down
2 changes: 1 addition & 1 deletion src/utils/error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def on_command_error(

elif isinstance(event.error, interactions.errors.CommandOnCooldown):
await event.ctx.send(
f"Wow! Trying to catch up with Sonic or something?"
"Wow! Trying to catch up with Sonic or something?"
)

elif isinstance(event.error, interactions.errors.CommandCheckFailure):
Expand Down

0 comments on commit 6817b9e

Please sign in to comment.