Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
japandotorg committed Oct 25, 2023
2 parents ab0fee8 + 1e2001c commit 0008a2b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions captcha/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion captcha/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
26 changes: 12 additions & 14 deletions captcha/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions captcha/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0008a2b

Please sign in to comment.