From d09e70916d2eab6030fc56b70bc5f9cbd5571e28 Mon Sep 17 00:00:00 2001 From: "{{ github.actor }}" Date: Fri, 20 Oct 2023 20:05:45 +0000 Subject: [PATCH] Style Reformatting --- afk/__init__.py | 2 +- afk/_tagscript.py | 5 ++--- afk/core.py | 10 +++++----- afk/views.py | 4 ++-- tags/abc.py | 2 +- tags/converters.py | 2 +- tags/core.py | 4 ++-- tags/doc_parser.py | 2 +- tags/mixins/owner.py | 4 ++-- tags/mixins/processor.py | 2 +- tags/objects.py | 4 ++-- tags/utils.py | 2 +- tags/views.py | 4 ++-- 13 files changed, 23 insertions(+), 24 deletions(-) diff --git a/afk/__init__.py b/afk/__init__.py index 20dc6fae..eb7533d5 100644 --- a/afk/__init__.py +++ b/afk/__init__.py @@ -30,8 +30,8 @@ from redbot.core.bot import Red from redbot.core.errors import CogLoadError -from .core import AFK from ._tagscript import validate_tagscriptengine +from .core import AFK VERSION_RE: Pattern[str] = re.compile(r"AdvancedTagScriptEngine==(\d\.\d\.\d)") diff --git a/afk/_tagscript.py b/afk/_tagscript.py index d7bc78ed..a4032bc8 100644 --- a/afk/_tagscript.py +++ b/afk/_tagscript.py @@ -23,16 +23,15 @@ """ from importlib import reload -from typing import List, Final, Dict, Any, final, Tuple +from typing import Any, Dict, Final, List, Tuple, final import discord import TagScriptEngine as tse -from redbot.core.bot import Red from redbot.core import commands +from redbot.core.bot import Red from redbot.core.errors import CogLoadError from redbot.core.utils.chat_formatting import humanize_number - __all__: Tuple[str, ...] = ( "custom_message", "TAGSCRIPT_LIMIT", diff --git a/afk/core.py b/afk/core.py index 039af44b..cbe329a7 100644 --- a/afk/core.py +++ b/afk/core.py @@ -24,21 +24,21 @@ import logging from datetime import datetime, timezone -from typing import Dict, Union, List, Final, Optional, Literal +from typing import Dict, Final, List, Literal, Optional, Union import discord import TagScriptEngine as tse -from redbot.core.bot import Red from redbot.core import Config, commands -from redbot.core.utils.menus import menu, DEFAULT_CONTROLS +from redbot.core.bot import Red from redbot.core.utils.chat_formatting import humanize_list, pagify +from redbot.core.utils.menus import DEFAULT_CONTROLS, menu from ._tagscript import ( - _process_tagscript, + TAGSCRIPT_LIMIT, TagCharacterLimitReached, TagscriptConverter, + _process_tagscript, custom_message, - TAGSCRIPT_LIMIT, ) from .views import AFKPaginator, AFKView diff --git a/afk/views.py b/afk/views.py index 9a6f2262..897f5e43 100644 --- a/afk/views.py +++ b/afk/views.py @@ -22,11 +22,11 @@ SOFTWARE. """ -from typing import Dict, List, Optional, Any, Union, TYPE_CHECKING +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union import discord -from redbot.core.bot import Red from redbot.core import commands +from redbot.core.bot import Red if TYPE_CHECKING: from .core import AFK diff --git a/tags/abc.py b/tags/abc.py index 74646503..ab9d144d 100644 --- a/tags/abc.py +++ b/tags/abc.py @@ -23,9 +23,9 @@ SOFTWARE. """ -from aiohttp import ClientSession from abc import ABC, abstractmethod +from aiohttp import ClientSession from redbot.core import Config, commands from redbot.core.bot import Red diff --git a/tags/converters.py b/tags/converters.py index b630d353..9d4d61a7 100644 --- a/tags/converters.py +++ b/tags/converters.py @@ -24,7 +24,7 @@ """ import re -from typing import Optional, Pattern, Any, Match +from typing import Any, Match, Optional, Pattern from discord.utils import escape_mentions from redbot.core import commands diff --git a/tags/core.py b/tags/core.py index ad7afc22..5bef1eb0 100644 --- a/tags/core.py +++ b/tags/core.py @@ -24,12 +24,12 @@ """ import asyncio +import contextlib import logging import re -import contextlib from collections import defaultdict from operator import itemgetter -from typing import Any, Coroutine, List, Optional, Dict, Union, Final, Tuple +from typing import Any, Coroutine, Dict, Final, List, Optional, Tuple, Union import aiohttp import discord diff --git a/tags/doc_parser.py b/tags/doc_parser.py index 6e43eac0..74a60650 100644 --- a/tags/doc_parser.py +++ b/tags/doc_parser.py @@ -29,7 +29,7 @@ import os import re import zlib -from typing import Dict, Final, Generator, Pattern, Match, Optional +from typing import Dict, Final, Generator, Match, Optional, Pattern class SphinxObjectFileReader: diff --git a/tags/mixins/owner.py b/tags/mixins/owner.py index 69424130..894486a4 100644 --- a/tags/mixins/owner.py +++ b/tags/mixins/owner.py @@ -23,14 +23,14 @@ SOFTWARE. """ -import re import ast import inspect import logging +import re import textwrap import traceback -from typing import List, Dict, Optional, Literal, Pattern, Iterator from types import CodeType +from typing import Dict, Iterator, List, Literal, Optional, Pattern import discord import TagScriptEngine as tse diff --git a/tags/mixins/processor.py b/tags/mixins/processor.py index f2469310..ef2896d7 100644 --- a/tags/mixins/processor.py +++ b/tags/mixins/processor.py @@ -26,7 +26,7 @@ import asyncio import logging from copy import copy -from typing import Dict, List, Optional, Any, Union, Type +from typing import Any, Dict, List, Optional, Type, Union import discord import TagScriptEngine as tse diff --git a/tags/objects.py b/tags/objects.py index 274b97ba..a98d63de 100644 --- a/tags/objects.py +++ b/tags/objects.py @@ -24,13 +24,13 @@ """ from datetime import datetime, timezone -from typing import Any, List, Optional, Final, Tuple, Dict, Union +from typing import Any, Dict, Final, List, Optional, Tuple, Union import discord import TagScriptEngine as tse from redbot.core import Config, commands -from redbot.core.config import Group from redbot.core.bot import Red +from redbot.core.config import Group from redbot.core.utils.chat_formatting import box, humanize_list, humanize_number, inline, pagify from .errors import TagAliasError diff --git a/tags/utils.py b/tags/utils.py index 14884078..50308c80 100644 --- a/tags/utils.py +++ b/tags/utils.py @@ -24,7 +24,7 @@ """ from importlib import reload -from typing import Final, Generator, Sequence, List, Union +from typing import Final, Generator, List, Sequence, Union import discord from redbot.core import commands diff --git a/tags/views.py b/tags/views.py index bf3ba36b..1b209a5f 100644 --- a/tags/views.py +++ b/tags/views.py @@ -1,8 +1,8 @@ -from typing import Any, List, Optional, Tuple, Dict +from typing import Any, Dict, List, Optional, Tuple import discord -from redbot.core.bot import Red from redbot.core import commands +from redbot.core.bot import Red from redbot.vendored.discord.ext.menus import ListPageSource __all__ = ("ConfirmationView", "PageSource", "PaginatedView")