Skip to content

Commit

Permalink
fix: add missing imports and remove unused imports (#103)
Browse files Browse the repository at this point in the history
* fix: add missing imports

* chore: remove unused imports
  • Loading branch information
TheBobBobs committed Mar 2, 2024
1 parent 6fe2efd commit 1ca2190
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion voltage/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .messageable import Messageable
from .notsupplied import NotSupplied
from .permissions import Permissions
from .types import OverrideFieldPayload

if TYPE_CHECKING:
from .file import File
Expand All @@ -19,7 +20,6 @@
ChannelPayload,
DMChannelPayload,
GroupDMChannelPayload,
OverrideFieldPayload,
SavedMessagePayload,
TextChannelPayload,
VoiceChannelPayload,
Expand Down
1 change: 0 additions & 1 deletion voltage/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

from asyncio import Future, get_event_loop, wait_for
from re import search
from typing import TYPE_CHECKING, Any, Callable, Dict, Literal, Optional, Union

import aiohttp
Expand Down
2 changes: 1 addition & 1 deletion voltage/embed.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Dict, Optional, Union
from typing import TYPE_CHECKING, Optional, Union

from .asset import Asset

Expand Down
2 changes: 1 addition & 1 deletion voltage/ext/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import TYPE_CHECKING, Any, Awaitable, Callable

from voltage import BotNotEnoughPerms, Member, NotBotOwner, NotEnoughPerms, User
from voltage import BotNotEnoughPerms, Member, NotEnoughPerms, User

if TYPE_CHECKING:
from .command import Command, CommandContext
Expand Down
6 changes: 3 additions & 3 deletions voltage/ext/commands/command.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from __future__ import annotations

from asyncio import gather
from inspect import Parameter, _empty, isclass, ismethod, signature
from inspect import Parameter, _empty, isclass, signature
from itertools import zip_longest
from re import findall
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Optional, Union
from typing import TYPE_CHECKING, Any, Awaitable, Callable, Optional

# internal imports
from voltage import Member, MemberNotFound, Message, NotEnoughArgs, User, UserNotFound
from voltage import Member, Message, NotEnoughArgs

from . import converters

Expand Down
2 changes: 1 addition & 1 deletion voltage/internals/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from asyncio import AbstractEventLoop, gather
from time import time
from typing import TYPE_CHECKING, Any, Dict, Optional
from typing import TYPE_CHECKING, Dict, Optional

from ..channels import Channel, DMChannel, create_channel
from ..errors import HTTPError
Expand Down
2 changes: 0 additions & 2 deletions voltage/internals/http.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import annotations

from asyncio import gather
from io import BytesIO
from json import decoder, dumps
from typing import TYPE_CHECKING, Dict, List, Literal, Optional, Union

from aiohttp import ClientSession, FormData
Expand Down
1 change: 0 additions & 1 deletion voltage/internals/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import TYPE_CHECKING, Any, Callable, Dict

from ..channels import GroupDMChannel
from ..enums import RelationshipType

if TYPE_CHECKING:
from aiohttp import ClientSession, ClientWebSocketResponse
Expand Down
1 change: 0 additions & 1 deletion voltage/invites.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import TYPE_CHECKING, Union

# internal imports
from .asset import Asset
from .utils import get

if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion voltage/types/message.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Dict, List, TypedDict, Union
from typing import TYPE_CHECKING, Dict, List, TypedDict

from typing_extensions import NotRequired

Expand Down
4 changes: 2 additions & 2 deletions voltage/types/server.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Dict, List, Literal, Tuple, TypedDict
from typing import TYPE_CHECKING, Dict, List, Literal, TypedDict

from typing_extensions import NotRequired, Required
from typing_extensions import NotRequired

from voltage.types.channel import CategoryPayload

Expand Down
19 changes: 10 additions & 9 deletions voltage/types/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

from typing import TYPE_CHECKING, List, Literal, TypedDict, Union

from .channel import (
DMChannelPayload,
GroupDMChannelPayload,
SavedMessagePayload,
TextChannelPayload,
VoiceChannelPayload,
)
from .message import MessagePayload

if TYPE_CHECKING:
from .channel import (
ChannelPayload,
DMChannelPayload,
GroupDMChannelPayload,
SavedMessagePayload,
TextChannelPayload,
VoiceChannelPayload,
)
from .channel import ChannelPayload
from .embed import EmbedPayload
from .message import MessagePayload
from .server import MemberIDPayload, MemberPayload, ServerPayload
from .user import StatusPayload, UserPayload

Expand Down

0 comments on commit 1ca2190

Please sign in to comment.