From 1e2001c8168d65bd269eb81939ec330d06801f94 Mon Sep 17 00:00:00 2001 From: "{{ github.actor }}" Date: Wed, 25 Oct 2023 17:23:37 +0000 Subject: [PATCH] Style Reformatting --- captcha/abc.py | 4 ++-- captcha/commands.py | 3 ++- captcha/core.py | 26 ++++++++++++-------------- captcha/objects.py | 5 +++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/captcha/abc.py b/captcha/abc.py index 97568704..ecbda984 100644 --- a/captcha/abc.py +++ b/captcha/abc.py @@ -22,13 +22,13 @@ SOFTWARE. """ +from abc import ABC, ABCMeta, abstractmethod from pathlib import Path from typing import Any, Dict, List -from abc import ABC, abstractmethod, ABCMeta import discord +from redbot.core import Config, commands from redbot.core.bot import Red -from redbot.core import commands, Config class MixinMeta(ABC): diff --git a/captcha/commands.py b/captcha/commands.py index 0bcb46b1..ac03250c 100644 --- a/captcha/commands.py +++ b/captcha/commands.py @@ -23,12 +23,13 @@ """ from typing import Optional + import discord from redbot.core import commands from redbot.core.utils.chat_formatting import box -from .abc import MixinMeta, CompositeMetaClass from ._tagscript import TagscriptConverter +from .abc import CompositeMetaClass, MixinMeta class CaptchaCommands(MixinMeta, metaclass=CompositeMetaClass): diff --git a/captcha/core.py b/captcha/core.py index accf8df8..10d478be 100644 --- a/captcha/core.py +++ b/captcha/core.py @@ -22,32 +22,30 @@ SOFTWARE. """ -import os -import string -import random import asyncio import logging -from pathlib import Path +import os +import random +import string from contextlib import suppress +from pathlib import Path from types import ModuleType -from typing import Dict, Optional, Union, List, Final, Any +from typing import Any, Dict, Final, List, Optional, Union import discord import TagScriptEngine as tse +from redbot.core import Config, commands from redbot.core.bot import Red -from redbot.core import commands, Config from redbot.core.data_manager import bundled_data_path, cog_data_path -from .commands import CaptchaCommands +from ._tagscript import TAGSCRIPT_LIMIT as TAGSCRIPT_LIMIT +from ._tagscript import TagCharacterLimitReached as TagCharacterLimitReached +from ._tagscript import message_after_captcha as message_after_captcha_string +from ._tagscript import message_before_captcha as message_before_captcha_string +from ._tagscript import process_tagscript as process_tagscript from .abc import CompositeMetaClass +from .commands import CaptchaCommands from .objects import CaptchaObj -from ._tagscript import ( - message_before_captcha as message_before_captcha_string, - message_after_captcha as message_after_captcha_string, - process_tagscript as process_tagscript, - TAGSCRIPT_LIMIT as TAGSCRIPT_LIMIT, - TagCharacterLimitReached as TagCharacterLimitReached, -) DELETE_AFTER: Final[int] = 10 diff --git a/captcha/objects.py b/captcha/objects.py index 58f63275..dfe30d01 100644 --- a/captcha/objects.py +++ b/captcha/objects.py @@ -24,9 +24,10 @@ import random from io import BytesIO -from typing import Optional, TypeAlias, Union, Tuple, List, TYPE_CHECKING +from typing import TYPE_CHECKING, List, Optional, Tuple, TypeAlias, Union -from PIL.Image import new as create, Image, QUAD, BILINEAR +from PIL.Image import BILINEAR, QUAD, Image +from PIL.Image import new as create from PIL.ImageDraw import Draw, ImageDraw from PIL.ImageFilter import SMOOTH from PIL.ImageFont import FreeTypeFont, truetype