From 19e61c99e70469a7302c7955ae5dfba704235898 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 00:49:21 +0000 Subject: [PATCH] style: format code with Autopep8 and isort This commit fixes the style issues introduced in 74f2a40 according to the output from Autopep8 and isort. Details: None --- extensions/relations.py | 4 ++-- modules/anilist.py | 2 +- modules/myanimelist.py | 5 +++-- modules/platforms.py | 2 +- modules/simkl.py | 3 ++- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/extensions/relations.py b/extensions/relations.py index 8874daf2..cd8eca19 100644 --- a/extensions/relations.py +++ b/extensions/relations.py @@ -11,8 +11,8 @@ from classes.trakt import Trakt, TraktIdsStruct, TraktMediaStruct from modules.commons import save_traceback_to_file from modules.const import EMOJI_UNEXPECTED_ERROR -from modules.platforms import (get_platform_color, media_id_to_platform, - platforms_to_fields, PlatformLink) +from modules.platforms import (PlatformLink, get_platform_color, + media_id_to_platform, platforms_to_fields) class ExtenalSitesRelations(ipy.Extension): diff --git a/modules/anilist.py b/modules/anilist.py index 3dec262a..da381598 100644 --- a/modules/anilist.py +++ b/modules/anilist.py @@ -14,8 +14,8 @@ platform_exception_embed, sanitize_markdown, save_traceback_to_file, trim_synopsis) from modules.const import BANNED_TAGS, MESSAGE_WARN_CONTENTS -from modules.platforms import media_id_to_platform, Platform from modules.i18n import fetch_language_data +from modules.platforms import Platform, media_id_to_platform async def search_al_anime(title: str) -> list[dict[str, Any]]: diff --git a/modules/myanimelist.py b/modules/myanimelist.py index 956f4320..71ad9fe8 100644 --- a/modules/myanimelist.py +++ b/modules/myanimelist.py @@ -29,7 +29,7 @@ trim_synopsis) from modules.const import (EMOJI_FORBIDDEN, MESSAGE_WARN_CONTENTS, MYANIMELIST_CLIENT_ID, SIMKL_CLIENT_ID) -from modules.platforms import media_id_to_platform, Platform +from modules.platforms import Platform, media_id_to_platform def generate_animethemes_slug(title: str) -> str: @@ -471,7 +471,8 @@ async def generate_mal( buttons: list[Button] = [] if anime_api is not None: if anime_api.anilist is not None: - ext_id = media_id_to_platform(f"{anime_api.anilist}", Platform.ANILIST) + ext_id = media_id_to_platform( + f"{anime_api.anilist}", Platform.ANILIST) buttons.append( Button( style=ButtonStyle.URL, diff --git a/modules/platforms.py b/modules/platforms.py index e730e3d7..8a369093 100644 --- a/modules/platforms.py +++ b/modules/platforms.py @@ -3,8 +3,8 @@ from enum import Enum from typing import Any, Union -from interactions import EmbedField from dacite import from_dict +from interactions import EmbedField class Platform(Enum): diff --git a/modules/simkl.py b/modules/simkl.py index 9e819988..a48ec1ae 100644 --- a/modules/simkl.py +++ b/modules/simkl.py @@ -325,7 +325,8 @@ def create_simkl_embed( ipy.Button( style=ipy.ButtonStyle.LINK, url=pf.uid, - emoji=ipy.PartialEmoji(id=pf.emoid, name=pfn[platform["name"]]), + emoji=ipy.PartialEmoji( + id=pf.emoid, name=pfn[platform["name"]]), ) )