diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1639de8f6..63f555b257 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: # - --remove-duplicate-keys # - --remove-unused-variables - repo: https://github.com/asottile/pyupgrade - rev: v3.3.0 + rev: v3.3.1 hooks: - id: pyupgrade args: [--py38-plus] @@ -27,7 +27,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 22.12.0 hooks: - id: black # See https://github.com/psf/black/issues/2188#issuecomment-1289317647 for why we can't use the --preview flag. diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a221ce1d..b67ace38bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,11 +20,18 @@ These changes are available on the `master` branch, but have not yet been releas ### Fixed +- Fixed bridge groups missing the `parent` attribute. + ([#1823](https://github.com/Pycord-Development/pycord/pull/1823)) + +## [2.3.2] - 2022-12-03 + +### Fixed + - Fixed another `AttributeError` relating to the new `bridge_commands` attribute on `ext.bridge.Bot`. ([#1815](https://github.com/Pycord-Development/pycord/pull/1815)) - Fixed an `AttributeError` in select relating to the select type. ([#1814](https://github.com/Pycord-Development/pycord/pull/1814)) -- Fix `Thread.applied_tags` always returning an empty list. +- Fixed `Thread.applied_tags` always returning an empty list. ([#1817](https://github.com/Pycord-Development/pycord/pull/1817)) ## [2.3.1] - 2022-11-27 diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py index c917310e89..22fad26f52 100644 --- a/discord/ext/bridge/core.py +++ b/discord/ext/bridge/core.py @@ -311,12 +311,17 @@ class BridgeCommandGroup(BridgeCommand): If :func:`map_to` is used, the mapped slash command. """ + ext_variant: BridgeExtGroup + slash_variant: BridgeSlashGroup + def __init__(self, callback, *args, **kwargs): - self.ext_variant: BridgeExtGroup = BridgeExtGroup(callback, *args, **kwargs) - name = kwargs.pop("name", self.ext_variant.name) - self.slash_variant: BridgeSlashGroup = BridgeSlashGroup( - callback, name, *args, **kwargs + super().__init__( + callback, + ext_variant=(ext_var := BridgeExtGroup(callback, *args, **kwargs)), + slash_variant=BridgeSlashGroup(callback, ext_var.name, *args, **kwargs), + parent=kwargs.pop("parent", None), ) + self.subcommands: list[BridgeCommand] = [] self.mapped: SlashCommand | None = None diff --git a/discord/utils.py b/discord/utils.py index 6cefb3531b..d4394658ec 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -1105,6 +1105,10 @@ def as_chunks(iterator: _Iter[T], max_size: int) -> _Iter[list[T]]: .. versionadded:: 2.0 + .. warning:: + + The last chunk collected may not be as large as ``max_size``. + Parameters ---------- iterator: Union[:class:`collections.abc.Iterator`, :class:`collections.abc.AsyncIterator`] @@ -1112,10 +1116,6 @@ def as_chunks(iterator: _Iter[T], max_size: int) -> _Iter[list[T]]: max_size: :class:`int` The maximum chunk size. - .. warning:: - - The last chunk collected may not be as large as ``max_size``. - Returns ------- Union[:class:`collections.abc.Iterator`, :class:`collections.abc.AsyncIterator`] diff --git a/docs/api/enums.rst b/docs/api/enums.rst index 8ab182c9d9..feaa2b1901 100644 --- a/docs/api/enums.rst +++ b/docs/api/enums.rst @@ -303,7 +303,7 @@ of :class:`enum.Enum`. The user is an Early Verified Bot Developer. .. attribute:: discord_certified_moderator - The user is a Discord Certified Moderator. + The user is a Moderator Programs Alumni. .. attribute:: bot_http_interactions The bot has set an interactions endpoint url. diff --git a/docs/migrating_to_v2.rst b/docs/migrating_to_v2.rst index 5706ccf1b5..0b1bf103e3 100644 --- a/docs/migrating_to_v2.rst +++ b/docs/migrating_to_v2.rst @@ -126,7 +126,7 @@ Intents Changes :attr:`Intents.message_content` is now a privileged intent. Disabling it causes :attr:`Message.content`, :attr:`Message.embeds`, :attr:`Message.components`, and :attr:`Message.attachments` to be empty (an empty string -or an empty array), directly causing :class:`ext.commands.Command`s to not run. +or an empty array), directly causing :class:`ext.commands.Command` s to not run. See `here `_ for more information. diff --git a/requirements/dev.txt b/requirements/dev.txt index 014f0ea337..867c487ea7 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,7 +1,7 @@ -r _.txt pylint~=2.15.8 pytest~=7.2.0 -pytest-asyncio~=0.20.2 +pytest-asyncio~=0.20.3 # pytest-order~=1.0.1 mypy~=0.991 coverage~=6.5