Skip to content

Commit

Permalink
Merge branch 'master' into fix/annotation-origin
Browse files Browse the repository at this point in the history
Signed-off-by: shiftinv <[email protected]>
  • Loading branch information
shiftinv authored Oct 26, 2023
2 parents 8b6858a + 3591556 commit 8b2953e
Show file tree
Hide file tree
Showing 55 changed files with 205 additions and 129 deletions.
1 change: 1 addition & 0 deletions changelog/1120.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|commands| Fix edge case in evaluation of multiple identical annotations with forwardrefs in a single signature.
1 change: 1 addition & 0 deletions changelog/1123.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix :meth:`Thread.permissions_for` not working in some cases due to an incorrect import.
1 change: 1 addition & 0 deletions changelog/1126.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make all "Supported Operations" container elements collapsible.
8 changes: 4 additions & 4 deletions disnake/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ class Game(BaseActivity):
This is typically displayed via **Playing** on the official Discord client.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -487,7 +487,7 @@ class Streaming(BaseActivity):
This is typically displayed via **Streaming** on the official Discord client.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -597,7 +597,7 @@ def __hash__(self) -> int:
class Spotify(_BaseActivity):
"""Represents a Spotify listening activity from Discord.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -770,7 +770,7 @@ def party_id(self) -> str:
class CustomActivity(BaseActivity):
"""Represents a Custom activity from Discord.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async def to_file(
class Asset(AssetMixin):
"""Represents a CDN asset on Discord.
.. container:: operations
.. collapse:: operations
.. describe:: str(x)
Expand Down
2 changes: 1 addition & 1 deletion disnake/audit_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ class AuditLogEntry(Hashable):
You can retrieve these via :meth:`Guild.audit_logs`,
or via the :func:`on_audit_log_entry_create` event.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
16 changes: 8 additions & 8 deletions disnake/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def _single_delete_strategy(messages: Iterable[Message]) -> None:
class TextChannel(disnake.abc.Messageable, disnake.abc.GuildChannel, Hashable):
"""Represents a Discord guild text channel.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -1217,7 +1217,7 @@ def permissions_for(
class VoiceChannel(disnake.abc.Messageable, VocalGuildChannel):
"""Represents a Discord guild voice channel.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -1871,7 +1871,7 @@ class StageChannel(disnake.abc.Messageable, VocalGuildChannel):
.. versionadded:: 1.7
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -2696,7 +2696,7 @@ class CategoryChannel(disnake.abc.GuildChannel, Hashable):
These are useful to group channels to logical compartments.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -3145,7 +3145,7 @@ class ForumChannel(disnake.abc.GuildChannel, Hashable):
.. versionadded:: 2.5
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -4184,7 +4184,7 @@ def get_tag_by_name(self, name: str, /) -> Optional[ForumTag]:
class DMChannel(disnake.abc.Messageable, Hashable):
"""Represents a Discord direct message channel.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -4347,7 +4347,7 @@ def get_partial_message(self, message_id: int, /) -> PartialMessage:
class GroupChannel(disnake.abc.Messageable, Hashable):
"""Represents a Discord group channel.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -4506,7 +4506,7 @@ class PartialMessageable(disnake.abc.Messageable, Hashable):
.. versionadded:: 2.0
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/colour.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Colour:
There is an alias for this called Color.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class _EmbedAuthorProxy(Sized, Protocol):
class Embed:
"""Represents a Discord embed.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Emoji(_EmojiTag, AssetMixin):
Depending on the way this object was created, some of the attributes can
have a value of ``None``.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
3 changes: 1 addition & 2 deletions disnake/ext/commands/common_bot_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import asyncio
import collections.abc
import importlib.machinery
import importlib.util
import logging
import os
Expand All @@ -19,8 +20,6 @@
from .cog import Cog

if TYPE_CHECKING:
import importlib.machinery

from ._types import CoroFunc
from .bot import AutoShardedBot, AutoShardedInteractionBot, Bot, InteractionBot
from .help import HelpCommand
Expand Down
2 changes: 1 addition & 1 deletion disnake/ext/commands/flag_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class FlagConverter(metaclass=FlagsMeta):
how this converter works, check the appropriate
:ref:`documentation <ext_commands_flag_converter>`.
.. container:: operations
.. collapse:: operations
.. describe:: iter(x)
Expand Down
2 changes: 1 addition & 1 deletion disnake/ext/commands/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CommandSyncFlags(BaseFlags):
.. versionadded:: 2.7
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/ext/commands/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
class Paginator:
"""A class that aids in paginating code blocks for Discord messages.
.. container:: operations
.. collapse:: operations
.. describe:: len(x)
Expand Down
22 changes: 11 additions & 11 deletions disnake/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class SystemChannelFlags(BaseFlags, inverted=True):
to enable or disable.
Arguments are applied in order, similar to :class:`Permissions`.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -491,7 +491,7 @@ class MessageFlags(BaseFlags):
See :class:`SystemChannelFlags`.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -681,7 +681,7 @@ def is_voice_message(self):
class PublicUserFlags(BaseFlags):
"""Wraps up the Discord User Public flags.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -930,7 +930,7 @@ class Intents(BaseFlags):
.. versionadded:: 1.5
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -1617,7 +1617,7 @@ class MemberCacheFlags(BaseFlags):
.. versionadded:: 1.5
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -1793,7 +1793,7 @@ def _voice_only(self):
class ApplicationFlags(BaseFlags):
"""Wraps up the Discord Application flags.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -1968,7 +1968,7 @@ def application_command_badge(self):
class ChannelFlags(BaseFlags):
"""Wraps up the Discord Channel flags.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -2081,7 +2081,7 @@ def require_tag(self):
class AutoModKeywordPresets(ListBaseFlags):
"""Wraps up the pre-defined auto moderation keyword lists, provided by Discord.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -2194,7 +2194,7 @@ def slurs(self):
class MemberFlags(BaseFlags):
"""Wraps up Discord Member flags.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -2296,7 +2296,7 @@ def started_onboarding(self):
class RoleFlags(BaseFlags):
"""Wraps up Discord Role flags.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -2376,7 +2376,7 @@ def in_prompt(self):
class AttachmentFlags(BaseFlags):
"""Wraps up Discord Attachment flags.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Guild(Hashable):
This is referred to as a "server" in the official Discord UI.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/guild_scheduled_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class GuildScheduledEvent(Hashable):
.. versionadded:: 2.3
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
6 changes: 3 additions & 3 deletions disnake/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PartialInviteChannel:
guild the :class:`Invite` resolves to.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -137,7 +137,7 @@ class PartialInviteGuild:
This model will be given when the user is not part of the
guild the :class:`Invite` resolves to.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -256,7 +256,7 @@ class Invite(Hashable):
Depending on the way this object was created, some of the attributes can
have a value of ``None`` (see table below).
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Member(disnake.abc.Messageable, _UserTag):
This implements a lot of the functionality of :class:`User`.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
6 changes: 3 additions & 3 deletions disnake/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async def _edit_handler(
class Attachment(Hashable):
"""Represents an attachment from Discord.
.. container:: operations
.. collapse:: operations
.. describe:: str(x)
Expand Down Expand Up @@ -766,7 +766,7 @@ def flatten_handlers(cls):
class Message(Hashable):
"""Represents a message from Discord.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down Expand Up @@ -2177,7 +2177,7 @@ class PartialMessage(Hashable):
.. versionadded:: 1.6
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
2 changes: 1 addition & 1 deletion disnake/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Object(Hashable):
receive this class rather than the actual data class. These cases are
extremely rare.
.. container:: operations
.. collapse:: operations
.. describe:: x == y
Expand Down
Loading

0 comments on commit 8b2953e

Please sign in to comment.