Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with Autopep8 and isort #223

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion modules/anilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]:
Expand Down
5 changes: 3 additions & 2 deletions modules/myanimelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion modules/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion modules/simkl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]),
)
)

Expand Down