Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

fix: Requests Mixins aren't ABCs #634

Merged
merged 1 commit into from
Sep 9, 2022
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
3 changes: 1 addition & 2 deletions naff/api/http/http_requests/channels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from abc import ABC
from typing import TYPE_CHECKING, Optional, Sequence, cast, overload

import discord_typings
Expand All @@ -17,7 +16,7 @@
from naff.models.discord.snowflake import Snowflake_Type


class ChannelRequests(CanRequest, ABC):
class ChannelRequests(CanRequest):
async def get_channel(self, channel_id: "Snowflake_Type") -> discord_typings.ChannelData:
"""
Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included.
Expand Down
3 changes: 1 addition & 2 deletions naff/api/http/http_requests/emojis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from abc import ABC
from typing import TYPE_CHECKING, cast

import discord_typings
Expand All @@ -13,7 +12,7 @@
from naff.models.discord.snowflake import Snowflake_Type


class EmojiRequests(CanRequest, ABC):
class EmojiRequests(CanRequest):
async def get_all_guild_emoji(self, guild_id: "Snowflake_Type") -> list[discord_typings.EmojiData]:
"""
Get all the emoji from a guild.
Expand Down
3 changes: 1 addition & 2 deletions naff/api/http/http_requests/interactions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from abc import ABC
from typing import TYPE_CHECKING, cast

import discord_typings
Expand All @@ -15,7 +14,7 @@
from naff import UPLOADABLE_TYPE


class InteractionRequests(CanRequest, ABC):
class InteractionRequests(CanRequest):
async def delete_application_command(
self, application_id: "Snowflake_Type", guild_id: "Snowflake_Type", command_id: "Snowflake_Type"
) -> None:
Expand Down
3 changes: 1 addition & 2 deletions naff/api/http/http_requests/members.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from abc import ABC
from typing import TYPE_CHECKING, cast
from datetime import datetime

Expand All @@ -17,7 +16,7 @@
from naff.models.discord.snowflake import Snowflake_Type


class MemberRequests(CanRequest, ABC):
class MemberRequests(CanRequest):
async def get_member(
self, guild_id: "Snowflake_Type", user_id: "Snowflake_Type"
) -> discord_typings.GuildMemberData:
Expand Down
3 changes: 1 addition & 2 deletions naff/api/http/http_requests/messages.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from abc import ABC
from typing import TYPE_CHECKING, cast

import discord_typings
Expand All @@ -15,7 +14,7 @@
from naff import UPLOADABLE_TYPE


class MessageRequests(CanRequest, ABC):
class MessageRequests(CanRequest):
async def create_message(
self,
payload: dict,
Expand Down