This commit is contained in:
Zomatree
2022-04-25 13:40:39 +01:00
parent 7aa72d6e58
commit 0fdca7eb7d
22 changed files with 56 additions and 42 deletions
+1 -1
View File
@@ -12,8 +12,8 @@ from .http import HttpClient
from .invite import Invite
from .message import Message
from .state import State
from .websocket import WebsocketHandler
from .utils import Missing
from .websocket import WebsocketHandler
try:
import ujson as json
+4 -4
View File
@@ -2,17 +2,17 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Optional, Union
from .enums import EmbedType
from .asset import Asset
from .enums import EmbedType
if TYPE_CHECKING:
from .state import State
from .types import Embed as EmbedPayload
from .types import SendableEmbed as SendableEmbedPayload
from .types import WebsiteEmbed as WebsiteEmbedPayload
from .types import ImageEmbed as ImageEmbedPayload
from .types import TextEmbed as TextEmbedPayload
from .types import NoneEmbed as NoneEmbedPayload
from .types import SendableEmbed as SendableEmbedPayload
from .types import TextEmbed as TextEmbedPayload
from .types import WebsiteEmbed as WebsiteEmbedPayload
__all__ = ("Embed", "WebsiteEmbed", "ImageEmbed", "TextEmbed", "NoneEmbed", "to_embed", "SendableEmbed")
+1 -1
View File
@@ -1,9 +1,9 @@
from .checks import *
from .client import *
from .cog import *
from .command import *
from .context import *
from .converters import *
from .errors import *
from .group import *
from .help import *
from .cog import *
+6 -4
View File
@@ -1,21 +1,23 @@
from __future__ import annotations
import traceback
import sys
from typing import Any, Union, Protocol, runtime_checkable, Optional, TYPE_CHECKING
from typing_extensions import Self
import traceback
from importlib import import_module
from typing import (TYPE_CHECKING, Any, Optional, Protocol, Union,
runtime_checkable)
from typing_extensions import Self
import revolt
if TYPE_CHECKING:
from .help import HelpCommand
from .cog import Cog
from .command import Command
from .context import Context
from .errors import CheckError, CommandNotFound, MissingSetup
from .view import StringView
from .cog import Cog
__all__ = (
"CommandsMeta",
+1 -1
View File
@@ -1,6 +1,6 @@
from __future__ import annotations
from distutils import command
from distutils import command
from typing import TYPE_CHECKING, Any, Optional
from .command import Command
+2 -2
View File
@@ -13,10 +13,10 @@ from .errors import InvalidLiteralArgument, UnionConverterError
from .utils import evaluate_parameters
if TYPE_CHECKING:
from .context import Context
from .checks import Check
from .group import Group
from .cog import Cog
from .context import Context
from .group import Group
__all__ = (
"Command",
+1 -1
View File
@@ -1,6 +1,6 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Optional, Callable, Coroutine, Any
from typing import TYPE_CHECKING, Any, Callable, Coroutine, Optional
from .command import Command
+8 -6
View File
@@ -1,19 +1,21 @@
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, TypedDict, Union, Optional
from typing_extensions import NotRequired
from itertools import groupby
from typing import TYPE_CHECKING, Optional, TypedDict, Union
from typing_extensions import NotRequired
from .utils import evaluate_parameters
from .command import Command, command
from .client import CommandsClient
from .command import Command, command
from .context import Context
from .group import Group
from .utils import evaluate_parameters
if TYPE_CHECKING:
from revolt import File, Message, Messageable, MessageReply, SendableEmbed
from .cog import Cog
from revolt import SendableEmbed, File, MessageReply, Message, Messageable
__all__ = ("MessagePayload", "HelpCommand", "DefaultHelpCommand", "help_command_impl")
+1 -1
View File
@@ -1,5 +1,5 @@
from inspect import Parameter
from typing import Iterable, Any
from typing import Any, Iterable
__all__ = ("evaluate_parameters",)
+6 -4
View File
@@ -25,14 +25,16 @@ if TYPE_CHECKING:
from .types import Autumn as AutumnPayload
from .types import Channel, DMChannel
from .types import Embed as EmbedPayload
from .types import GetServerMembers, Invite
from .types import GetServerMembers, GroupDMChannel, Invite
from .types import Masquerade as MasqueradePayload
from .types import Member
from .types import Message as MessagePayload
from .types import (MessageReplyPayload, MessageWithUserData,
PartialInvite, Role, Server, ServerBans, TextChannel)
from .types import User as UserPayload
from .types import UserProfile, VoiceChannel, GroupDMChannel, Member
PartialInvite, Role)
from .types import SendableEmbed as SendableEmbedPayload
from .types import Server, ServerBans, TextChannel
from .types import User as UserPayload
from .types import UserProfile, VoiceChannel
__all__ = ("HttpClient",)
+2 -2
View File
@@ -5,14 +5,14 @@ from typing import TYPE_CHECKING, NamedTuple, Optional
from .asset import Asset, PartialAsset
from .channel import Messageable
from .embed import to_embed, SendableEmbed
from .embed import SendableEmbed, to_embed
if TYPE_CHECKING:
from .state import State
from .types import Embed as EmbedPayload
from .types import Masquerade as MasqueradePayload
from .types import Message as MessagePayload
from .types import MessageReplyPayload
from .types import Embed as EmbedPayload
__all__ = (
+1 -1
View File
@@ -2,8 +2,8 @@ from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from .utils import Missing
from .permissions import ChannelPermissions, ServerPermissions
from .utils import Missing
if TYPE_CHECKING:
from .server import Server
+2 -1
View File
@@ -13,11 +13,12 @@ if TYPE_CHECKING:
from .channel import TextChannel
from .member import Member
from .state import State
from .types import Ban
from .types import Category as CategoryPayload
from .types import File as FilePayload
from .types import Permission as PermissionPayload
from .types import Server as ServerPayload
from .types import SystemMessagesConfig, Ban
from .types import SystemMessagesConfig
__all__ = ("Server", "SystemMessages", "ServerBan")
+1
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Literal, TypedDict, Union
from typing_extensions import NotRequired
if TYPE_CHECKING:
+1
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Literal, TypedDict, Union
from typing_extensions import NotRequired
if TYPE_CHECKING:
+5 -6
View File
@@ -4,17 +4,16 @@ from typing import TYPE_CHECKING, Literal, TypedDict, Union
from .channel import (Channel, DMChannel, GroupDMChannel, SavedMessages,
TextChannel, VoiceChannel)
from .file import File
from .message import Message
from .user import Status
from .file import File
if TYPE_CHECKING:
from .member import Member, MemberID
from .server import Server
from .user import User
from .role import Permission
from .category import Category
from .server import SystemMessagesConfig
from .member import Member, MemberID
from .role import Permission
from .server import Server, SystemMessagesConfig
from .user import User
__all__ = (
"BasePayload",
+1
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING, TypedDict
from typing_extensions import NotRequired
if TYPE_CHECKING:
+1
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING, TypedDict, Union
from typing_extensions import NotRequired
if TYPE_CHECKING:
+1
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING, TypedDict
from typing_extensions import NotRequired
if TYPE_CHECKING:
+1
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
from typing import TYPE_CHECKING, Literal, TypedDict
from typing_extensions import NotRequired
if TYPE_CHECKING:
+3 -2
View File
@@ -1,9 +1,10 @@
import inspect
from contextlib import asynccontextmanager
from operator import attrgetter
from typing import Any, Callable, Coroutine, Iterable, TypeVar, Union
from contextlib import asynccontextmanager
from typing_extensions import ParamSpec
from aiohttp import ClientSession
from typing_extensions import ParamSpec
__all__ = ("Missing", "copy_doc", "maybe_coroutine", "get", "client_session")
+6 -5
View File
@@ -3,10 +3,14 @@ from __future__ import annotations
import asyncio
import logging
from copy import copy
from traceback import print_exception
from typing import TYPE_CHECKING, Callable, cast
from traceback import print_exception;
from .channel import GroupDMChannel, TextChannel, VoiceChannel
from .enums import RelationshipType
from .types import (ChannelCreateEventPayload, ChannelDeleteEventPayload,
ChannelDeleteTypingEventPayload,
ChannelStartTypingEventPayload, ChannelUpdateEventPayload)
from .types import Message as MessagePayload
from .types import (MessageDeleteEventPayload, MessageUpdateEventPayload,
ServerDeleteEventPayload, ServerMemberJoinEventPayload,
@@ -14,11 +18,8 @@ from .types import (MessageDeleteEventPayload, MessageUpdateEventPayload,
ServerMemberUpdateEventPayload,
ServerRoleDeleteEventPayload, ServerRoleUpdateEventPayload,
ServerUpdateEventPayload, UserRelationshipEventPayload,
UserUpdateEventPayload, ChannelCreateEventPayload, ChannelDeleteEventPayload,
ChannelDeleteTypingEventPayload,
ChannelStartTypingEventPayload, ChannelUpdateEventPayload)
UserUpdateEventPayload)
from .user import Status, UserProfile
from .channel import TextChannel, GroupDMChannel, VoiceChannel
try:
import ujson as json