From 3c48779978082dc6907ef5849b655759c19d008d Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 20 Nov 2018 13:05:50 +0100 Subject: solving some flake8 issues --- bot/cogs/error_handler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bot/cogs/error_handler.py') diff --git a/bot/cogs/error_handler.py b/bot/cogs/error_handler.py index 9f0da2e0..79780251 100644 --- a/bot/cogs/error_handler.py +++ b/bot/cogs/error_handler.py @@ -1,7 +1,8 @@ +import logging +import math import sys import traceback -import math -import logging + from discord.ext import commands @@ -41,7 +42,7 @@ class CommandErrorHandler: ) return await ctx.send( "This command is on cooldown," + - " please retry in {}s.".format(math.ceil(error.retry_after)) + f" please retry in {math.ceil(error.retry_after)}s." ) if isinstance(error, commands.DisabledCommand): logging.debug( @@ -85,7 +86,7 @@ class CommandErrorHandler: ":no_entry: You are not authorized to use this command." ) print( - "Ignoring exception in command {}:".format(ctx.command), + f"Ignoring exception in command {ctx.command}:", file=sys.stderr ) logging.warning( -- cgit v1.2.3