From e4a3173dc749fd9a544e31aebd8004cdc747ae15 Mon Sep 17 00:00:00 2001 From: Paillat Date: Thu, 17 Apr 2025 17:55:50 +0200 Subject: [PATCH 01/21] :sparkles: Update to use python 3.14 --- .github/workflows/docs-checks.yml | 2 +- .github/workflows/docs-localization-download.yml | 2 +- .github/workflows/docs-localization-upload.yml | 2 +- .github/workflows/lib-checks.yml | 10 +++++----- .github/workflows/release.yml | 2 +- .readthedocs.yml | 2 +- README.rst | 2 +- pyproject.toml | 1 + 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml index a86e154832..68507c4a1b 100644 --- a/.github/workflows/docs-checks.yml +++ b/.github/workflows/docs-checks.yml @@ -40,7 +40,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/docs.txt" check-latest: true diff --git a/.github/workflows/docs-localization-download.yml b/.github/workflows/docs-localization-download.yml index ab743a40db..84f46220f2 100644 --- a/.github/workflows/docs-localization-download.yml +++ b/.github/workflows/docs-localization-download.yml @@ -21,7 +21,7 @@ jobs: - name: "Install Python" uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/_locale.txt" - name: "Install Dependencies" diff --git a/.github/workflows/docs-localization-upload.yml b/.github/workflows/docs-localization-upload.yml index 7667fc68af..3384f3223f 100644 --- a/.github/workflows/docs-localization-upload.yml +++ b/.github/workflows/docs-localization-upload.yml @@ -26,7 +26,7 @@ jobs: - name: "Install Python" uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/_locale.txt" - name: "Install Dependencies" diff --git a/.github/workflows/lib-checks.yml b/.github/workflows/lib-checks.yml index f1d937f9cd..f5edede82e 100644 --- a/.github/workflows/lib-checks.yml +++ b/.github/workflows/lib-checks.yml @@ -36,7 +36,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/dev.txt" - name: "Install dependencies" @@ -56,7 +56,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/dev.txt" - name: "Install dependencies" @@ -74,7 +74,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/dev.txt" - name: "Install dependencies" @@ -98,7 +98,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/dev.txt" - name: "Install dependencies" @@ -120,7 +120,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] exclude: - { python-version: "3.9", os: "macos-latest" } include: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c94658c2fb..82953a751c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,7 +92,7 @@ jobs: version-branch-name: ${{ needs.pre_config.outputs.branch_name }} ref: ${{ github.ref_name }} repository: ${{ github.repository }} - python-version: "3.13" + python-version: "3.14" release-requirements: "requirements/_release.txt" version: ${{ needs.pre_config.outputs.version }} is-rc: ${{ needs.pre_config.outputs.is_rc }} diff --git a/.readthedocs.yml b/.readthedocs.yml index 1b4720a322..08e9c920be 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,7 +4,7 @@ formats: [] build: os: ubuntu-22.04 tools: - python: "3.13" + python: "3.14" sphinx: configuration: docs/conf.py diff --git a/README.rst b/README.rst index 4518a946ed..b840ecfbf5 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,7 @@ Pycord is a modern, easy to use, feature-rich, and async ready API wrapper for D Note ---- -Pycord supports Python ``3.9`` - ``3.13`` +Pycord supports Python ``3.9`` - ``3.14`` Key Features ------------ diff --git a/pyproject.toml b/pyproject.toml index b9fd493eba..b2d9220cf4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Internet", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", From db16e2593e2849f00b69f711de9953d7b3be172d Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Thu, 9 Oct 2025 13:01:52 +0200 Subject: [PATCH 02/21] :rewind: Revert .readthedocs.yml python version bump --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 08e9c920be..1b4720a322 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,7 +4,7 @@ formats: [] build: os: ubuntu-22.04 tools: - python: "3.14" + python: "3.13" sphinx: configuration: docs/conf.py From 0013089517b14c56d833f9db1df0d9bb81aad7ab Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Thu, 9 Oct 2025 13:04:38 +0200 Subject: [PATCH 03/21] :memo: CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01e0f2b8fd..64ae6693c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ These changes are available on the `master` branch, but have not yet been releas - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, `ui.MentionableSelect`, and `ui.ChannelSelect`. +- Support for **Python 3.14**. + ([#2948](https://github.com/Pycord-Development/pycord/pull/2948)) ### Changed From c158bb264d6bf7415a37f8a05a7dd96d9d29df7b Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Wed, 22 Oct 2025 12:34:40 +0200 Subject: [PATCH 04/21] chore: fix changelog position Signed-off-by: Lala Sabathil --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 974f7a9bbc..6a4e7edecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ These changes are available on the `master` branch, but have not yet been releas ### Added +- Support for **Python 3.14**. + ([#2948](https://github.com/Pycord-Development/pycord/pull/2948)) + ### Changed ### Fixed @@ -42,8 +45,6 @@ These changes are available on the `master` branch, but have not yet been releas - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, `ui.MentionableSelect`, and `ui.ChannelSelect`. -- Support for **Python 3.14**. - ([#2948](https://github.com/Pycord-Development/pycord/pull/2948)) - Added `store` parameter to `View` and `Modal` classes. ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - Added `Webhook.parent` and `Webhook.from_interaction` From 820e5fdf2f5e1dd0561fe3e457eb474bb0bc46c6 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sat, 1 Nov 2025 15:10:35 +0100 Subject: [PATCH 05/21] fix: missing changes --- .github/workflows/docs-json-export.yml | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-json-export.yml b/.github/workflows/docs-json-export.yml index 869b1774d7..e63c95f3c2 100644 --- a/.github/workflows/docs-json-export.yml +++ b/.github/workflows/docs-json-export.yml @@ -18,7 +18,7 @@ jobs: uses: actions/setup-python@v6 id: setup-python with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/docs.txt" check-latest: true diff --git a/pyproject.toml b/pyproject.toml index 8b9a1fbc71..db7c91b225 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ authors = [ ] description = "A Python wrapper for the Discord API" readme = {content-type = "text/x-rst", file = "README.rst"} -requires-python = ">=3.10, <3.14" +requires-python = ">=3.10, <3.15" license = "MIT" license-files = ["LICENSE"] classifiers = [ @@ -68,7 +68,7 @@ voice = {file = "requirements/voice.txt"} [tool.setuptools_scm] [tool.black] -target-version = ['py310', 'py311', 'py312', 'py313'] +target-version = ['py310', 'py311', 'py312', 'py313', 'py314'] [tool.isort] profile = "black" From 7b5aad032edb2bfc08a3131a28726c092d206882 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sat, 1 Nov 2025 15:24:42 +0100 Subject: [PATCH 06/21] fix(actions): Stick to 3.13 for docs for now until rtd support 3.14 Ref: https://github.com/readthedocs/readthedocs.org/issues/12523#issuecomment-3436862569 --- .github/workflows/docs-checks.yml | 2 +- .github/workflows/docs-json-export.yml | 2 +- .github/workflows/docs-localization-download.yml | 2 +- .github/workflows/docs-localization-upload.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml index 8e35f953cb..fa224a9525 100644 --- a/.github/workflows/docs-checks.yml +++ b/.github/workflows/docs-checks.yml @@ -40,7 +40,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: "3.13" cache: "pip" cache-dependency-path: "requirements/docs.txt" check-latest: true diff --git a/.github/workflows/docs-json-export.yml b/.github/workflows/docs-json-export.yml index e63c95f3c2..869b1774d7 100644 --- a/.github/workflows/docs-json-export.yml +++ b/.github/workflows/docs-json-export.yml @@ -18,7 +18,7 @@ jobs: uses: actions/setup-python@v6 id: setup-python with: - python-version: "3.14" + python-version: "3.13" cache: "pip" cache-dependency-path: "requirements/docs.txt" check-latest: true diff --git a/.github/workflows/docs-localization-download.yml b/.github/workflows/docs-localization-download.yml index ef56afd5b2..90d025e3ff 100644 --- a/.github/workflows/docs-localization-download.yml +++ b/.github/workflows/docs-localization-download.yml @@ -21,7 +21,7 @@ jobs: - name: "Install Python" uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: "3.13" cache: "pip" cache-dependency-path: "requirements/_locale.txt" - name: "Install Dependencies" diff --git a/.github/workflows/docs-localization-upload.yml b/.github/workflows/docs-localization-upload.yml index 7882066aeb..c79fff65eb 100644 --- a/.github/workflows/docs-localization-upload.yml +++ b/.github/workflows/docs-localization-upload.yml @@ -26,7 +26,7 @@ jobs: - name: "Install Python" uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: "3.13" cache: "pip" cache-dependency-path: "requirements/_locale.txt" - name: "Install Dependencies" From 4dacf6fc3a7cac194aa3a844fb044adb221418ec Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Wed, 18 Mar 2026 11:24:28 +0100 Subject: [PATCH 07/21] chore: Docs should support 3.14 by now --- .github/workflows/docs-checks.yml | 4 ++-- .github/workflows/docs-json-export.yml | 4 ++-- .github/workflows/docs-localization-download.yml | 4 ++-- .github/workflows/docs-localization-upload.yml | 6 +++--- .readthedocs.yml | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs-checks.yml b/.github/workflows/docs-checks.yml index 85bfc8267d..65b1b68338 100644 --- a/.github/workflows/docs-checks.yml +++ b/.github/workflows/docs-checks.yml @@ -8,7 +8,7 @@ on: - "requirements/**" - "*.toml" - "*.py" - branches: [master] + branches: [ master ] pull_request: paths: - "discord/**" @@ -40,7 +40,7 @@ jobs: - name: "Setup Python" uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/docs.txt" check-latest: true diff --git a/.github/workflows/docs-json-export.yml b/.github/workflows/docs-json-export.yml index d9e5904273..f4f1f8d5a7 100644 --- a/.github/workflows/docs-json-export.yml +++ b/.github/workflows/docs-json-export.yml @@ -18,7 +18,7 @@ jobs: uses: actions/setup-python@v6 id: setup-python with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/docs.txt" check-latest: true @@ -45,7 +45,7 @@ jobs: run: | head -n 40 docs.json || tail -n 40 docs.json - name: Output artifact ID - run: | + run: | echo "artifact-id=${{ steps.artifact-upload.outputs.artifact-id }}" >> $GITHUB_OUTPUT echo "artifact-url=${{ steps.artifact-upload.outputs.artifact-url }}" >> $GITHUB_OUTPUT echo "::notice::Artifact uploaded: ${{ steps.artifact-upload.outputs.artifact-url }}" diff --git a/.github/workflows/docs-localization-download.yml b/.github/workflows/docs-localization-download.yml index d574d8fb7a..d38c43764c 100644 --- a/.github/workflows/docs-localization-download.yml +++ b/.github/workflows/docs-localization-download.yml @@ -21,7 +21,7 @@ jobs: - name: "Install Python" uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/_locale.txt" - name: "Install Dependencies" @@ -69,7 +69,7 @@ jobs: pr: name: "PR operations" - needs: [download] + needs: [ download ] runs-on: ubuntu-latest environment: translations steps: diff --git a/.github/workflows/docs-localization-upload.yml b/.github/workflows/docs-localization-upload.yml index 3d2c586e5f..b5757815d3 100644 --- a/.github/workflows/docs-localization-upload.yml +++ b/.github/workflows/docs-localization-upload.yml @@ -5,11 +5,11 @@ on: paths: - "discord/**" - "docs/**" - branches: [master] + branches: [ master ] workflow_dispatch: schedule: - cron: "0 0 * * 1" - + permissions: write-all jobs: @@ -26,7 +26,7 @@ jobs: - name: "Install Python" uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "requirements/_locale.txt" - name: "Install Dependencies" diff --git a/.readthedocs.yml b/.readthedocs.yml index ee1beb81d4..54236d5039 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,10 +1,10 @@ version: 2 -formats: [] +formats: [ ] build: os: ubuntu-22.04 tools: - python: "3.13" + python: "3.14" sphinx: configuration: docs/conf.py From c73d4ce947937501dc75bd3fe6ffcae40d96f12f Mon Sep 17 00:00:00 2001 From: Paillat Date: Fri, 27 Mar 2026 23:52:10 +0100 Subject: [PATCH 08/21] fix: Update event loop retrieval to support Python 3.14+ --- discord/client.py | 12 +++++++++--- discord/ext/commands/cooldowns.py | 3 ++- discord/ext/tasks/__init__.py | 8 ++++---- discord/http.py | 4 ++-- discord/ui/modal.py | 4 ++-- discord/utils.py | 18 ++++++++++++++++++ 6 files changed, 37 insertions(+), 12 deletions(-) diff --git a/discord/client.py b/discord/client.py index 211532d68d..f227ccf1df 100644 --- a/discord/client.py +++ b/discord/client.py @@ -70,7 +70,13 @@ from .threads import Thread from .ui.view import BaseView from .user import ClientUser, User -from .utils import _D, _FETCHABLE, MISSING, warn_if_voice_dependencies_missing +from .utils import ( + _D, + _FETCHABLE, + MISSING, + _get_event_loop, + warn_if_voice_dependencies_missing, +) from .webhook import Webhook from .widget import Widget @@ -147,7 +153,7 @@ class Client: loop: Optional[:class:`asyncio.AbstractEventLoop`] The :class:`asyncio.AbstractEventLoop` to use for asynchronous operations. Defaults to ``None``, in which case the default event loop is used via - :func:`asyncio.get_event_loop()`. + :func:`asyncio.get_event_loop()` if it exists or one is created via :func:`asyncio.new_event_loop()`. connector: Optional[:class:`aiohttp.BaseConnector`] The connector to use for connection pooling. proxy: Optional[:class:`str`] @@ -245,7 +251,7 @@ def __init__( # self.ws is set in the connect method self.ws: DiscordWebSocket = None # type: ignore self.loop: asyncio.AbstractEventLoop = ( - asyncio.get_event_loop() if loop is None else loop + _get_event_loop() if loop is None else loop ) self._listeners: dict[str, list[tuple[asyncio.Future, Callable[..., bool]]]] = ( {} diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index 6e58d37f7a..7504eed7c8 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -32,6 +32,7 @@ import discord.abc from discord.enums import Enum +from discord.utils import _get_event_loop from ...abc import PrivateChannel from .errors import MaxConcurrencyReached @@ -308,7 +309,7 @@ class _Semaphore: def __init__(self, number: int) -> None: self.value: int = number - self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() + self.loop: asyncio.AbstractEventLoop = _get_event_loop() self._waiters: Deque[asyncio.Future] = deque() def __repr__(self) -> str: diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 9bdde87f23..6bb719c67f 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -38,7 +38,7 @@ import discord from discord.backoff import ExponentialBackoff -from discord.utils import MISSING +from discord.utils import MISSING, _get_event_loop __all__ = ("loop",) @@ -384,7 +384,7 @@ def start(self, *args: Any, **kwargs: Any) -> asyncio.Task[None]: args = (self._injected, *args) if self.loop is MISSING: - self.loop = asyncio.get_event_loop() + self.loop = _get_event_loop() self._task = self.loop.create_task(self._loop(*args, **kwargs)) return self._task @@ -825,8 +825,8 @@ def loop( using an exponential back-off algorithm similar to the one used in :meth:`discord.Client.connect`. loop: :class:`asyncio.AbstractEventLoop` - The loop to use to register the task, if not given - defaults to :func:`asyncio.get_event_loop`. + The loop to use to register the task, if not given the default event loop is used via + :func:`asyncio.get_event_loop()` if it exists or one is created via :func:`asyncio.new_event_loop()`. overlap: Union[:class:`bool`, :class:`int`] Controls whether overlapping executions of the task loop are allowed. Set to False (default) to run iterations one at a time, True for unlimited overlap, or an int to cap the number of concurrent runs. diff --git a/discord/http.py b/discord/http.py index 0717feadf5..fc6ffb22c3 100644 --- a/discord/http.py +++ b/discord/http.py @@ -55,7 +55,7 @@ from .file import VoiceMessage from .gateway import DiscordClientWebSocketResponse from .soundboard import PartialSoundboardSound, SoundboardSound -from .utils import MISSING +from .utils import MISSING, _get_event_loop _log = logging.getLogger(__name__) @@ -192,7 +192,7 @@ def __init__( unsync_clock: bool = True, ) -> None: self.loop: asyncio.AbstractEventLoop = ( - asyncio.get_event_loop() if loop is None else loop + _get_event_loop() if loop is None else loop ) self.connector = connector self.__session: aiohttp.ClientSession = MISSING # filled in static_login diff --git a/discord/ui/modal.py b/discord/ui/modal.py index 6bb3a21d6a..67c68913f9 100644 --- a/discord/ui/modal.py +++ b/discord/ui/modal.py @@ -33,7 +33,7 @@ from typing import TYPE_CHECKING, Any, Iterator, TypeVar from ..enums import ComponentType -from ..utils import find +from ..utils import _get_event_loop, find from .core import ItemInterface from .input_text import InputText from .item import ModalItem @@ -91,7 +91,7 @@ def __init__( for item in children: self.add_item(item) self._title = title - self.loop = asyncio.get_event_loop() + self.loop = _get_event_loop() def __repr__(self) -> str: attrs = " ".join( diff --git a/discord/utils.py b/discord/utils.py index cc6d9d3b19..d2e382fc53 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -1665,3 +1665,21 @@ def warn_if_voice_dependencies_missing() -> None: deps, "is" if len(missing) == 1 else "are", ) + + +def _get_event_loop() -> asyncio.AbstractEventLoop: + """Get the current event loop, creating one if necessary. + + Returns + ------- + asyncio.AbstractEventLoop + The current event loop. + """ + if sys.version_info >= (3, 14): + try: + loop = asyncio.get_running_loop() + except RuntimeError: + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + return loop + return asyncio.get_event_loop() From b918f97be1250a33fe27b646ca23df2c472570ac Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 28 Mar 2026 00:07:48 +0100 Subject: [PATCH 09/21] chore: Run pyupgrade --py310-plus on codebase --- discord/__main__.py | 3 +-- discord/abc.py | 4 +--- discord/audit_logs.py | 3 ++- discord/backoff.py | 3 ++- discord/bot.py | 5 +---- discord/channel.py | 5 +---- discord/client.py | 5 +---- discord/cog.py | 6 ++---- discord/commands/context.py | 2 +- discord/commands/core.py | 10 ++++----- discord/commands/options.py | 29 +++++++++++++------------- discord/commands/permissions.py | 2 +- discord/components.py | 3 ++- discord/embeds.py | 3 ++- discord/emoji.py | 3 ++- discord/ext/bridge/core.py | 4 ++-- discord/ext/commands/_types.py | 3 ++- discord/ext/commands/bot.py | 3 ++- discord/ext/commands/cog.py | 3 ++- discord/ext/commands/converter.py | 7 +++---- discord/ext/commands/cooldowns.py | 3 ++- discord/ext/commands/core.py | 7 ++++--- discord/ext/commands/errors.py | 3 ++- discord/ext/commands/flags.py | 4 +++- discord/ext/pages/pagination.py | 3 +-- discord/ext/tasks/__init__.py | 4 ++-- discord/flags.py | 3 ++- discord/guild.py | 6 ++---- discord/http.py | 5 +---- discord/interactions.py | 3 ++- discord/iterators.py | 8 ++----- discord/message.py | 4 +--- discord/oggparse.py | 3 ++- discord/opus.py | 3 ++- discord/permissions.py | 3 ++- discord/player.py | 3 ++- discord/shard.py | 3 ++- discord/soundboard.py | 3 ++- discord/state.py | 4 +--- discord/threads.py | 3 ++- discord/types/interactions.py | 4 ++-- discord/types/snowflake.py | 4 ++-- discord/ui/action_row.py | 4 ++-- discord/ui/button.py | 3 ++- discord/ui/container.py | 3 ++- discord/ui/core.py | 3 ++- discord/ui/item.py | 3 ++- discord/ui/label.py | 4 ++-- discord/ui/modal.py | 3 ++- discord/ui/section.py | 3 ++- discord/ui/select.py | 4 ++-- discord/ui/view.py | 3 +-- discord/utils.py | 18 +++++++++------- discord/voice/packets/core.py | 2 +- discord/voice/packets/rtp.py | 2 +- examples/app_commands/slash_options.py | 2 +- examples/converters.py | 5 +---- examples/secret.py | 9 +++----- examples/views/tic_tac_toe.py | 3 +-- 59 files changed, 129 insertions(+), 137 deletions(-) diff --git a/discord/__main__.py b/discord/__main__.py index ed34bdf42a..b9b995500a 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -28,7 +28,6 @@ import platform import sys from pathlib import Path -from typing import Tuple import aiohttp @@ -352,7 +351,7 @@ def add_newcog_args(subparser: argparse._SubParsersAction) -> None: ) -def parse_args() -> Tuple[argparse.ArgumentParser, argparse.Namespace]: +def parse_args() -> tuple[argparse.ArgumentParser, argparse.Namespace]: parser = argparse.ArgumentParser( prog="discord", description="Tools for helping with Pycord" ) diff --git a/discord/abc.py b/discord/abc.py index e7a585b9ae..ec6eb415cb 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -28,13 +28,11 @@ import asyncio import copy import time +from collections.abc import Callable, Iterable, Sequence from typing import ( TYPE_CHECKING, Any, - Callable, - Iterable, Protocol, - Sequence, TypeVar, Union, overload, diff --git a/discord/audit_logs.py b/discord/audit_logs.py index b2f6a72393..e944149fd6 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -26,8 +26,9 @@ from __future__ import annotations import datetime +from collections.abc import Callable, Generator from functools import cached_property -from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generator, TypeVar +from typing import TYPE_CHECKING, Any, ClassVar, TypeVar from . import enums, utils from .asset import Asset diff --git a/discord/backoff.py b/discord/backoff.py index 819c7d3cee..078f14e218 100644 --- a/discord/backoff.py +++ b/discord/backoff.py @@ -27,7 +27,8 @@ import random import time -from typing import Callable, Generic, Literal, TypeVar, overload +from collections.abc import Callable +from typing import Generic, Literal, TypeVar, overload T = TypeVar("T", bool, Literal[True], Literal[False]) diff --git a/discord/bot.py b/discord/bot.py index 5ba5f9b5df..1f6d52e220 100644 --- a/discord/bot.py +++ b/discord/bot.py @@ -34,14 +34,11 @@ import sys import traceback from abc import ABC, abstractmethod +from collections.abc import Callable, Coroutine, Generator, Mapping from typing import ( TYPE_CHECKING, Any, - Callable, - Coroutine, - Generator, Literal, - Mapping, TypeVar, ) diff --git a/discord/channel.py b/discord/channel.py index 2a6d5182ac..4714093e32 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -26,14 +26,11 @@ from __future__ import annotations import datetime +from collections.abc import Callable, Iterable, Mapping, Sequence from typing import ( TYPE_CHECKING, Any, - Callable, - Iterable, - Mapping, NamedTuple, - Sequence, TypeVar, overload, ) diff --git a/discord/client.py b/discord/client.py index f227ccf1df..3bc99d533e 100644 --- a/discord/client.py +++ b/discord/client.py @@ -30,14 +30,11 @@ import signal import sys import traceback +from collections.abc import Callable, Coroutine, Generator, Sequence from types import TracebackType from typing import ( TYPE_CHECKING, Any, - Callable, - Coroutine, - Generator, - Sequence, TypeVar, ) diff --git a/discord/cog.py b/discord/cog.py index 5fbe6e61a4..d514e1febf 100644 --- a/discord/cog.py +++ b/discord/cog.py @@ -31,18 +31,16 @@ import pathlib import sys import types -from collections.abc import Generator, Mapping +from collections.abc import Callable, Generator, Mapping from typing import ( TYPE_CHECKING, Any, - Callable, ClassVar, + TypeGuard, TypeVar, overload, ) -from typing_extensions import TypeGuard - import discord.utils from . import errors diff --git a/discord/commands/context.py b/discord/commands/context.py index e97f19fa0f..b7206d0946 100644 --- a/discord/commands/context.py +++ b/discord/commands/context.py @@ -32,7 +32,7 @@ from discord.webhook.async_ import Webhook if TYPE_CHECKING: - from typing import Awaitable, Callable + from collections.abc import Awaitable, Callable from typing_extensions import ParamSpec diff --git a/discord/commands/core.py b/discord/commands/core.py index 0f721f15a0..10c2c2b386 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -33,13 +33,11 @@ import sys import types from collections import OrderedDict +from collections.abc import Callable, Coroutine, Generator from enum import Enum from typing import ( TYPE_CHECKING, Any, - Callable, - Coroutine, - Generator, Generic, TypeVar, Union, @@ -72,7 +70,7 @@ if sys.version_info >= (3, 11): from typing import Annotated, Literal, get_args, get_origin else: - from typing_extensions import Annotated, Literal, get_args, get_origin + from typing import Annotated, Literal, get_args, get_origin __all__ = ( "_BaseCommand", @@ -90,7 +88,9 @@ ) if TYPE_CHECKING: - from typing_extensions import Concatenate, ParamSpec + from typing import Concatenate + + from typing_extensions import ParamSpec from .. import Permissions from ..cog import Cog diff --git a/discord/commands/options.py b/discord/commands/options.py index 6567d0c4e7..a7d7d682ce 100644 --- a/discord/commands/options.py +++ b/discord/commands/options.py @@ -35,7 +35,6 @@ Any, Literal, Optional, - Type, TypeVar, Union, get_args, @@ -72,22 +71,22 @@ from ..user import User InputType = Union[ - Type[str], - Type[bool], - Type[int], - Type[float], - Type[GuildChannel], - Type[Thread], - Type[Member], - Type[User], - Type[Attachment], - Type[Role], - Type[Mentionable], + type[str], + type[bool], + type[int], + type[float], + type[GuildChannel], + type[Thread], + type[Member], + type[User], + type[Attachment], + type[Role], + type[Mentionable], SlashCommandOptionType, Converter, - Type[Converter], - Type[Enum], - Type[DiscordEnum], + type[Converter], + type[Enum], + type[DiscordEnum], ] AutocompleteReturnType = Union[ diff --git a/discord/commands/permissions.py b/discord/commands/permissions.py index daf633b05a..c1ed4f481e 100644 --- a/discord/commands/permissions.py +++ b/discord/commands/permissions.py @@ -23,7 +23,7 @@ DEALINGS IN THE SOFTWARE. """ -from typing import Callable +from collections.abc import Callable from ..enums import InteractionContextType from ..permissions import Permissions diff --git a/discord/components.py b/discord/components.py index d6e1eb89a8..cc1d2f76ac 100644 --- a/discord/components.py +++ b/discord/components.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, ClassVar, Iterator, TypeVar, overload +from collections.abc import Iterator +from typing import TYPE_CHECKING, Any, ClassVar, TypeVar, overload from .asset import AssetMixin from .colour import Colour diff --git a/discord/embeds.py b/discord/embeds.py index fbdf35c619..31bdd959eb 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -26,7 +26,8 @@ from __future__ import annotations import datetime -from typing import TYPE_CHECKING, Any, Mapping, TypeVar +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar from . import utils from .colour import Colour diff --git a/discord/emoji.py b/discord/emoji.py index 39a224b18a..e694e846b9 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Iterator, Literal +from collections.abc import Iterator +from typing import TYPE_CHECKING, Any, Literal from .asset import Asset, AssetMixin from .partial_emoji import PartialEmoji, _EmojiTag diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py index e61daa576f..e2c40299ad 100644 --- a/discord/ext/bridge/core.py +++ b/discord/ext/bridge/core.py @@ -26,8 +26,8 @@ from __future__ import annotations import inspect -from collections.abc import Iterator -from typing import TYPE_CHECKING, Any, Callable +from collections.abc import Callable, Iterator +from typing import TYPE_CHECKING, Any import discord.commands.options from discord import ( diff --git a/discord/ext/commands/_types.py b/discord/ext/commands/_types.py index d3f0336471..643dfd7ab0 100644 --- a/discord/ext/commands/_types.py +++ b/discord/ext/commands/_types.py @@ -23,7 +23,8 @@ DEALINGS IN THE SOFTWARE. """ -from typing import TYPE_CHECKING, Any, Callable, Coroutine, TypeVar, Union +from collections.abc import Callable, Coroutine +from typing import TYPE_CHECKING, Any, TypeVar, Union if TYPE_CHECKING: from .cog import Cog diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index d348b6c536..0b050a7b8f 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -29,7 +29,8 @@ import collections.abc import sys import traceback -from typing import TYPE_CHECKING, Any, Callable, Coroutine, Iterable, TypeVar +from collections.abc import Callable, Coroutine, Iterable +from typing import TYPE_CHECKING, Any, TypeVar import discord diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 871d3e816e..ac93818475 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable, Generator, TypeVar +from collections.abc import Callable, Generator +from typing import TYPE_CHECKING, Any, TypeVar import discord diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index ca5a109f3f..25124379e0 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -27,12 +27,11 @@ import inspect import re +from collections.abc import Iterable from typing import ( TYPE_CHECKING, Any, Generic, - Iterable, - List, Literal, Protocol, TypeVar, @@ -1023,7 +1022,7 @@ def repl(match: re.Match) -> str: return discord.utils.escape_mentions(result) -class Greedy(List[T]): +class Greedy(list[T]): r"""A special converter that greedily consumes arguments until it can't. As a consequence of this behaviour, most input errors are silently discarded, since it is used as an indicator of when to stop parsing. @@ -1100,7 +1099,7 @@ def get_converter(param: inspect.Parameter) -> Any: return converter -_GenericAlias = type(List[T]) +_GenericAlias = type(list[T]) def is_generic_type(tp: Any, *, _GenericAlias: type = _GenericAlias) -> bool: diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index 7504eed7c8..c2fe07b702 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -28,7 +28,8 @@ import asyncio import time from collections import deque -from typing import TYPE_CHECKING, Any, Callable, Deque, TypeVar +from collections.abc import Callable +from typing import TYPE_CHECKING, Any, Deque, TypeVar import discord.abc from discord.enums import Enum diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 4a58ecfca3..33fd62f0c0 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -30,11 +30,10 @@ import functools import inspect import types +from collections.abc import Callable, Generator from typing import ( TYPE_CHECKING, Any, - Callable, - Generator, Generic, Literal, TypeVar, @@ -67,7 +66,9 @@ from .errors import * if TYPE_CHECKING: - from typing_extensions import Concatenate, ParamSpec, TypeGuard + from typing import Concatenate, TypeGuard + + from typing_extensions import ParamSpec from discord.message import Message diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py index c768fd7c00..8263af7150 100644 --- a/discord/ext/commands/errors.py +++ b/discord/ext/commands/errors.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable +from collections.abc import Callable +from typing import TYPE_CHECKING, Any from discord.errors import ClientException, DiscordException diff --git a/discord/ext/commands/flags.py b/discord/ext/commands/flags.py index ec218b891f..0c2b925b74 100644 --- a/discord/ext/commands/flags.py +++ b/discord/ext/commands/flags.py @@ -28,8 +28,10 @@ import inspect import re import sys +from collections.abc import Iterator from dataclasses import dataclass, field -from typing import TYPE_CHECKING, Any, Iterator, Literal, Pattern, TypeVar, Union +from re import Pattern +from typing import TYPE_CHECKING, Any, Literal, TypeVar, Union from discord.utils import ( MISSING, diff --git a/discord/ext/pages/pagination.py b/discord/ext/pages/pagination.py index ab40be08ec..0d9218b581 100644 --- a/discord/ext/pages/pagination.py +++ b/discord/ext/pages/pagination.py @@ -25,7 +25,6 @@ from __future__ import annotations import contextlib -from typing import List import discord from discord.errors import DiscordException @@ -935,7 +934,7 @@ def get_page_content( return Page(content=None, embeds=[], files=[page]) elif isinstance(page, discord.ui.View): return Page(content=None, embeds=[], files=[], custom_view=page) - elif isinstance(page, List): + elif isinstance(page, list): if all(isinstance(x, discord.Embed) for x in page): return Page(content=None, embeds=page, files=[]) if all(isinstance(x, discord.File) for x in page): diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 6bb719c67f..c1d1e72274 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -31,8 +31,8 @@ import inspect import sys import traceback -from collections.abc import Sequence -from typing import Any, Awaitable, Callable, Generic, TypeVar, cast +from collections.abc import Awaitable, Callable, Sequence +from typing import Any, Generic, TypeVar, cast import aiohttp diff --git a/discord/flags.py b/discord/flags.py index 53c1ccd98b..875276df35 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import Any, Callable, ClassVar, Iterator, TypeVar, overload +from collections.abc import Callable, Iterator +from typing import Any, ClassVar, TypeVar, overload from .enums import UserFlags diff --git a/discord/guild.py b/discord/guild.py index 63ba4aee5a..f995dd3222 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -28,15 +28,13 @@ import copy import datetime import unicodedata +from collections.abc import Sequence from typing import ( TYPE_CHECKING, Any, ClassVar, - List, NamedTuple, Optional, - Sequence, - Tuple, TypeVar, Union, overload, @@ -133,7 +131,7 @@ GuildChannel = Union[ VoiceChannel, StageChannel, TextChannel, ForumChannel, CategoryChannel ] - ByCategoryItem = Tuple[Optional[CategoryChannel], List[GuildChannel]] + ByCategoryItem = tuple[Optional[CategoryChannel], list[GuildChannel]] T = TypeVar("T") diff --git a/discord/http.py b/discord/http.py index fc6ffb22c3..40ebcd7c1f 100644 --- a/discord/http.py +++ b/discord/http.py @@ -29,13 +29,10 @@ import logging import sys import weakref +from collections.abc import AsyncGenerator, Coroutine, Iterable, Sequence from typing import ( TYPE_CHECKING, Any, - AsyncGenerator, - Coroutine, - Iterable, - Sequence, TypeVar, ) from urllib.parse import quote as _uriquote diff --git a/discord/interactions.py b/discord/interactions.py index b325e4c20f..a77ab8f9f8 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -27,7 +27,8 @@ import asyncio import datetime -from typing import TYPE_CHECKING, Any, Coroutine, Union, overload +from collections.abc import Coroutine +from typing import TYPE_CHECKING, Any, Union, overload from typing_extensions import deprecated diff --git a/discord/iterators.py b/discord/iterators.py index b074aefdc4..c436f642f7 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -27,14 +27,10 @@ import asyncio import datetime +from collections.abc import AsyncIterator, Awaitable, Callable, Generator from typing import ( TYPE_CHECKING, Any, - AsyncIterator, - Awaitable, - Callable, - Generator, - List, TypeVar, Union, ) @@ -137,7 +133,7 @@ def _identity(x): return x -class _ChunkedAsyncIterator(_AsyncIterator[List[T]]): +class _ChunkedAsyncIterator(_AsyncIterator[list[T]]): def __init__(self, iterator, max_size): self.iterator = iterator self.max_size = max_size diff --git a/discord/message.py b/discord/message.py index 736397ee4e..0d4703d4c5 100644 --- a/discord/message.py +++ b/discord/message.py @@ -28,14 +28,12 @@ import datetime import io import re +from collections.abc import AsyncGenerator, Callable, Sequence from os import PathLike from typing import ( TYPE_CHECKING, Any, - AsyncGenerator, - Callable, ClassVar, - Sequence, TypeVar, Union, overload, diff --git a/discord/oggparse.py b/discord/oggparse.py index 4901c38b77..70dc7f2e25 100644 --- a/discord/oggparse.py +++ b/discord/oggparse.py @@ -26,7 +26,8 @@ from __future__ import annotations import struct -from typing import IO, TYPE_CHECKING, ClassVar, Generator +from collections.abc import Generator +from typing import IO, TYPE_CHECKING, ClassVar from .errors import DiscordException diff --git a/discord/opus.py b/discord/opus.py index f6c42fdd04..35f3e665aa 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -33,7 +33,8 @@ import os.path import struct import sys -from typing import TYPE_CHECKING, Any, Callable, Literal, TypedDict, TypeVar +from collections.abc import Callable +from typing import TYPE_CHECKING, Any, Literal, TypedDict, TypeVar try: import davey diff --git a/discord/permissions.py b/discord/permissions.py index fad9cdf1f7..17f77fede0 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable, ClassVar, Iterator, TypeVar +from collections.abc import Callable, Iterator +from typing import TYPE_CHECKING, Any, ClassVar, TypeVar from .flags import BaseFlags, alias_flag_value, fill_with_flags, flag_value diff --git a/discord/player.py b/discord/player.py index f80bba9c1f..007bd7e8d7 100644 --- a/discord/player.py +++ b/discord/player.py @@ -37,8 +37,9 @@ import threading import time import warnings +from collections.abc import Callable from math import floor -from typing import IO, TYPE_CHECKING, Any, Callable, Generic, TypeVar +from typing import IO, TYPE_CHECKING, Any, Generic, TypeVar from .enums import SpeakingState from .errors import ClientException diff --git a/discord/shard.py b/discord/shard.py index fd6a08a047..6d5dfc4dbf 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -27,7 +27,8 @@ import asyncio import logging -from typing import TYPE_CHECKING, Any, Callable, TypeVar +from collections.abc import Callable +from typing import TYPE_CHECKING, Any, TypeVar import aiohttp diff --git a/discord/soundboard.py b/discord/soundboard.py index 6fae037090..d320cc2ab3 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -24,7 +24,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Coroutine +from collections.abc import Coroutine +from typing import TYPE_CHECKING, Any from typing_extensions import override diff --git a/discord/state.py b/discord/state.py index 574c973c52..759fa26a66 100644 --- a/discord/state.py +++ b/discord/state.py @@ -32,13 +32,11 @@ import logging import os from collections import OrderedDict, deque +from collections.abc import Callable, Coroutine, Sequence from typing import ( TYPE_CHECKING, Any, - Callable, - Coroutine, Deque, - Sequence, TypeVar, Union, ) diff --git a/discord/threads.py b/discord/threads.py index 8d7781770a..2a9a4bb6d5 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Callable, Iterable +from collections.abc import Callable, Iterable +from typing import TYPE_CHECKING from .abc import Messageable, _purge_messages_helper from .enums import ( diff --git a/discord/types/interactions.py b/discord/types/interactions.py index 3f45e35c19..da1c345f64 100644 --- a/discord/types/interactions.py +++ b/discord/types/interactions.py @@ -25,7 +25,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Dict, Literal, Union +from typing import TYPE_CHECKING, Literal, Union from ..permissions import Permissions from .channel import ChannelType @@ -272,7 +272,7 @@ class EditApplicationCommand(TypedDict): ApplicationIntegrationType = Literal[0, 1] _StringApplicationIntegrationType = Literal["0", "1"] -AuthorizingIntegrationOwners = Dict[_StringApplicationIntegrationType, Snowflake] +AuthorizingIntegrationOwners = dict[_StringApplicationIntegrationType, Snowflake] class InteractionCallbackResponse(TypedDict): diff --git a/discord/types/snowflake.py b/discord/types/snowflake.py index 1d28831570..3b89d29323 100644 --- a/discord/types/snowflake.py +++ b/discord/types/snowflake.py @@ -23,7 +23,7 @@ DEALINGS IN THE SOFTWARE. """ -from typing import List, Union +from typing import Union Snowflake = Union[str, int] -SnowflakeList = List[Snowflake] +SnowflakeList = list[Snowflake] diff --git a/discord/ui/action_row.py b/discord/ui/action_row.py index a947f33f1e..730a1b2905 100644 --- a/discord/ui/action_row.py +++ b/discord/ui/action_row.py @@ -24,9 +24,9 @@ from __future__ import annotations -from collections.abc import Sequence +from collections.abc import Iterator, Sequence from functools import partial -from typing import TYPE_CHECKING, ClassVar, Iterator, Literal, TypeVar, overload +from typing import TYPE_CHECKING, ClassVar, Literal, TypeVar, overload from ..components import ActionRow as ActionRowComponent from ..components import SelectDefaultValue, SelectOption, _component_factory diff --git a/discord/ui/button.py b/discord/ui/button.py index 7ba2a3a34e..a8ad878c38 100644 --- a/discord/ui/button.py +++ b/discord/ui/button.py @@ -27,7 +27,8 @@ import inspect import os -from typing import TYPE_CHECKING, Callable, TypeVar +from collections.abc import Callable +from typing import TYPE_CHECKING, TypeVar from ..components import Button as ButtonComponent from ..enums import ButtonStyle, ComponentType diff --git a/discord/ui/container.py b/discord/ui/container.py index 0ebd72a2b4..480e749f34 100644 --- a/discord/ui/container.py +++ b/discord/ui/container.py @@ -24,7 +24,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Iterator, TypeVar +from collections.abc import Iterator +from typing import TYPE_CHECKING, TypeVar from ..colour import Colour from ..components import Container as ContainerComponent diff --git a/discord/ui/core.py b/discord/ui/core.py index 21bb16871a..c98a2265aa 100644 --- a/discord/ui/core.py +++ b/discord/ui/core.py @@ -26,8 +26,9 @@ import asyncio import time +from collections.abc import Callable from itertools import groupby -from typing import TYPE_CHECKING, Any, Callable +from typing import TYPE_CHECKING, Any from ..utils import find, get from .item import Item, ItemCallbackType diff --git a/discord/ui/item.py b/discord/ui/item.py index 85132558bd..6236bb77fd 100644 --- a/discord/ui/item.py +++ b/discord/ui/item.py @@ -25,7 +25,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable, Coroutine, Generic, TypeVar +from collections.abc import Callable, Coroutine +from typing import TYPE_CHECKING, Any, Generic, TypeVar from ..interactions import Interaction diff --git a/discord/ui/label.py b/discord/ui/label.py index 69c519f0cd..720b02b226 100644 --- a/discord/ui/label.py +++ b/discord/ui/label.py @@ -24,8 +24,8 @@ from __future__ import annotations -from collections.abc import Sequence -from typing import TYPE_CHECKING, Iterator, Literal, TypeVar, overload +from collections.abc import Iterator, Sequence +from typing import TYPE_CHECKING, Literal, TypeVar, overload from ..components import ( CheckboxGroupOption, diff --git a/discord/ui/modal.py b/discord/ui/modal.py index 67c68913f9..8cf806ac12 100644 --- a/discord/ui/modal.py +++ b/discord/ui/modal.py @@ -28,9 +28,10 @@ import os import sys import time +from collections.abc import Iterator from functools import partial from itertools import groupby -from typing import TYPE_CHECKING, Any, Iterator, TypeVar +from typing import TYPE_CHECKING, Any, TypeVar from ..enums import ComponentType from ..utils import _get_event_loop, find diff --git a/discord/ui/section.py b/discord/ui/section.py index 9b733999b7..f0a5f95ac0 100644 --- a/discord/ui/section.py +++ b/discord/ui/section.py @@ -24,8 +24,9 @@ from __future__ import annotations +from collections.abc import Iterator from functools import partial -from typing import TYPE_CHECKING, ClassVar, Iterator, TypeVar +from typing import TYPE_CHECKING, ClassVar, TypeVar from ..components import Section as SectionComponent from ..components import _component_factory diff --git a/discord/ui/select.py b/discord/ui/select.py index d6f5a105ca..df18c9385c 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -27,9 +27,9 @@ import inspect import os -from collections.abc import Sequence +from collections.abc import Callable, Sequence from functools import partial -from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, overload +from typing import TYPE_CHECKING, Any, Generic, Literal, overload from typing_extensions import Self, TypeVar diff --git a/discord/ui/view.py b/discord/ui/view.py index 281df6fb47..fece3b03cc 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -30,14 +30,13 @@ import os import sys import time +from collections.abc import Iterator, Sequence from functools import partial from itertools import groupby from typing import ( TYPE_CHECKING, Any, ClassVar, - Iterator, - Sequence, TypeVar, ) diff --git a/discord/utils.py b/discord/utils.py index d2e382fc53..126d91c146 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -42,24 +42,26 @@ import warnings from base64 import b64encode from bisect import bisect_left +from collections.abc import ( + AsyncIterator, + Awaitable, + Callable, + Coroutine, + Iterable, + Iterator, + Mapping, + Sequence, +) from inspect import isawaitable as _isawaitable from inspect import signature as _signature from operator import attrgetter from typing import ( TYPE_CHECKING, Any, - AsyncIterator, - Awaitable, - Callable, - Coroutine, ForwardRef, Generic, - Iterable, - Iterator, Literal, - Mapping, Protocol, - Sequence, TypeVar, Union, overload, diff --git a/discord/voice/packets/core.py b/discord/voice/packets/core.py index c38fc9face..8fd82c232b 100644 --- a/discord/voice/packets/core.py +++ b/discord/voice/packets/core.py @@ -28,7 +28,7 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: - from typing_extensions import Final + from typing import Final OPUS_SILENCE: Final = b"\xf8\xff\xfe" diff --git a/discord/voice/packets/rtp.py b/discord/voice/packets/rtp.py index dd9520cf4e..cbee2e1c96 100644 --- a/discord/voice/packets/rtp.py +++ b/discord/voice/packets/rtp.py @@ -32,7 +32,7 @@ from .core import OPUS_SILENCE, Packet if TYPE_CHECKING: - from typing_extensions import Final + from typing import Final MAX_UINT_32 = 0xFFFFFFFF MAX_UINT_16 = 0xFFFF diff --git a/examples/app_commands/slash_options.py b/examples/app_commands/slash_options.py index 4a9eda93cc..be625738b1 100644 --- a/examples/app_commands/slash_options.py +++ b/examples/app_commands/slash_options.py @@ -47,7 +47,7 @@ async def hello( ) async def select_channel( ctx: discord.ApplicationContext, - channel: Union[discord.TextChannel, discord.VoiceChannel], + channel: discord.TextChannel | discord.VoiceChannel, ): await ctx.respond(f"Hi! You selected {channel.mention} channel.") diff --git a/examples/converters.py b/examples/converters.py index bbf0fb9e51..1d2359e944 100644 --- a/examples/converters.py +++ b/examples/converters.py @@ -1,7 +1,6 @@ # This example requires the 'members' privileged intent to use the Member converter, # and the 'message_content' privileged intent for prefixed commands. -from typing import Union import discord from discord.ext import commands @@ -90,9 +89,7 @@ async def notify(ctx: commands.Context, target: ChannelOrMemberConverter): @bot.command() -async def ignore( - ctx: commands.Context, target: Union[discord.Member, discord.TextChannel] -): +async def ignore(ctx: commands.Context, target: discord.Member | discord.TextChannel): # This command signature utilises the `typing.Union` typehint. # The `commands` framework attempts a conversion of each type in this Union *in order*. # So, it will attempt to convert whatever is passed to `target` to a `discord.Member` instance. diff --git a/examples/secret.py b/examples/secret.py index 7b0b77d06c..b78ce2e88d 100644 --- a/examples/secret.py +++ b/examples/secret.py @@ -1,7 +1,6 @@ # This example requires the 'members' privileged intent to use the Member converter, # and the 'message_content' privileged intent for prefixed commands. -from typing import Union import discord from discord.ext import commands @@ -25,9 +24,7 @@ async def secret(ctx: commands.Context): await ctx.send("Shh!", delete_after=5) -def create_overwrites( - ctx: commands.Context, *objects: Union[discord.Role, discord.Member] -): +def create_overwrites(ctx: commands.Context, *objects: discord.Role | discord.Member): """ This is just a helper function that creates the overwrites for the voice/text channels. @@ -65,7 +62,7 @@ def create_overwrites( async def text( ctx: commands.Context, name: str, - *objects: Union[discord.Role, discord.Member], + *objects: discord.Role | discord.Member, ): """ This makes a text channel with the passed name that @@ -90,7 +87,7 @@ async def text( async def voice( ctx: commands.Context, name: str, - *objects: Union[discord.Role, discord.Member], + *objects: discord.Role | discord.Member, ): """ This does the same thing as the `text` subcommand diff --git a/examples/views/tic_tac_toe.py b/examples/views/tic_tac_toe.py index 1d240c2356..19e5415bc9 100644 --- a/examples/views/tic_tac_toe.py +++ b/examples/views/tic_tac_toe.py @@ -1,6 +1,5 @@ # This example requires the 'message_content' privileged intent for prefixed commands. -from typing import List import discord from discord.ext import commands @@ -63,7 +62,7 @@ async def callback(self, interaction: discord.Interaction): class TicTacToe(discord.ui.View): # This tells the IDE or linter that all our children will be TicTacToeButtons. # This is not required. - children: List[TicTacToeButton] + children: list[TicTacToeButton] X = -1 O = 1 Tie = 2 From 5137ff14348b231ebbcb60c04dccf93d3b4af2f4 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Fri, 22 May 2026 12:17:27 +0200 Subject: [PATCH 10/21] chore: Re-run pyupgrade --- discord/abc.py | 5 ++--- discord/commands/core.py | 11 ++++++----- discord/utils.py | 10 ++-------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index 4b6ca924aa..a71f415898 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -31,10 +31,7 @@ from typing import ( TYPE_CHECKING, Any, - Callable, - Iterable, Protocol, - Sequence, TypeAlias, TypeVar, Union, @@ -42,6 +39,8 @@ runtime_checkable, ) +from collections.abc import Callable, Iterable, Sequence + from . import utils from .context_managers import Typing from .enums import ChannelType diff --git a/discord/commands/core.py b/discord/commands/core.py index d2f8f52f69..afa65a2aa5 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -37,14 +37,13 @@ from typing import ( TYPE_CHECKING, Any, - Callable, - Coroutine, - Generator, Generic, TypeVar, Union, ) +from collections.abc import Callable, Coroutine, Generator + from ..channel import PartialMessageable, _threaded_guild_channel_factory from ..enums import Enum as DiscordEnum from ..enums import ( @@ -72,7 +71,7 @@ if sys.version_info >= (3, 11): from typing import Annotated, Literal, get_args, get_origin else: - from typing_extensions import Annotated, Literal, get_args, get_origin + from typing import Annotated, Literal, get_args, get_origin __all__ = ( "_BaseCommand", @@ -90,7 +89,9 @@ ) if TYPE_CHECKING: - from typing_extensions import Concatenate, Never, ParamSpec + from typing_extensions import Never, ParamSpec + + from typing import Concatenate from .. import Permissions from ..bot import C diff --git a/discord/utils.py b/discord/utils.py index d09551f508..16231e48c5 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -48,23 +48,17 @@ from typing import ( TYPE_CHECKING, Any, - AsyncIterator, - Awaitable, - Callable, - Coroutine, ForwardRef, Generic, - Iterable, - Iterator, Literal, - Mapping, Protocol, - Sequence, TypeVar, Union, overload, ) +from collections.abc import AsyncIterator, Awaitable, Callable, Coroutine, Iterable, Iterator, Mapping, Sequence + from typing_extensions import deprecated as ext_deprecated if TYPE_CHECKING: From af14194597c3a07bdec02edb48deba4f2eb84bfd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 10:18:03 +0000 Subject: [PATCH 11/21] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/abc.py | 3 +-- discord/commands/core.py | 7 +++---- discord/utils.py | 12 ++++++++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index a71f415898..0d49647911 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -28,6 +28,7 @@ import asyncio import copy import time +from collections.abc import Callable, Iterable, Sequence from typing import ( TYPE_CHECKING, Any, @@ -39,8 +40,6 @@ runtime_checkable, ) -from collections.abc import Callable, Iterable, Sequence - from . import utils from .context_managers import Typing from .enums import ChannelType diff --git a/discord/commands/core.py b/discord/commands/core.py index afa65a2aa5..207a40e6b3 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -33,6 +33,7 @@ import sys import types from collections import OrderedDict +from collections.abc import Callable, Coroutine, Generator from enum import Enum from typing import ( TYPE_CHECKING, @@ -42,8 +43,6 @@ Union, ) -from collections.abc import Callable, Coroutine, Generator - from ..channel import PartialMessageable, _threaded_guild_channel_factory from ..enums import Enum as DiscordEnum from ..enums import ( @@ -89,10 +88,10 @@ ) if TYPE_CHECKING: - from typing_extensions import Never, ParamSpec - from typing import Concatenate + from typing_extensions import Never, ParamSpec + from .. import Permissions from ..bot import C from ..cog import Cog diff --git a/discord/utils.py b/discord/utils.py index 16231e48c5..8a8c4439b0 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -42,6 +42,16 @@ import warnings from base64 import b64encode from bisect import bisect_left +from collections.abc import ( + AsyncIterator, + Awaitable, + Callable, + Coroutine, + Iterable, + Iterator, + Mapping, + Sequence, +) from inspect import isawaitable as _isawaitable from inspect import signature as _signature from operator import attrgetter @@ -57,8 +67,6 @@ overload, ) -from collections.abc import AsyncIterator, Awaitable, Callable, Coroutine, Iterable, Iterator, Mapping, Sequence - from typing_extensions import deprecated as ext_deprecated if TYPE_CHECKING: From b612d4a1fe1e317c2b64534831e07350eb31d182 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Fri, 22 May 2026 12:25:30 +0200 Subject: [PATCH 12/21] fix: Remove duplicate changelog --- CHANGELOG.md | 174 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 103 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ee0ba7a4..7f392db745 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,6 @@ released. ### Added -- Support for **Python 3.14**. - ([#2948](https://github.com/Pycord-Development/pycord/pull/2948)) - ### Changed ### Fixed @@ -114,8 +111,8 @@ released. - Removed the guild creation and ownership-related methods and arguments due to updated restrictions. ([#3056](https://github.com/Pycord-Development/pycord/pull/3056)) - - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, - `Template.create_guild`, and `Client.create_guild`. + - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, + `Template.create_guild`, and `Client.create_guild`. ## [2.8.0rc2] - 2026-04-14 @@ -196,8 +193,8 @@ released. - Removed the guild creation and ownership-related methods and arguments due to updated restrictions. ([#3056](https://github.com/Pycord-Development/pycord/pull/3056)) - - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, - `Template.create_guild`, and `Client.create_guild`. + - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, + `Template.create_guild`, and `Client.create_guild`. ## [2.7.2] - 2026-04-14 @@ -290,12 +287,12 @@ released. ([#2908](https://github.com/Pycord-Development/pycord/pull/2908)) - Added support for select default values. ([#2899](https://github.com/Pycord-Development/pycord/pull/2899)) - - Adds a new generic parameter to selects to type `ui.Select.values` return type. - - Adds `SelectDefaultValue` object to create select default values. - - Adds `SelectDefaultValueType` enum. - - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the - different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, - `ui.MentionableSelect`, and `ui.ChannelSelect`. + - Adds a new generic parameter to selects to type `ui.Select.values` return type. + - Adds `SelectDefaultValue` object to create select default values. + - Adds `SelectDefaultValueType` enum. + - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the + different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, + `ui.MentionableSelect`, and `ui.ChannelSelect`. - Added `store` parameter to `View` and `Modal` classes. ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - Added `Webhook.parent` and `Webhook.from_interaction` @@ -348,14 +345,14 @@ released. - Added `VoiceMessage` subclass of `File` to allow voice messages to be sent. ([#2579](https://github.com/Pycord-Development/pycord/pull/2579)) - Added the following soundboard-related features: - - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, - `SoundboardSound.edit()`, and `SoundboardSound.delete()`. - - Access Discord default sounds with `Client.fetch_default_sounds()`. - - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. - - New `on_voice_channel_effect_send` event for sound and emoji effects. - - Soundboard limits based on guild premium tier (8-48 slots) in - `Guild.soundboard_limit`. - ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) + - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, + `SoundboardSound.edit()`, and `SoundboardSound.delete()`. + - Access Discord default sounds with `Client.fetch_default_sounds()`. + - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. + - New `on_voice_channel_effect_send` event for sound and emoji effects. + - Soundboard limits based on guild premium tier (8-48 slots) in + `Guild.soundboard_limit`. + ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) - Added new `Subscription` object and related methods/events. ([#2564](https://github.com/Pycord-Development/pycord/pull/2564)) - Added `Message.forward_to`, `Message.snapshots`, and other related attributes. @@ -398,20 +395,20 @@ released. - Overhauled support for Components V2 and new Modal components ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible - with new features. - - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new - components. - - `DesignerView` and `Container` do not support `Button` and `Select` directly; use - `discord.ui.ActionRow` instead. - - `DesignerModal` does not support `InputText` and `Select` directly; use - `discord.ui.Label` instead. - - Removed `InputText.description`, `Select.label` and `Select.description`; these are - now attributes of `Label`. - - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items - inherit from these. - - All view and modal classes now inherit from a base `ItemInterface` class, split into - `BaseView` and `BaseModal` + - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible + with new features. + - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new + components. + - `DesignerView` and `Container` do not support `Button` and `Select` directly; use + `discord.ui.ActionRow` instead. + - `DesignerModal` does not support `InputText` and `Select` directly; use + `discord.ui.Label` instead. + - Removed `InputText.description`, `Select.label` and `Select.description`; these are + now attributes of `Label`. + - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items + inherit from these. + - All view and modal classes now inherit from a base `ItemInterface` class, split into + `BaseView` and `BaseModal` - Renamed `cover` property of `ScheduledEvent` and `cover` argument of `ScheduledEvent.edit` to `image`. ([#2496](https://github.com/Pycord-Development/pycord/pull/2496)) @@ -592,12 +589,12 @@ released. ([#2908](https://github.com/Pycord-Development/pycord/pull/2908)) - Added support for select default values. ([#2899](https://github.com/Pycord-Development/pycord/pull/2899)) - - Adds a new generic parameter to selects to type `ui.Select.values` return type. - - Adds `SelectDefaultValue` object to create select default values. - - Adds `SelectDefaultValueType` enum. - - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the - different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, - `ui.MentionableSelect`, and `ui.ChannelSelect`. + - Adds a new generic parameter to selects to type `ui.Select.values` return type. + - Adds `SelectDefaultValue` object to create select default values. + - Adds `SelectDefaultValueType` enum. + - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the + different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, + `ui.MentionableSelect`, and `ui.ChannelSelect`. - Added `store` parameter to `View` and `Modal` classes. ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - Added `Webhook.parent` and `Webhook.from_interaction` @@ -619,20 +616,20 @@ released. - Overhauled support for Components V2 and new Modal components ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible - with new features. - - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new - components. - - `DesignerView` and `Container` do not support `Button` and `Select` directly; use - `discord.ui.ActionRow` instead. - - `DesignerModal` does not support `InputText` and `Select` directly; use - `discord.ui.Label` instead. - - Removed `InputText.description`, `Select.label` and `Select.description`; these are - now attributes of `Label`. - - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items - inherit from these. - - All view and modal classes now inherit from a base `ItemInterface` class, split into - `BaseView` and `BaseModal` + - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible + with new features. + - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new + components. + - `DesignerView` and `Container` do not support `Button` and `Select` directly; use + `discord.ui.ActionRow` instead. + - `DesignerModal` does not support `InputText` and `Select` directly; use + `discord.ui.Label` instead. + - Removed `InputText.description`, `Select.label` and `Select.description`; these are + now attributes of `Label`. + - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items + inherit from these. + - All view and modal classes now inherit from a base `ItemInterface` class, split into + `BaseView` and `BaseModal` ### Fixed @@ -715,14 +712,14 @@ released. - Added `VoiceMessage` subclass of `File` to allow voice messages to be sent. ([#2579](https://github.com/Pycord-Development/pycord/pull/2579)) - Added the following soundboard-related features: - - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, - `SoundboardSound.edit()`, and `SoundboardSound.delete()`. - - Access Discord default sounds with `Client.fetch_default_sounds()`. - - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. - - New `on_voice_channel_effect_send` event for sound and emoji effects. - - Soundboard limits based on guild premium tier (8-48 slots) in - `Guild.soundboard_limit`. - ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) + - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, + `SoundboardSound.edit()`, and `SoundboardSound.delete()`. + - Access Discord default sounds with `Client.fetch_default_sounds()`. + - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. + - New `on_voice_channel_effect_send` event for sound and emoji effects. + - Soundboard limits based on guild premium tier (8-48 slots) in + `Guild.soundboard_limit`. + ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) - Added new `Subscription` object and related methods/events. ([#2564](https://github.com/Pycord-Development/pycord/pull/2564)) - Added `Message.forward_to`, `Message.snapshots`, and other related attributes. @@ -1785,46 +1782,81 @@ released. ([#1240](https://github.com/Pycord-Development/pycord/pull/1240)) [unreleased]: https://github.com/Pycord-Development/pycord/compare/v2.8.0...HEAD + [2.8.0]: https://github.com/Pycord-Development/pycord/compare/v2.7.2...v2.8.0 + [2.8.0rc1]: https://github.com/Pycord-Development/pycord/compare/v2.8.0rc1...v2.8.0rc2 + [2.8.0rc1]: https://github.com/Pycord-Development/pycord/compare/v2.7.2...v2.8.0rc1 + [2.7.2]: https://github.com/Pycord-Development/pycord/compare/v2.7.1...v2.7.2 + [2.7.1]: https://github.com/Pycord-Development/pycord/compare/v2.7.0...v2.7.1 + [2.7.0]: https://github.com/Pycord-Development/pycord/compare/v2.7.0rc2...v2.7.0 + [2.7.0rc2]: https://github.com/Pycord-Development/pycord/compare/v2.7.0rc1...v2.7.0rc2 + [2.7.0rc1]: https://github.com/Pycord-Development/pycord/compare/v2.6.0...v2.7.0rc1 + [2.6.1]: https://github.com/Pycord-Development/pycord/compare/v2.6.0...v2.6.1 + [2.6.0]: https://github.com/Pycord-Development/pycord/compare/v2.5.0...v2.6.0 + [2.5.0]: https://github.com/Pycord-Development/pycord/compare/v2.4.1...v2.5.0 + [2.4.1]: https://github.com/Pycord-Development/pycord/compare/v2.4.0...v2.4.1 + [2.4.0]: https://github.com/Pycord-Development/pycord/compare/v2.3.3...v2.4.0 + [2.3.3]: https://github.com/Pycord-Development/pycord/compare/v2.3.2...v2.3.3 + [2.3.2]: https://github.com/Pycord-Development/pycord/compare/v2.3.1...v2.3.2 + [2.3.1]: https://github.com/Pycord-Development/pycord/compare/v2.3.0...v2.3.1 + [2.3.0]: https://github.com/Pycord-Development/pycord/compare/v2.2.2...v2.3.0 + [2.2.2]: https://github.com/Pycord-Development/pycord/compare/v2.2.1...v2.2.2 + [2.2.1]: https://github.com/Pycord-Development/pycord/compare/v2.2.0...v2.2.1 + [2.2.0]: https://github.com/Pycord-Development/pycord/compare/v2.1.3...v2.2.0 + [2.1.3]: https://github.com/Pycord-Development/pycord/compare/v2.1.2...v2.1.3 + [2.1.2]: https://github.com/Pycord-Development/pycord/compare/v2.1.1...v2.1.2 + [2.1.1]: https://github.com/Pycord-Development/pycord/compare/v2.1.0...v2.1.1 + [2.1.0]: https://github.com/Pycord-Development/pycord/compare/v2.0.1...v2.1.0 + [2.0.1]: https://github.com/Pycord-Development/pycord/compare/v2.0.0...v2.0.1 + [2.0.0]: https://github.com/Pycord-Development/pycord/compare/v2.0.0-rc.1...v2.0.0 + [2.0.0-rc.1]: - https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.7...v2.0.0-rc.1 +https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.7...v2.0.0-rc.1 + [2.0.0-beta.7]: - https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.6...v2.0.0-beta.7 +https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.6...v2.0.0-beta.7 + [2.0.0-beta.6]: - https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.5...v2.0.0-beta.6 +https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.5...v2.0.0-beta.6 + [2.0.0-beta.5]: - https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.4...v2.0.0-beta.5 +https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.4...v2.0.0-beta.5 + [2.0.0-beta.4]: - https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.3...v2.0.0-beta.4 +https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.3...v2.0.0-beta.4 + [2.0.0-beta.3]: - https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.2...v2.0.0-beta.3 +https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.2...v2.0.0-beta.3 + [2.0.0-beta.2]: - https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.1...v2.0.0-beta.2 +https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.1...v2.0.0-beta.2 + [2.0.0-beta.1]: - https://github.com/Pycord-Development/pycord/compare/v1.7.3...v2.0.0-beta.1 +https://github.com/Pycord-Development/pycord/compare/v1.7.3...v2.0.0-beta.1 + [version guarantees]: https://docs.pycord.dev/en/stable/version_guarantees.html From 6cc6c673a73945974e812d5828589746a73131f3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 10:26:37 +0000 Subject: [PATCH 13/21] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 171 ++++++++++++++++++++------------------------------- 1 file changed, 68 insertions(+), 103 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f392db745..9d5c51c220 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,8 +111,8 @@ released. - Removed the guild creation and ownership-related methods and arguments due to updated restrictions. ([#3056](https://github.com/Pycord-Development/pycord/pull/3056)) - - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, - `Template.create_guild`, and `Client.create_guild`. + - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, + `Template.create_guild`, and `Client.create_guild`. ## [2.8.0rc2] - 2026-04-14 @@ -193,8 +193,8 @@ released. - Removed the guild creation and ownership-related methods and arguments due to updated restrictions. ([#3056](https://github.com/Pycord-Development/pycord/pull/3056)) - - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, - `Template.create_guild`, and `Client.create_guild`. + - Removed the following methods: `Guild.set_mfa_required`, `Guild.delete`, + `Template.create_guild`, and `Client.create_guild`. ## [2.7.2] - 2026-04-14 @@ -287,12 +287,12 @@ released. ([#2908](https://github.com/Pycord-Development/pycord/pull/2908)) - Added support for select default values. ([#2899](https://github.com/Pycord-Development/pycord/pull/2899)) - - Adds a new generic parameter to selects to type `ui.Select.values` return type. - - Adds `SelectDefaultValue` object to create select default values. - - Adds `SelectDefaultValueType` enum. - - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the - different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, - `ui.MentionableSelect`, and `ui.ChannelSelect`. + - Adds a new generic parameter to selects to type `ui.Select.values` return type. + - Adds `SelectDefaultValue` object to create select default values. + - Adds `SelectDefaultValueType` enum. + - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the + different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, + `ui.MentionableSelect`, and `ui.ChannelSelect`. - Added `store` parameter to `View` and `Modal` classes. ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - Added `Webhook.parent` and `Webhook.from_interaction` @@ -345,14 +345,14 @@ released. - Added `VoiceMessage` subclass of `File` to allow voice messages to be sent. ([#2579](https://github.com/Pycord-Development/pycord/pull/2579)) - Added the following soundboard-related features: - - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, - `SoundboardSound.edit()`, and `SoundboardSound.delete()`. - - Access Discord default sounds with `Client.fetch_default_sounds()`. - - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. - - New `on_voice_channel_effect_send` event for sound and emoji effects. - - Soundboard limits based on guild premium tier (8-48 slots) in - `Guild.soundboard_limit`. - ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) + - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, + `SoundboardSound.edit()`, and `SoundboardSound.delete()`. + - Access Discord default sounds with `Client.fetch_default_sounds()`. + - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. + - New `on_voice_channel_effect_send` event for sound and emoji effects. + - Soundboard limits based on guild premium tier (8-48 slots) in + `Guild.soundboard_limit`. + ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) - Added new `Subscription` object and related methods/events. ([#2564](https://github.com/Pycord-Development/pycord/pull/2564)) - Added `Message.forward_to`, `Message.snapshots`, and other related attributes. @@ -395,20 +395,20 @@ released. - Overhauled support for Components V2 and new Modal components ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible - with new features. - - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new - components. - - `DesignerView` and `Container` do not support `Button` and `Select` directly; use - `discord.ui.ActionRow` instead. - - `DesignerModal` does not support `InputText` and `Select` directly; use - `discord.ui.Label` instead. - - Removed `InputText.description`, `Select.label` and `Select.description`; these are - now attributes of `Label`. - - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items - inherit from these. - - All view and modal classes now inherit from a base `ItemInterface` class, split into - `BaseView` and `BaseModal` + - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible + with new features. + - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new + components. + - `DesignerView` and `Container` do not support `Button` and `Select` directly; use + `discord.ui.ActionRow` instead. + - `DesignerModal` does not support `InputText` and `Select` directly; use + `discord.ui.Label` instead. + - Removed `InputText.description`, `Select.label` and `Select.description`; these are + now attributes of `Label`. + - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items + inherit from these. + - All view and modal classes now inherit from a base `ItemInterface` class, split into + `BaseView` and `BaseModal` - Renamed `cover` property of `ScheduledEvent` and `cover` argument of `ScheduledEvent.edit` to `image`. ([#2496](https://github.com/Pycord-Development/pycord/pull/2496)) @@ -589,12 +589,12 @@ released. ([#2908](https://github.com/Pycord-Development/pycord/pull/2908)) - Added support for select default values. ([#2899](https://github.com/Pycord-Development/pycord/pull/2899)) - - Adds a new generic parameter to selects to type `ui.Select.values` return type. - - Adds `SelectDefaultValue` object to create select default values. - - Adds `SelectDefaultValueType` enum. - - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the - different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, - `ui.MentionableSelect`, and `ui.ChannelSelect`. + - Adds a new generic parameter to selects to type `ui.Select.values` return type. + - Adds `SelectDefaultValue` object to create select default values. + - Adds `SelectDefaultValueType` enum. + - Adds pre-typed and pre-constructed with select_type `ui.Select` aliases for the + different select types: `ui.StringSelect`, `ui.UserSelect`, `ui.RoleSelect`, + `ui.MentionableSelect`, and `ui.ChannelSelect`. - Added `store` parameter to `View` and `Modal` classes. ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - Added `Webhook.parent` and `Webhook.from_interaction` @@ -616,20 +616,20 @@ released. - Overhauled support for Components V2 and new Modal components ([#2904](https://github.com/Pycord-Development/pycord/pull/2904/)) - - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible - with new features. - - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new - components. - - `DesignerView` and `Container` do not support `Button` and `Select` directly; use - `discord.ui.ActionRow` instead. - - `DesignerModal` does not support `InputText` and `Select` directly; use - `discord.ui.Label` instead. - - Removed `InputText.description`, `Select.label` and `Select.description`; these are - now attributes of `Label`. - - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items - inherit from these. - - All view and modal classes now inherit from a base `ItemInterface` class, split into - `BaseView` and `BaseModal` + - Revert `discord.ui.View` and `discord.ui.Modal` to 2.6.1 behavior; not compatible + with new features. + - Implemented `discord.ui.DesignerView` and `discord.ui.DesignerModal` to support new + components. + - `DesignerView` and `Container` do not support `Button` and `Select` directly; use + `discord.ui.ActionRow` instead. + - `DesignerModal` does not support `InputText` and `Select` directly; use + `discord.ui.Label` instead. + - Removed `InputText.description`, `Select.label` and `Select.description`; these are + now attributes of `Label`. + - `discord.ui.Item` is now a base class for `ViewItem` and `ModalItem`; all items + inherit from these. + - All view and modal classes now inherit from a base `ItemInterface` class, split into + `BaseView` and `BaseModal` ### Fixed @@ -712,14 +712,14 @@ released. - Added `VoiceMessage` subclass of `File` to allow voice messages to be sent. ([#2579](https://github.com/Pycord-Development/pycord/pull/2579)) - Added the following soundboard-related features: - - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, - `SoundboardSound.edit()`, and `SoundboardSound.delete()`. - - Access Discord default sounds with `Client.fetch_default_sounds()`. - - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. - - New `on_voice_channel_effect_send` event for sound and emoji effects. - - Soundboard limits based on guild premium tier (8-48 slots) in - `Guild.soundboard_limit`. - ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) + - Manage guild soundboard sounds with `Guild.fetch_sounds()`, `Guild.create_sound()`, + `SoundboardSound.edit()`, and `SoundboardSound.delete()`. + - Access Discord default sounds with `Client.fetch_default_sounds()`. + - Play sounds in voice channels with `VoiceChannel.send_soundboard_sound()`. + - New `on_voice_channel_effect_send` event for sound and emoji effects. + - Soundboard limits based on guild premium tier (8-48 slots) in + `Guild.soundboard_limit`. + ([#2623](https://github.com/Pycord-Development/pycord/pull/2623)) - Added new `Subscription` object and related methods/events. ([#2564](https://github.com/Pycord-Development/pycord/pull/2564)) - Added `Message.forward_to`, `Message.snapshots`, and other related attributes. @@ -1782,81 +1782,46 @@ released. ([#1240](https://github.com/Pycord-Development/pycord/pull/1240)) [unreleased]: https://github.com/Pycord-Development/pycord/compare/v2.8.0...HEAD - [2.8.0]: https://github.com/Pycord-Development/pycord/compare/v2.7.2...v2.8.0 - [2.8.0rc1]: https://github.com/Pycord-Development/pycord/compare/v2.8.0rc1...v2.8.0rc2 - [2.8.0rc1]: https://github.com/Pycord-Development/pycord/compare/v2.7.2...v2.8.0rc1 - [2.7.2]: https://github.com/Pycord-Development/pycord/compare/v2.7.1...v2.7.2 - [2.7.1]: https://github.com/Pycord-Development/pycord/compare/v2.7.0...v2.7.1 - [2.7.0]: https://github.com/Pycord-Development/pycord/compare/v2.7.0rc2...v2.7.0 - [2.7.0rc2]: https://github.com/Pycord-Development/pycord/compare/v2.7.0rc1...v2.7.0rc2 - [2.7.0rc1]: https://github.com/Pycord-Development/pycord/compare/v2.6.0...v2.7.0rc1 - [2.6.1]: https://github.com/Pycord-Development/pycord/compare/v2.6.0...v2.6.1 - [2.6.0]: https://github.com/Pycord-Development/pycord/compare/v2.5.0...v2.6.0 - [2.5.0]: https://github.com/Pycord-Development/pycord/compare/v2.4.1...v2.5.0 - [2.4.1]: https://github.com/Pycord-Development/pycord/compare/v2.4.0...v2.4.1 - [2.4.0]: https://github.com/Pycord-Development/pycord/compare/v2.3.3...v2.4.0 - [2.3.3]: https://github.com/Pycord-Development/pycord/compare/v2.3.2...v2.3.3 - [2.3.2]: https://github.com/Pycord-Development/pycord/compare/v2.3.1...v2.3.2 - [2.3.1]: https://github.com/Pycord-Development/pycord/compare/v2.3.0...v2.3.1 - [2.3.0]: https://github.com/Pycord-Development/pycord/compare/v2.2.2...v2.3.0 - [2.2.2]: https://github.com/Pycord-Development/pycord/compare/v2.2.1...v2.2.2 - [2.2.1]: https://github.com/Pycord-Development/pycord/compare/v2.2.0...v2.2.1 - [2.2.0]: https://github.com/Pycord-Development/pycord/compare/v2.1.3...v2.2.0 - [2.1.3]: https://github.com/Pycord-Development/pycord/compare/v2.1.2...v2.1.3 - [2.1.2]: https://github.com/Pycord-Development/pycord/compare/v2.1.1...v2.1.2 - [2.1.1]: https://github.com/Pycord-Development/pycord/compare/v2.1.0...v2.1.1 - [2.1.0]: https://github.com/Pycord-Development/pycord/compare/v2.0.1...v2.1.0 - [2.0.1]: https://github.com/Pycord-Development/pycord/compare/v2.0.0...v2.0.1 - [2.0.0]: https://github.com/Pycord-Development/pycord/compare/v2.0.0-rc.1...v2.0.0 - [2.0.0-rc.1]: -https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.7...v2.0.0-rc.1 - + https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.7...v2.0.0-rc.1 [2.0.0-beta.7]: -https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.6...v2.0.0-beta.7 - + https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.6...v2.0.0-beta.7 [2.0.0-beta.6]: -https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.5...v2.0.0-beta.6 - + https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.5...v2.0.0-beta.6 [2.0.0-beta.5]: -https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.4...v2.0.0-beta.5 - + https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.4...v2.0.0-beta.5 [2.0.0-beta.4]: -https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.3...v2.0.0-beta.4 - + https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.3...v2.0.0-beta.4 [2.0.0-beta.3]: -https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.2...v2.0.0-beta.3 - + https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.2...v2.0.0-beta.3 [2.0.0-beta.2]: -https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.1...v2.0.0-beta.2 - + https://github.com/Pycord-Development/pycord/compare/v2.0.0-beta.1...v2.0.0-beta.2 [2.0.0-beta.1]: -https://github.com/Pycord-Development/pycord/compare/v1.7.3...v2.0.0-beta.1 - + https://github.com/Pycord-Development/pycord/compare/v1.7.3...v2.0.0-beta.1 [version guarantees]: https://docs.pycord.dev/en/stable/version_guarantees.html From 229267f4439164689da706c4310bb9cb9153e8f8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 15:43:39 +0000 Subject: [PATCH 14/21] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/commands/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/commands/core.py b/discord/commands/core.py index 857eb6fde8..2507d8ec7a 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -71,6 +71,7 @@ from typing import Annotated, Literal, Self, get_args, get_origin else: from typing import Annotated, Literal, get_args, get_origin + from typing_extensions import Self __all__ = ( From 25dce3957a7ab926d92fba353dd943dfd5c86413 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Mon, 8 Jun 2026 17:47:29 +0200 Subject: [PATCH 15/21] fix: Weird import # Conflicts: # discord/commands/core.py --- discord/commands/core.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/discord/commands/core.py b/discord/commands/core.py index 2507d8ec7a..ac4a4c4467 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -30,19 +30,24 @@ import functools import inspect import re -import sys import types from collections import OrderedDict from collections.abc import Callable, Coroutine, Generator from enum import Enum from typing import ( TYPE_CHECKING, + Annotated, Any, Generic, + Literal, TypeVar, Union, + get_args, + get_origin, ) +from typing_extensions import Self + from ..channel import PartialMessageable, _threaded_guild_channel_factory from ..enums import Enum as DiscordEnum from ..enums import ( @@ -67,13 +72,6 @@ from .context import ApplicationContext, AutocompleteContext from .options import Option, OptionChoice -if sys.version_info >= (3, 11): - from typing import Annotated, Literal, Self, get_args, get_origin -else: - from typing import Annotated, Literal, get_args, get_origin - - from typing_extensions import Self - __all__ = ( "_BaseCommand", "ApplicationCommand", From 0aa6381a8bfd76c846b7b7f5f4abfacb776eb5ed Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 26 Jul 2026 13:22:29 +0200 Subject: [PATCH 16/21] feat: run pyupgrade --py310-plus again after master merge --- docs/extensions/resourcelinks.py | 10 +++++----- scripts/count_sourcelines.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/extensions/resourcelinks.py b/docs/extensions/resourcelinks.py index c36fd6f6a0..c8c97d37f3 100644 --- a/docs/extensions/resourcelinks.py +++ b/docs/extensions/resourcelinks.py @@ -13,16 +13,16 @@ from sphinx.util.typing import RoleFunction -def make_link_role(resource_links: Dict[str, str]) -> RoleFunction: +def make_link_role(resource_links: dict[str, str]) -> RoleFunction: def role( typ: str, rawtext: str, text: str, lineno: int, inliner: Inliner, - options: Dict = {}, - content: List[str] = [], - ) -> Tuple[List[Node], List[system_message]]: + options: dict = {}, + content: list[str] = [], + ) -> tuple[list[Node], list[system_message]]: text = utils.unescape(text) has_explicit_title, title, key = split_explicit_title(text) full_url = resource_links[key] @@ -38,7 +38,7 @@ def add_link_role(app: Sphinx) -> None: app.add_role("resource", make_link_role(app.config.resource_links)) -def setup(app: Sphinx) -> Dict[str, Any]: +def setup(app: Sphinx) -> dict[str, Any]: app.add_config_value("resource_links", {}, "env") app.connect("builder-inited", add_link_role) return {"version": sphinx.__display_version__, "parallel_read_safe": True} diff --git a/scripts/count_sourcelines.py b/scripts/count_sourcelines.py index aa0408302c..4cad2bcb25 100644 --- a/scripts/count_sourcelines.py +++ b/scripts/count_sourcelines.py @@ -44,4 +44,4 @@ for line_number_count, filename in loc_list: print("%05d lines in %s" % (line_number_count, filename)) -print("\nTotal: {} lines ({})".format(sum([x[0] for x in loc_list]), cur_path)) +print(f"\nTotal: {sum([x[0] for x in loc_list])} lines ({cur_path})") From 052ca6e7808552bd0956b8878b94911c922e6d69 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 11:22:59 +0000 Subject: [PATCH 17/21] style(pre-commit): auto fixes from pre-commit.com hooks --- docs/extensions/resourcelinks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extensions/resourcelinks.py b/docs/extensions/resourcelinks.py index c8c97d37f3..73bbfb9247 100644 --- a/docs/extensions/resourcelinks.py +++ b/docs/extensions/resourcelinks.py @@ -2,7 +2,7 @@ # Copyright 2007-2020 by the Sphinx team # Licensed under BSD. -from typing import Any, Dict, List, Tuple +from typing import Any import sphinx from docutils import nodes, utils From 1725e76d684697c638a74af7d4c808c53e4fd839 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 26 Jul 2026 13:37:04 +0200 Subject: [PATCH 18/21] chore: let pre-commit do its thing --- .pre-commit-config.yaml | 1 + discord/__init__.py | 1 + discord/__main__.py | 1 + discord/_version.py | 1 + discord/abc.py | 1 + discord/activity.py | 1 + discord/appinfo.py | 1 + discord/application_role_connection.py | 1 + discord/asset.py | 1 + discord/audit_logs.py | 1 + discord/automod.py | 1 + discord/backoff.py | 1 + discord/bot.py | 1 + discord/channel.py | 1 + discord/client.py | 1 + discord/cog.py | 1 + discord/collectibles.py | 1 + discord/colour.py | 1 + discord/commands/__init__.py | 1 + discord/commands/context.py | 1 + discord/commands/core.py | 1 + discord/commands/options.py | 1 + discord/commands/permissions.py | 1 + discord/components.py | 1 + discord/context_managers.py | 1 + discord/embeds.py | 1 + discord/emoji.py | 1 + discord/enums.py | 1 + discord/errors.py | 1 + discord/ext/bridge/__init__.py | 1 + discord/ext/bridge/bot.py | 1 + discord/ext/bridge/context.py | 1 + discord/ext/bridge/core.py | 1 + discord/ext/commands/__init__.py | 1 + discord/ext/commands/_types.py | 1 + discord/ext/commands/bot.py | 1 + discord/ext/commands/cog.py | 1 + discord/ext/commands/context.py | 1 + discord/ext/commands/converter.py | 1 + discord/ext/commands/cooldowns.py | 1 + discord/ext/commands/core.py | 1 + discord/ext/commands/errors.py | 1 + discord/ext/commands/flags.py | 1 + discord/ext/commands/help.py | 1 + discord/ext/commands/view.py | 1 + discord/ext/pages/__init__.py | 1 + discord/ext/pages/pagination.py | 1 + discord/ext/tasks/__init__.py | 1 + discord/file.py | 1 + discord/flags.py | 1 + discord/gateway.py | 1 + discord/guild.py | 1 + discord/http.py | 1 + discord/incidents.py | 1 + discord/integrations.py | 1 + discord/interactions.py | 1 + discord/invite.py | 1 + discord/iterators.py | 1 + discord/member.py | 1 + discord/mentions.py | 1 + discord/message.py | 1 + discord/mixins.py | 1 + discord/monetization.py | 1 + discord/object.py | 1 + discord/oggparse.py | 1 + discord/onboarding.py | 1 + discord/opus.py | 1 + discord/partial_emoji.py | 1 + discord/permissions.py | 1 + discord/player.py | 1 + discord/poll.py | 1 + discord/primary_guild.py | 1 + discord/raw_models.py | 1 + discord/reaction.py | 1 + discord/role.py | 1 + discord/scheduled_events.py | 1 + discord/shard.py | 1 + discord/sinks/__init__.py | 1 + discord/sinks/core.py | 1 + discord/sinks/errors.py | 1 + discord/sinks/m4a.py | 1 + discord/sinks/mka.py | 1 + discord/sinks/mkv.py | 1 + discord/sinks/mp3.py | 1 + discord/sinks/mp4.py | 1 + discord/sinks/ogg.py | 1 + discord/sinks/pcm.py | 1 + discord/sinks/wave.py | 1 + discord/soundboard.py | 1 + discord/stage_instance.py | 1 + discord/state.py | 1 + discord/sticker.py | 1 + discord/team.py | 1 + discord/template.py | 1 + discord/threads.py | 1 + discord/types/__init__.py | 1 + discord/types/activity.py | 1 + discord/types/appinfo.py | 1 + discord/types/application_role_connection.py | 1 + discord/types/audit_log.py | 1 + discord/types/automod.py | 1 + discord/types/channel.py | 1 + discord/types/collectibles.py | 1 + discord/types/components.py | 1 + discord/types/embed.py | 1 + discord/types/emoji.py | 1 + discord/types/gateway.py | 1 + discord/types/guild.py | 1 + discord/types/integration.py | 1 + discord/types/interactions.py | 1 + discord/types/invite.py | 1 + discord/types/member.py | 1 + discord/types/message.py | 1 + discord/types/monetization.py | 1 + discord/types/onboarding.py | 1 + discord/types/poll.py | 1 + discord/types/primary_guild.py | 1 + discord/types/raw_models.py | 1 + discord/types/role.py | 1 + discord/types/scheduled_events.py | 1 + discord/types/snowflake.py | 1 + discord/types/soundboard.py | 1 + discord/types/sticker.py | 1 + discord/types/team.py | 1 + discord/types/template.py | 1 + discord/types/threads.py | 1 + discord/types/user.py | 1 + discord/types/voice.py | 1 + discord/types/webhook.py | 1 + discord/types/welcome_screen.py | 1 + discord/types/widget.py | 1 + discord/ui/__init__.py | 1 + discord/ui/action_row.py | 1 + discord/ui/button.py | 1 + discord/ui/checkbox.py | 1 + discord/ui/checkbox_group.py | 1 + discord/ui/container.py | 1 + discord/ui/core.py | 1 + discord/ui/file.py | 1 + discord/ui/file_upload.py | 1 + discord/ui/input_text.py | 1 + discord/ui/item.py | 1 + discord/ui/label.py | 1 + discord/ui/media_gallery.py | 1 + discord/ui/modal.py | 1 + discord/ui/radio_group.py | 1 + discord/ui/section.py | 1 + discord/ui/select.py | 1 + discord/ui/separator.py | 1 + discord/ui/text_display.py | 1 + discord/ui/thumbnail.py | 1 + discord/ui/view.py | 1 + discord/user.py | 1 + discord/utils.py | 1 + discord/voice/__init__.py | 1 + discord/voice/_types.py | 1 + discord/voice/client.py | 1 + discord/voice/enums.py | 1 + discord/voice/gateway.py | 1 + discord/voice/packets/__init__.py | 1 + discord/voice/packets/core.py | 1 + discord/voice/packets/rtp.py | 1 + discord/voice/receive/__init__.py | 1 + discord/voice/receive/reader.py | 1 + discord/voice/receive/router.py | 1 + discord/voice/state.py | 1 + discord/voice/utils/__init__.py | 1 + discord/voice/utils/buffer.py | 1 + discord/voice/utils/dependencies.py | 1 + discord/voice/utils/multidataevent.py | 1 + discord/voice/utils/wrapped.py | 1 + discord/webhook/__init__.py | 1 + discord/webhook/async_.py | 1 + discord/webhook/sync.py | 1 + discord/welcome_screen.py | 1 + discord/widget.py | 1 + docs/conf.py | 1 + docs/extensions/attributetable.py | 1 + docs/extensions/exception_hierarchy.py | 1 + docs/extensions/nitpick_file_ignorer.py | 1 + docs/extensions/resourcelinks.py | 1 + examples/app_commands/context_menus.py | 1 + examples/app_commands/info.py | 1 + examples/app_commands/slash_autocomplete.py | 1 + examples/app_commands/slash_basic.py | 1 + examples/app_commands/slash_cog.py | 1 + examples/app_commands/slash_cog_groups.py | 1 + examples/app_commands/slash_groups.py | 1 + examples/app_commands/slash_options.py | 1 + examples/app_commands/slash_perms.py | 1 + examples/app_commands/slash_users.py | 1 + examples/audio_recording.py | 1 + examples/audio_recording_merged.py | 1 + examples/background_task.py | 1 + examples/background_task_asyncio.py | 1 + examples/basic_async_bot.py | 1 + examples/basic_bot.py | 1 + examples/basic_voice.py | 1 + examples/bridge_commands.py | 1 + examples/community_invites.py | 1 + examples/converters.py | 1 + examples/cooldown.py | 1 + examples/create_private_emoji.py | 1 + examples/custom_context.py | 1 + examples/deleted.py | 1 + examples/edits.py | 1 + examples/modal_dialogs.py | 1 + examples/new_member.py | 1 + examples/reaction_roles.py | 1 + examples/reply.py | 1 + examples/secret.py | 1 + examples/soundboard.py | 1 + examples/timeout.py | 1 + examples/views/button_roles.py | 1 + examples/views/channel_select.py | 1 + examples/views/confirm.py | 1 + examples/views/counter.py | 1 + examples/views/dropdown.py | 1 + examples/views/ephemeral.py | 1 + examples/views/link.py | 1 + examples/views/new_components.py | 1 + examples/views/paginator.py | 1 + examples/views/persistent.py | 1 + examples/views/role_select.py | 1 + examples/views/tic_tac_toe.py | 1 + examples/wait_for_event.py | 1 + scripts/add-precommit-trigger.cmd | 22 ++++++++++++++++++++ scripts/count_sourcelines.py | 1 + scripts/discord_release_notification.py | 1 + scripts/docs_json_exporter.py | 1 + scripts/release_changelog.py | 1 + scripts/release_rtd_versions.py | 1 + scripts/remove-precommit-trigger.cmd | 21 +++++++++++++++++++ setup.py | 1 + tests/__init__.py | 1 + tests/voice/__init__.py | 1 + tests/voice/test_dependency_behavior.py | 1 + tests/voice/test_imports.py | 1 + tests/voice/test_player.py | 1 + tests/voice/test_wait_finish.py | 1 + 240 files changed, 281 insertions(+) create mode 100644 scripts/add-precommit-trigger.cmd create mode 100644 scripts/remove-precommit-trigger.cmd diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 552e01b5af..4264c96704 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,7 @@ repos: hooks: - id: pyupgrade exclude: \.(po|pot|yml|yaml)$ + args: [--py310-plus] - repo: https://github.com/PyCQA/isort rev: 9.0.0b1 hooks: diff --git a/discord/__init__.py b/discord/__init__.py index 120069b750..8c7ba184d6 100644 --- a/discord/__init__.py +++ b/discord/__init__.py @@ -121,3 +121,4 @@ def __getattr__(name: str) -> object: logging.getLogger(__name__).addHandler(logging.NullHandler()) +# pre commit test trigger diff --git a/discord/__main__.py b/discord/__main__.py index b9b995500a..81e2820eb4 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -373,3 +373,4 @@ def main() -> None: if __name__ == "__main__": main() +# pre commit test trigger diff --git a/discord/_version.py b/discord/_version.py index ddc7a10fd7..ac9ad748a3 100644 --- a/discord/_version.py +++ b/discord/_version.py @@ -163,3 +163,4 @@ def date(self) -> datetime.date | None: commit=raw_info["commit"], date=date_info, ) +# pre commit test trigger diff --git a/discord/abc.py b/discord/abc.py index 0d49647911..4d5aacf3b4 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -2097,3 +2097,4 @@ async def connect( class Mentionable: # TODO: documentation, methods if needed pass +# pre commit test trigger diff --git a/discord/activity.py b/discord/activity.py index 81128a5fb0..4d3ff3482d 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -879,3 +879,4 @@ def create_activity(data: ActivityPayload | None) -> ActivityTypes | None: ): return Spotify(**data) return Activity(**data) +# pre commit test trigger diff --git a/discord/appinfo.py b/discord/appinfo.py index 943b6d7468..05a3d8992f 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -648,3 +648,4 @@ def _to_payload(self) -> dict[int, dict[str, dict[str, Any]] | None]: if self.user is not utils.MISSING: payload[1] = self._encode_install_params(self.user) return payload +# pre commit test trigger diff --git a/discord/application_role_connection.py b/discord/application_role_connection.py index 6cf9bd9acb..3cc738d059 100644 --- a/discord/application_role_connection.py +++ b/discord/application_role_connection.py @@ -126,3 +126,4 @@ def to_dict(self) -> ApplicationRoleConnectionMetadataPayload: if self.description_localizations is not MISSING: data["description_localizations"] = self.description_localizations return data +# pre commit test trigger diff --git a/discord/asset.py b/discord/asset.py index 659d6dd5eb..718313b469 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -524,3 +524,4 @@ def with_static_format(self, format: ValidStaticFormatTypes, /) -> Asset: if self._animated: return self return self.with_format(format) +# pre commit test trigger diff --git a/discord/audit_logs.py b/discord/audit_logs.py index e944149fd6..e0447dea45 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -718,3 +718,4 @@ def _convert_target_scheduled_event( self, target_id: int ) -> ScheduledEvent | Object: return self.guild.get_scheduled_event(target_id) or Object(id=target_id) +# pre commit test trigger diff --git a/discord/automod.py b/discord/automod.py index 5f2e7de920..904c41bc17 100644 --- a/discord/automod.py +++ b/discord/automod.py @@ -558,3 +558,4 @@ async def edit( self.guild_id, self.id, payload, reason=reason ) return AutoModRule(state=self._state, data=data) +# pre commit test trigger diff --git a/discord/backoff.py b/discord/backoff.py index 078f14e218..f36313e9da 100644 --- a/discord/backoff.py +++ b/discord/backoff.py @@ -100,3 +100,4 @@ def delay(self) -> int | float: self._exp = min(self._exp + 1, self._max) return self._randfunc(0, self._base * 2**self._exp) +# pre commit test trigger diff --git a/discord/bot.py b/discord/bot.py index 0910f5d46e..614efc04e6 100644 --- a/discord/bot.py +++ b/discord/bot.py @@ -1681,3 +1681,4 @@ class AutoShardedBot(BotBase, AutoShardedClient): @property def _bot(self) -> AutoShardedBot: return self +# pre commit test trigger diff --git a/discord/channel.py b/discord/channel.py index dab70c4a92..ff913de885 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3644,3 +3644,4 @@ def _threaded_guild_channel_factory(channel_type: int): ): return Thread, value return cls, value +# pre commit test trigger diff --git a/discord/client.py b/discord/client.py index 3bc99d533e..c3a95f780f 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2382,3 +2382,4 @@ async def fetch_default_sounds(self) -> list[SoundboardSound]: SoundboardSound(http=self.http, state=self._connection, data=s) for s in data ] +# pre commit test trigger diff --git a/discord/cog.py b/discord/cog.py index d514e1febf..b73a2027af 100644 --- a/discord/cog.py +++ b/discord/cog.py @@ -1164,3 +1164,4 @@ def reload_extension(self, name: str, *, package: str | None = None) -> None: def extensions(self) -> Mapping[str, types.ModuleType]: """A read-only mapping of extension name to extension.""" return types.MappingProxyType(self.__extensions) +# pre commit test trigger diff --git a/discord/collectibles.py b/discord/collectibles.py index 6c18d1a0a8..5e1a318c9e 100644 --- a/discord/collectibles.py +++ b/discord/collectibles.py @@ -134,3 +134,4 @@ def animated_asset(self) -> Asset: .. versionadded:: 2.7 """ return Asset._from_collectible(self._state, self._asset, animated=True) +# pre commit test trigger diff --git a/discord/colour.py b/discord/colour.py index 420ab9096f..db493eac8a 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -409,3 +409,4 @@ def embed_background(cls, theme: str = "dark") -> Self: Color = Colour +# pre commit test trigger diff --git a/discord/commands/__init__.py b/discord/commands/__init__.py index 1813faf3dc..5f769867c3 100644 --- a/discord/commands/__init__.py +++ b/discord/commands/__init__.py @@ -27,3 +27,4 @@ from .core import * from .options import * from .permissions import * +# pre commit test trigger diff --git a/discord/commands/context.py b/discord/commands/context.py index b7206d0946..1e07b6d45a 100644 --- a/discord/commands/context.py +++ b/discord/commands/context.py @@ -474,3 +474,4 @@ def command(self) -> ApplicationCommand | None: @command.setter def command(self, value: ApplicationCommand | None) -> None: self.interaction.command = value +# pre commit test trigger diff --git a/discord/commands/core.py b/discord/commands/core.py index e2354e64ad..a3ab2e78c7 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -2301,3 +2301,4 @@ def validate_chat_input_description(description: Any, locale: str | None = None) if locale: error.args = (f"{error.args[0]} in locale {locale}",) raise error +# pre commit test trigger diff --git a/discord/commands/options.py b/discord/commands/options.py index a7d7d682ce..ba281f5e2a 100644 --- a/discord/commands/options.py +++ b/discord/commands/options.py @@ -554,3 +554,4 @@ def decorator(func): return func return decorator +# pre commit test trigger diff --git a/discord/commands/permissions.py b/discord/commands/permissions.py index c1ed4f481e..7e87fd341a 100644 --- a/discord/commands/permissions.py +++ b/discord/commands/permissions.py @@ -137,3 +137,4 @@ def inner(command: Callable): return command return inner +# pre commit test trigger diff --git a/discord/components.py b/discord/components.py index 53aa06de6e..24d3aab47c 100644 --- a/discord/components.py +++ b/discord/components.py @@ -1822,3 +1822,4 @@ def _component_factory(data: ComponentPayload, state=None) -> Component: else: as_enum = try_enum(ComponentType, component_type) return Component._raw_construct(type=as_enum) +# pre commit test trigger diff --git a/discord/context_managers.py b/discord/context_managers.py index 9f1a282b3f..1bbe942cf4 100644 --- a/discord/context_managers.py +++ b/discord/context_managers.py @@ -88,3 +88,4 @@ async def __aexit__( traceback: TracebackType | None, ) -> None: self.task.cancel() +# pre commit test trigger diff --git a/discord/embeds.py b/discord/embeds.py index 57f4c89302..516e00838d 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -1078,3 +1078,4 @@ def to_dict(self) -> EmbedData: result["title"] = self.title return result # type: ignore +# pre commit test trigger diff --git a/discord/emoji.py b/discord/emoji.py index b87f193aeb..dd1947e95f 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -434,3 +434,4 @@ async def edit( self.application_id, self.id, payload=payload ) return self._state.maybe_store_app_emoji(self.application_id, data) +# pre commit test trigger diff --git a/discord/enums.py b/discord/enums.py index 5011a338c2..3a8ab6915b 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -1231,3 +1231,4 @@ def try_enum(cls: type[T], val: Any) -> T: return cls._enum_value_map_[val] # type: ignore except (KeyError, TypeError, AttributeError): return create_unknown_value(cls, val) +# pre commit test trigger diff --git a/discord/errors.py b/discord/errors.py index 5e94e0279c..aa730649ae 100644 --- a/discord/errors.py +++ b/discord/errors.py @@ -432,3 +432,4 @@ def __init__(self, missing: tuple[str, ...]) -> None: f"{deps} {'is' if len(missing) == 1 else 'are'} required for voice support. " 'Install them with "pip install py-cord[voice]".' ) +# pre commit test trigger diff --git a/discord/ext/bridge/__init__.py b/discord/ext/bridge/__init__.py index b92a536e82..48114dcfad 100644 --- a/discord/ext/bridge/__init__.py +++ b/discord/ext/bridge/__init__.py @@ -26,3 +26,4 @@ from .bot import * from .context import * from .core import * +# pre commit test trigger diff --git a/discord/ext/bridge/bot.py b/discord/ext/bridge/bot.py index 9e2c619fa6..3a21ef8260 100644 --- a/discord/ext/bridge/bot.py +++ b/discord/ext/bridge/bot.py @@ -202,3 +202,4 @@ class AutoShardedBot(BotBase, ExtAutoShardedBot): .. versionadded:: 2.0 """ +# pre commit test trigger diff --git a/discord/ext/bridge/context.py b/discord/ext/bridge/context.py index 8e7f9414f6..4141651a13 100644 --- a/discord/ext/bridge/context.py +++ b/discord/ext/bridge/context.py @@ -201,3 +201,4 @@ async def delete( A Union class for either :class:`BridgeExtContext` or :class:`BridgeApplicationContext`. Can be used as a type hint for Context for bridge commands. """ +# pre commit test trigger diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py index 4bf6b2cfac..c2ec02c6e7 100644 --- a/discord/ext/bridge/core.py +++ b/discord/ext/bridge/core.py @@ -687,3 +687,4 @@ def decorator(func): return func return decorator +# pre commit test trigger diff --git a/discord/ext/commands/__init__.py b/discord/ext/commands/__init__.py index b13b484c68..bf00aaffdd 100644 --- a/discord/ext/commands/__init__.py +++ b/discord/ext/commands/__init__.py @@ -17,3 +17,4 @@ from .errors import * from .flags import * from .help import * +# pre commit test trigger diff --git a/discord/ext/commands/_types.py b/discord/ext/commands/_types.py index 643dfd7ab0..3711e5d4d9 100644 --- a/discord/ext/commands/_types.py +++ b/discord/ext/commands/_types.py @@ -48,3 +48,4 @@ Callable[["Cog", "Context[Any]", "CommandError"], Coro[Any]], Callable[["Context[Any]", "CommandError"], Coro[Any]], ] +# pre commit test trigger diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 0b050a7b8f..d73de8e5b4 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -456,3 +456,4 @@ class AutoShardedBot(BotBase, discord.AutoShardedBot): """This is similar to :class:`.Bot` except that it is inherited from :class:`discord.AutoShardedBot` instead. """ +# pre commit test trigger diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index ac93818475..3a84895769 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -84,3 +84,4 @@ def get_commands(self) -> list[ApplicationCommand | Command]: This does not include subcommands. """ return [c for c in self.__cog_commands__ if c.parent is None] +# pre commit test trigger diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 11e2216fce..238f2d61d7 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -409,3 +409,4 @@ async def forward_to( self, channel: discord.abc.Messageable, **kwargs: Any ) -> Message: return await self.message.forward_to(channel, **kwargs) +# pre commit test trigger diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 62e671d79c..c85c31295b 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -1266,3 +1266,4 @@ async def run_converters( converter = origin return await _actual_conversion(ctx, converter, argument, param) +# pre commit test trigger diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index c2fe07b702..3caa521ffa 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -408,3 +408,4 @@ async def release(self, message: Message) -> None: if sem.value >= self.number and not sem.is_active(): del self._mapping[key] +# pre commit test trigger diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index d910a175d5..6eda261d60 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -2500,3 +2500,4 @@ def decorator(func: Command | CoroFunc) -> Command | CoroFunc: return func return decorator # type: ignore +# pre commit test trigger diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py index 8263af7150..11be057103 100644 --- a/discord/ext/commands/errors.py +++ b/discord/ext/commands/errors.py @@ -1021,3 +1021,4 @@ class MissingFlagArgument(FlagError): def __init__(self, flag: Flag) -> None: self.flag: Flag = flag super().__init__(f"Flag {flag.name!r} does not have an argument") +# pre commit test trigger diff --git a/discord/ext/commands/flags.py b/discord/ext/commands/flags.py index 2606565857..66b19a4a8f 100644 --- a/discord/ext/commands/flags.py +++ b/discord/ext/commands/flags.py @@ -700,3 +700,4 @@ async def convert(cls: type[F], ctx: Context, argument: str) -> F: setattr(self, flag.attribute, values) return self +# pre commit test trigger diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 75dc6861f4..f8150bcf12 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -1410,3 +1410,4 @@ async def send_command_help(self, command): self.add_command_formatting(command) self.paginator.close_page() await self.send_pages() +# pre commit test trigger diff --git a/discord/ext/commands/view.py b/discord/ext/commands/view.py index c8c7cd197b..eb3074daf8 100644 --- a/discord/ext/commands/view.py +++ b/discord/ext/commands/view.py @@ -198,3 +198,4 @@ def __repr__(self): f"" ) +# pre commit test trigger diff --git a/discord/ext/pages/__init__.py b/discord/ext/pages/__init__.py index 3ad7783499..46212632be 100644 --- a/discord/ext/pages/__init__.py +++ b/discord/ext/pages/__init__.py @@ -8,3 +8,4 @@ """ from .pagination import * +# pre commit test trigger diff --git a/discord/ext/pages/pagination.py b/discord/ext/pages/pagination.py index 5509f7a177..25c894695f 100644 --- a/discord/ext/pages/pagination.py +++ b/discord/ext/pages/pagination.py @@ -1337,3 +1337,4 @@ async def callback(self, interaction: discord.Interaction): trigger_on_display=page_group.trigger_on_display, interaction=interaction, ) +# pre commit test trigger diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index c1d1e72274..5c592f0765 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -856,3 +856,4 @@ def decorator(func: LF) -> Loop[LF]: ) return decorator +# pre commit test trigger diff --git a/discord/file.py b/discord/file.py index f1f99ddc11..913755db01 100644 --- a/discord/file.py +++ b/discord/file.py @@ -204,3 +204,4 @@ def __init__( super().__init__(fp, filename, **kwargs) self.waveform = waveform self.duration_secs = duration_secs +# pre commit test trigger diff --git a/discord/flags.py b/discord/flags.py index ace2060a59..c92f2213a3 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -1839,3 +1839,4 @@ class RoleFlags(BaseFlags): def in_prompt(self): """:class:`bool`: Returns ``True`` if the role is selectable in one of the guild's :class:`~discord.OnboardingPrompt`.""" return 1 << 0 +# pre commit test trigger diff --git a/discord/gateway.py b/discord/gateway.py index b9b28f887d..066d905970 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -779,3 +779,4 @@ async def close(self, code: int = 4000) -> None: self._close_code = code await self.socket.close(code=code) +# pre commit test trigger diff --git a/discord/guild.py b/discord/guild.py index c94ea702ec..379189501e 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -4719,3 +4719,4 @@ def get_sound(self, sound_id: int) -> SoundboardSound | None: The sound or ``None`` if not found. """ return self._sounds.get(sound_id) +# pre commit test trigger diff --git a/discord/http.py b/discord/http.py index 40ebcd7c1f..56a3d6acbd 100644 --- a/discord/http.py +++ b/discord/http.py @@ -3385,3 +3385,4 @@ def send_soundboard_sound( ), json=payload, ) +# pre commit test trigger diff --git a/discord/incidents.py b/discord/incidents.py index a7ca3ef69b..5a38c31dbb 100644 --- a/discord/incidents.py +++ b/discord/incidents.py @@ -85,3 +85,4 @@ def to_dict(self) -> IncidentsDataPayload: "raid_detected_at": self.raid_detected_at and self.raid_detected_at.isoformat(), } +# pre commit test trigger diff --git a/discord/integrations.py b/discord/integrations.py index f5d67faad8..954b7d4ba3 100644 --- a/discord/integrations.py +++ b/discord/integrations.py @@ -372,3 +372,4 @@ def _integration_factory(value: str) -> tuple[type[Integration], str]: return StreamIntegration, value else: return Integration, value +# pre commit test trigger diff --git a/discord/interactions.py b/discord/interactions.py index f6af21d733..86364dec7f 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -1941,3 +1941,4 @@ def is_ephemeral(self) -> bool: This might be useful for determining if the message was forced to be ephemeral. """ return self._response_message_ephemeral +# pre commit test trigger diff --git a/discord/invite.py b/discord/invite.py index 198f0987bf..01b935ce1e 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -816,3 +816,4 @@ def set_scheduled_event(self, event: ScheduledEvent) -> None: The scheduled event object to link. """ self.scheduled_event = event +# pre commit test trigger diff --git a/discord/iterators.py b/discord/iterators.py index 50fdc6d2a3..1cd49944d7 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -1297,3 +1297,4 @@ async def retrieve_inner(self) -> list[Message]: ) def __await__(self) -> Generator[Any, Any, list[Message]]: return self.retrieve_inner().__await__() +# pre commit test trigger diff --git a/discord/member.py b/discord/member.py index 915f42595c..69dfcd5bed 100644 --- a/discord/member.py +++ b/discord/member.py @@ -1310,3 +1310,4 @@ def get_role(self, role_id: int, /) -> Role | None: The role or ``None`` if not found in the member's roles. """ return self.guild.get_role(role_id) if self._roles.has(role_id) else None +# pre commit test trigger diff --git a/discord/mentions.py b/discord/mentions.py index 3323c67856..b0eb464dbc 100644 --- a/discord/mentions.py +++ b/discord/mentions.py @@ -156,3 +156,4 @@ def __repr__(self) -> str: f"{self.__class__.__name__}(everyone={self.everyone}, " f"users={self.users}, roles={self.roles}, replied_user={self.replied_user})" ) +# pre commit test trigger diff --git a/discord/message.py b/discord/message.py index e1633aa97e..36c49892b6 100644 --- a/discord/message.py +++ b/discord/message.py @@ -2619,3 +2619,4 @@ async def end_poll(self) -> Message: message = self._state.create_message(channel=self.channel, data=data) return message +# pre commit test trigger diff --git a/discord/mixins.py b/discord/mixins.py index acf451361d..2dbb0054b6 100644 --- a/discord/mixins.py +++ b/discord/mixins.py @@ -46,3 +46,4 @@ class Hashable(EqualityComparable): def __hash__(self) -> int: return self.id >> 22 +# pre commit test trigger diff --git a/discord/monetization.py b/discord/monetization.py index 9244c2dcdf..ffc32945d5 100644 --- a/discord/monetization.py +++ b/discord/monetization.py @@ -348,3 +348,4 @@ def __eq__(self, other: object) -> bool: def user(self): """Optional[:class:`User`]: The user that owns this subscription.""" return self._state.get_user(self.user_id) +# pre commit test trigger diff --git a/discord/object.py b/discord/object.py index fd684069d8..4d50b2f906 100644 --- a/discord/object.py +++ b/discord/object.py @@ -109,3 +109,4 @@ def process_id(self) -> int: def increment_id(self) -> int: """Returns the increment id that made the snowflake.""" return self.id & 0xFFF +# pre commit test trigger diff --git a/discord/oggparse.py b/discord/oggparse.py index 70dc7f2e25..cec24630cd 100644 --- a/discord/oggparse.py +++ b/discord/oggparse.py @@ -121,3 +121,4 @@ def iter_packets(self) -> Generator[bytes]: if complete: yield partial partial = b"" +# pre commit test trigger diff --git a/discord/onboarding.py b/discord/onboarding.py index 4e4fa7e993..a78bce97c4 100644 --- a/discord/onboarding.py +++ b/discord/onboarding.py @@ -481,3 +481,4 @@ async def delete_prompt( prompts = self.prompts[:] prompts.remove(to_delete) return await self.edit(prompts=prompts, reason=reason) +# pre commit test trigger diff --git a/discord/opus.py b/discord/opus.py index 35f3e665aa..99e8f42612 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -732,3 +732,4 @@ def _decode_packet(self, packet: Packet) -> tuple[Packet, bytes]: pcm = dave.decrypt(user_id, davey.MediaType.audio, pcm) return packet, pcm +# pre commit test trigger diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py index acf1095eb8..5d8959b3c4 100644 --- a/discord/partial_emoji.py +++ b/discord/partial_emoji.py @@ -263,3 +263,4 @@ async def read(self) -> bytes: raise InvalidArgument("PartialEmoji is not a custom emoji") return await super().read() +# pre commit test trigger diff --git a/discord/permissions.py b/discord/permissions.py index 3d3ce83c9c..98f55494cc 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -899,3 +899,4 @@ def update(self, **kwargs: bool | None) -> None: def __iter__(self) -> Iterator[tuple[str, bool | None]]: for key in self.PURE_FLAGS: yield key, self._values.get(key) +# pre commit test trigger diff --git a/discord/player.py b/discord/player.py index 007bd7e8d7..59843b9208 100644 --- a/discord/player.py +++ b/discord/player.py @@ -943,3 +943,4 @@ def send_silence(self, count: int = 5) -> None: def played_frames(self) -> int: return self._played_frames_offset + self.loops +# pre commit test trigger diff --git a/discord/poll.py b/discord/poll.py index fd9ce2344d..2701b1d3b8 100644 --- a/discord/poll.py +++ b/discord/poll.py @@ -527,3 +527,4 @@ async def end(self) -> Message: raise RuntimeError("You can only end a poll received from a message.") return await self._message.end_poll() +# pre commit test trigger diff --git a/discord/primary_guild.py b/discord/primary_guild.py index 645d3be65b..df9aa7eb81 100644 --- a/discord/primary_guild.py +++ b/discord/primary_guild.py @@ -96,3 +96,4 @@ def badge(self) -> Asset | None: return Asset._from_user_primary_guild_tag( self._state, self.identity_guild_id, self._badge ) +# pre commit test trigger diff --git a/discord/raw_models.py b/discord/raw_models.py index 291a44fadc..3732e0a21b 100644 --- a/discord/raw_models.py +++ b/discord/raw_models.py @@ -1030,3 +1030,4 @@ def __init__(self, data: MemberUpdateEvent, member: Member) -> None: self.data: MemberUpdateEvent = data self.cached_member: Member | None = None self.member: Member = member +# pre commit test trigger diff --git a/discord/reaction.py b/discord/reaction.py index 418b0e3060..04c11808f6 100644 --- a/discord/reaction.py +++ b/discord/reaction.py @@ -294,3 +294,4 @@ class ReactionCountDetails: def __init__(self, data: ReactionCountDetailsPayload): self.normal = data.get("normal", 0) self.burst = data.get("burst", 0) +# pre commit test trigger diff --git a/discord/role.py b/discord/role.py index e7d24a6f83..54fe21a473 100644 --- a/discord/role.py +++ b/discord/role.py @@ -933,3 +933,4 @@ async def delete(self, *, reason: str | None = None) -> None: """ await self._state.http.delete_role(self.guild.id, self.id, reason=reason) +# pre commit test trigger diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py index 7e339dcee7..ab168bfac1 100644 --- a/discord/scheduled_events.py +++ b/discord/scheduled_events.py @@ -576,3 +576,4 @@ def subscribers( return ScheduledEventSubscribersIterator( event=self, limit=limit, with_member=as_member, before=before, after=after ) +# pre commit test trigger diff --git a/discord/shard.py b/discord/shard.py index 6d5dfc4dbf..7fa44de03f 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -585,3 +585,4 @@ def is_ws_ratelimited(self) -> bool: .. versionadded:: 1.6 """ return any(shard.ws.is_ratelimited() for shard in self.__shards.values()) +# pre commit test trigger diff --git a/discord/sinks/__init__.py b/discord/sinks/__init__.py index 6db5209af0..9c507b4c5d 100644 --- a/discord/sinks/__init__.py +++ b/discord/sinks/__init__.py @@ -18,3 +18,4 @@ from .ogg import * from .pcm import * from .wave import * +# pre commit test trigger diff --git a/discord/sinks/core.py b/discord/sinks/core.py index d22969a675..21c77763fa 100644 --- a/discord/sinks/core.py +++ b/discord/sinks/core.py @@ -248,3 +248,4 @@ def get_all_audio(self): def get_user_audio(self, user: snowflake.Snowflake): """Gets the audio file(s) of one specific user.""" return os.path.realpath(self.audio_data.pop(user)) +# pre commit test trigger diff --git a/discord/sinks/errors.py b/discord/sinks/errors.py index 5f036efff5..020103db97 100644 --- a/discord/sinks/errors.py +++ b/discord/sinks/errors.py @@ -87,3 +87,4 @@ class MKASinkError(SinkException): .. versionadded:: 2.0 """ +# pre commit test trigger diff --git a/discord/sinks/m4a.py b/discord/sinks/m4a.py index 1cff9da538..740279298e 100644 --- a/discord/sinks/m4a.py +++ b/discord/sinks/m4a.py @@ -101,3 +101,4 @@ def format_audio(self, audio): os.remove(m4a_file) audio.on_format(self.encoding) +# pre commit test trigger diff --git a/discord/sinks/mka.py b/discord/sinks/mka.py index c2bbefb923..e8fb566132 100644 --- a/discord/sinks/mka.py +++ b/discord/sinks/mka.py @@ -94,3 +94,4 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) +# pre commit test trigger diff --git a/discord/sinks/mkv.py b/discord/sinks/mkv.py index 93f4cc7444..58d8f10ad1 100644 --- a/discord/sinks/mkv.py +++ b/discord/sinks/mkv.py @@ -93,3 +93,4 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) +# pre commit test trigger diff --git a/discord/sinks/mp3.py b/discord/sinks/mp3.py index 74386a2738..33e87843c9 100644 --- a/discord/sinks/mp3.py +++ b/discord/sinks/mp3.py @@ -94,3 +94,4 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) +# pre commit test trigger diff --git a/discord/sinks/mp4.py b/discord/sinks/mp4.py index c4d0ed2b63..ead46ad912 100644 --- a/discord/sinks/mp4.py +++ b/discord/sinks/mp4.py @@ -101,3 +101,4 @@ def format_audio(self, audio): os.remove(mp4_file) audio.on_format(self.encoding) +# pre commit test trigger diff --git a/discord/sinks/ogg.py b/discord/sinks/ogg.py index 7b531464bd..51b84c3d6d 100644 --- a/discord/sinks/ogg.py +++ b/discord/sinks/ogg.py @@ -94,3 +94,4 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) +# pre commit test trigger diff --git a/discord/sinks/pcm.py b/discord/sinks/pcm.py index c587da349a..5d1f4417ad 100644 --- a/discord/sinks/pcm.py +++ b/discord/sinks/pcm.py @@ -43,3 +43,4 @@ def __init__(self, *, filters=None): def format_audio(self, audio): return +# pre commit test trigger diff --git a/discord/sinks/wave.py b/discord/sinks/wave.py index 37f5aac933..8cd7b7f316 100644 --- a/discord/sinks/wave.py +++ b/discord/sinks/wave.py @@ -67,3 +67,4 @@ def format_audio(self, audio): data.seek(0) audio.on_format(self.encoding) +# pre commit test trigger diff --git a/discord/soundboard.py b/discord/soundboard.py index 7ef8def8e3..f6272d4dfe 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -268,3 +268,4 @@ def delete(self, *, reason: str | None = None) -> Coroutine[Any, Any, None]: @override def __repr__(self) -> str: return f"" +# pre commit test trigger diff --git a/discord/stage_instance.py b/discord/stage_instance.py index 8864a2f59a..1ad997caec 100644 --- a/discord/stage_instance.py +++ b/discord/stage_instance.py @@ -197,3 +197,4 @@ async def delete(self, *, reason: str | None = None) -> None: Deleting the stage instance failed. """ await self._state.http.delete_stage_instance(self.channel_id, reason=reason) +# pre commit test trigger diff --git a/discord/state.py b/discord/state.py index 0662fc64d2..0157b18130 100644 --- a/discord/state.py +++ b/discord/state.py @@ -2287,3 +2287,4 @@ def parse_ready(self, data) -> None: def parse_resumed(self, data) -> None: self.dispatch("resumed") self.dispatch("shard_resumed", data["__shard_id__"]) +# pre commit test trigger diff --git a/discord/sticker.py b/discord/sticker.py index 78b4b8c1f4..6caf4a8b6d 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -552,3 +552,4 @@ def _sticker_factory( return GuildSticker, value else: return Sticker, value +# pre commit test trigger diff --git a/discord/team.py b/discord/team.py index 87773ba49a..e0e425a77d 100644 --- a/discord/team.py +++ b/discord/team.py @@ -178,3 +178,4 @@ def __repr__(self) -> str: ) def permissions(self) -> list[str]: return [] +# pre commit test trigger diff --git a/discord/template.py b/discord/template.py index d4cdffb568..ae251eab69 100644 --- a/discord/template.py +++ b/discord/template.py @@ -278,3 +278,4 @@ def url(self) -> str: .. versionadded:: 2.0 """ return f"https://discord.new/{self.code}" +# pre commit test trigger diff --git a/discord/threads.py b/discord/threads.py index 7d73331c1f..4964fe75aa 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -938,3 +938,4 @@ def _from_data(self, data: ThreadMemberPayload): def thread(self) -> Thread: """The thread this member belongs to.""" return self.parent +# pre commit test trigger diff --git a/discord/types/__init__.py b/discord/types/__init__.py index 79e1e68bb7..20a9158749 100644 --- a/discord/types/__init__.py +++ b/discord/types/__init__.py @@ -7,3 +7,4 @@ :copyright: (c) 2015-2021 Rapptz & (c) 2021-present Pycord Development :license: MIT, see LICENSE for more details. """ +# pre commit test trigger diff --git a/discord/types/activity.py b/discord/types/activity.py index c19e9b18c1..f3c21292e7 100644 --- a/discord/types/activity.py +++ b/discord/types/activity.py @@ -109,3 +109,4 @@ class Activity(_BaseActivity, total=False): session_id: str | None instance: bool buttons: list[str] +# pre commit test trigger diff --git a/discord/types/appinfo.py b/discord/types/appinfo.py index 8fdccf35f2..696db2da1f 100644 --- a/discord/types/appinfo.py +++ b/discord/types/appinfo.py @@ -93,3 +93,4 @@ class AppInfo(BaseAppInfo, total=False): class PartialAppInfo(BaseAppInfo, total=False): pass +# pre commit test trigger diff --git a/discord/types/application_role_connection.py b/discord/types/application_role_connection.py index cf797b8efa..7f9a41b114 100644 --- a/discord/types/application_role_connection.py +++ b/discord/types/application_role_connection.py @@ -38,3 +38,4 @@ class ApplicationRoleConnectionMetadata(TypedDict): name_localizations: NotRequired[dict[str, str]] description: str description_localizations: NotRequired[dict[str, str]] +# pre commit test trigger diff --git a/discord/types/audit_log.py b/discord/types/audit_log.py index 0575457e7a..1102fa0b49 100644 --- a/discord/types/audit_log.py +++ b/discord/types/audit_log.py @@ -294,3 +294,4 @@ class AuditLog(TypedDict): threads: list[Thread] scheduled_events: list[ScheduledEvent] auto_moderation_rules: list[AutoModRule] +# pre commit test trigger diff --git a/discord/types/automod.py b/discord/types/automod.py index 0417e78497..f9221d504e 100644 --- a/discord/types/automod.py +++ b/discord/types/automod.py @@ -89,3 +89,4 @@ class EditAutoModRule(TypedDict, total=False): enabled: bool exempt_roles: list[Snowflake] exempt_channels: list[Snowflake] +# pre commit test trigger diff --git a/discord/types/channel.py b/discord/types/channel.py index d4661cf8c4..09d28e68ac 100644 --- a/discord/types/channel.py +++ b/discord/types/channel.py @@ -194,3 +194,4 @@ class VoiceChannelEffectSendEvent(TypedDict): animation_id: NotRequired[int] sound_id: NotRequired[Snowflake | int] sound_volume: NotRequired[float] +# pre commit test trigger diff --git a/discord/types/collectibles.py b/discord/types/collectibles.py index e655c6922c..fdd76d3762 100644 --- a/discord/types/collectibles.py +++ b/discord/types/collectibles.py @@ -43,3 +43,4 @@ class Nameplate(TypedDict): class AvatarDecoration(TypedDict): sku_id: Snowflake asset: str +# pre commit test trigger diff --git a/discord/types/components.py b/discord/types/components.py index af567b6566..cda9049cc3 100644 --- a/discord/types/components.py +++ b/discord/types/components.py @@ -254,3 +254,4 @@ class CheckboxComponent(BaseComponent): CheckboxComponent, CheckboxGroupComponent, ] +# pre commit test trigger diff --git a/discord/types/embed.py b/discord/types/embed.py index 7d39c1630d..f6f786d891 100644 --- a/discord/types/embed.py +++ b/discord/types/embed.py @@ -101,3 +101,4 @@ class Embed(TypedDict, total=False): provider: EmbedProvider author: EmbedAuthor fields: list[EmbedField] +# pre commit test trigger diff --git a/discord/types/emoji.py b/discord/types/emoji.py index f4d7f64923..f02ddf7197 100644 --- a/discord/types/emoji.py +++ b/discord/types/emoji.py @@ -48,3 +48,4 @@ class Emoji(PartialEmoji, total=False): class EditEmoji(TypedDict): name: str roles: SnowflakeList | None +# pre commit test trigger diff --git a/discord/types/gateway.py b/discord/types/gateway.py index 42be89b337..48d04cd14e 100644 --- a/discord/types/gateway.py +++ b/discord/types/gateway.py @@ -40,3 +40,4 @@ class Gateway(TypedDict): class GatewayBot(Gateway): shards: int session_start_limit: SessionStartLimit +# pre commit test trigger diff --git a/discord/types/guild.py b/discord/types/guild.py index 3c71c8647e..070e413586 100644 --- a/discord/types/guild.py +++ b/discord/types/guild.py @@ -210,3 +210,4 @@ class IncidentsData(TypedDict, total=False): class ModifyIncidents(TypedDict, total=False): invites_disabled_until: str | None dms_disabled_until: str | None +# pre commit test trigger diff --git a/discord/types/integration.py b/discord/types/integration.py index 1a6c8b70f1..1b8f362386 100644 --- a/discord/types/integration.py +++ b/discord/types/integration.py @@ -81,3 +81,4 @@ class BotIntegration(BaseIntegration): Integration = Union[BaseIntegration, StreamIntegration, BotIntegration] +# pre commit test trigger diff --git a/discord/types/interactions.py b/discord/types/interactions.py index da1c345f64..5f4c0bfaf0 100644 --- a/discord/types/interactions.py +++ b/discord/types/interactions.py @@ -294,3 +294,4 @@ class InteractionCallbackResource(TypedDict): # This is not fully typed as activities are out of scope activity_instance: NotRequired[dict] message: NotRequired[Message] +# pre commit test trigger diff --git a/discord/types/invite.py b/discord/types/invite.py index 584b573094..07612e8033 100644 --- a/discord/types/invite.py +++ b/discord/types/invite.py @@ -104,3 +104,4 @@ class InviteTargetUsersJobStatus(TypedDict): created_at: NotRequired[str] completed_at: NotRequired[str | None] error_message: NotRequired[str] +# pre commit test trigger diff --git a/discord/types/member.py b/discord/types/member.py index ce582935d4..06fb0f743c 100644 --- a/discord/types/member.py +++ b/discord/types/member.py @@ -90,3 +90,4 @@ class MemberUpdateEvent(TypedDict): flags: NotRequired[int | None] avatar_decoration_data: NotRequired[AvatarDecoration | None] # collectibles: Collectibles +# pre commit test trigger diff --git a/discord/types/message.py b/discord/types/message.py index c6a48881c7..e5c01c7fc8 100644 --- a/discord/types/message.py +++ b/discord/types/message.py @@ -194,3 +194,4 @@ class AllowedMentions(TypedDict): roles: SnowflakeList users: SnowflakeList replied_user: bool +# pre commit test trigger diff --git a/discord/types/monetization.py b/discord/types/monetization.py index 13ed22ccc3..48605e58a2 100644 --- a/discord/types/monetization.py +++ b/discord/types/monetization.py @@ -76,3 +76,4 @@ class Subscription(TypedDict): status: SubscriptionStatus canceled_at: str | None country: NotRequired[str] +# pre commit test trigger diff --git a/discord/types/onboarding.py b/discord/types/onboarding.py index 31dda34ca8..488feb6883 100644 --- a/discord/types/onboarding.py +++ b/discord/types/onboarding.py @@ -63,3 +63,4 @@ class PromptOption(TypedDict): emoji_animated: NotRequired[bool] title: str description: str | None +# pre commit test trigger diff --git a/discord/types/poll.py b/discord/types/poll.py index ed747f93da..67264484ed 100644 --- a/discord/types/poll.py +++ b/discord/types/poll.py @@ -62,3 +62,4 @@ class Poll(TypedDict): allow_multiselect: bool layout_type: NotRequired[PollLayoutType] results: NotRequired[PollResults] +# pre commit test trigger diff --git a/discord/types/primary_guild.py b/discord/types/primary_guild.py index 5ee6386cc3..90c3c38a3b 100644 --- a/discord/types/primary_guild.py +++ b/discord/types/primary_guild.py @@ -34,3 +34,4 @@ class PrimaryGuild(TypedDict): identity_enabled: bool | None tag: str badge: str +# pre commit test trigger diff --git a/discord/types/raw_models.py b/discord/types/raw_models.py index 7ec8a446ca..4069f7778e 100644 --- a/discord/types/raw_models.py +++ b/discord/types/raw_models.py @@ -165,3 +165,4 @@ class MessagePollVoteEvent(TypedDict): channel_id: Snowflake message_id: Snowflake answer_id: int +# pre commit test trigger diff --git a/discord/types/role.py b/discord/types/role.py index 5e672eb636..8fec513bd0 100644 --- a/discord/types/role.py +++ b/discord/types/role.py @@ -60,3 +60,4 @@ class RoleTags(TypedDict, total=False): premium_subscriber: NotRequired[Literal[None]] available_for_purchase: NotRequired[Literal[None]] guild_connections: NotRequired[Literal[None]] +# pre commit test trigger diff --git a/discord/types/scheduled_events.py b/discord/types/scheduled_events.py index 9bb4ad0328..02b36bc378 100644 --- a/discord/types/scheduled_events.py +++ b/discord/types/scheduled_events.py @@ -63,3 +63,4 @@ class ScheduledEventSubscriber(TypedDict): user_id: Snowflake user: User member: Member | None +# pre commit test trigger diff --git a/discord/types/snowflake.py b/discord/types/snowflake.py index 3b89d29323..53e94e743a 100644 --- a/discord/types/snowflake.py +++ b/discord/types/snowflake.py @@ -27,3 +27,4 @@ Snowflake = Union[str, int] SnowflakeList = list[Snowflake] +# pre commit test trigger diff --git a/discord/types/soundboard.py b/discord/types/soundboard.py index 9a4c19b0ed..75b19bdce6 100644 --- a/discord/types/soundboard.py +++ b/discord/types/soundboard.py @@ -40,3 +40,4 @@ class SoundboardSound(TypedDict): guild_id: NotRequired[Snowflake] user: NotRequired[User] available: bool +# pre commit test trigger diff --git a/discord/types/sticker.py b/discord/types/sticker.py index 95945462e6..e82bf2055c 100644 --- a/discord/types/sticker.py +++ b/discord/types/sticker.py @@ -89,3 +89,4 @@ class EditGuildSticker(TypedDict, total=False): class ListPremiumStickerPacks(TypedDict): sticker_packs: list[StickerPack] +# pre commit test trigger diff --git a/discord/types/team.py b/discord/types/team.py index 466ef08cd4..cd0b7db4fe 100644 --- a/discord/types/team.py +++ b/discord/types/team.py @@ -44,3 +44,4 @@ class Team(TypedDict): owner_id: Snowflake members: list[TeamMember] icon: str | None +# pre commit test trigger diff --git a/discord/types/template.py b/discord/types/template.py index 8561836ecc..c039699932 100644 --- a/discord/types/template.py +++ b/discord/types/template.py @@ -49,3 +49,4 @@ class Template(TypedDict): source_guild_id: Snowflake serialized_source_guild: Guild is_dirty: bool | None +# pre commit test trigger diff --git a/discord/types/threads.py b/discord/types/threads.py index 447027183b..cb34b4085b 100644 --- a/discord/types/threads.py +++ b/discord/types/threads.py @@ -74,3 +74,4 @@ class ThreadPaginationPayload(TypedDict): threads: list[Thread] members: list[ThreadMember] has_more: bool +# pre commit test trigger diff --git a/discord/types/user.py b/discord/types/user.py index 2014286913..1b8e448b6a 100644 --- a/discord/types/user.py +++ b/discord/types/user.py @@ -55,3 +55,4 @@ class User(PartialUser, total=False): public_flags: int primary_guild: PrimaryGuild collectibles: Collectibles +# pre commit test trigger diff --git a/discord/types/voice.py b/discord/types/voice.py index 307f98cee3..dfe5521f59 100644 --- a/discord/types/voice.py +++ b/discord/types/voice.py @@ -87,3 +87,4 @@ class VoiceReady(TypedDict): port: int modes: list[SupportedModes] heartbeat_interval: int +# pre commit test trigger diff --git a/discord/types/webhook.py b/discord/types/webhook.py index a312b30a41..dcab5bbbd8 100644 --- a/discord/types/webhook.py +++ b/discord/types/webhook.py @@ -63,3 +63,4 @@ class Webhook(PartialWebhook): avatar: NotRequired[str | None] channel_id: NotRequired[Snowflake] application_id: NotRequired[Snowflake | None] +# pre commit test trigger diff --git a/discord/types/welcome_screen.py b/discord/types/welcome_screen.py index 48dc4cbf93..f4aaff2af6 100644 --- a/discord/types/welcome_screen.py +++ b/discord/types/welcome_screen.py @@ -40,3 +40,4 @@ class WelcomeScreenChannel(TypedDict): description: str emoji_id: Snowflake | None emoji_name: str | None +# pre commit test trigger diff --git a/discord/types/widget.py b/discord/types/widget.py index d327fa58fb..7137e4de6a 100644 --- a/discord/types/widget.py +++ b/discord/types/widget.py @@ -62,3 +62,4 @@ class Widget(TypedDict): class WidgetSettings(TypedDict): enabled: bool channel_id: Snowflake | None +# pre commit test trigger diff --git a/discord/ui/__init__.py b/discord/ui/__init__.py index e4044b00ab..9727e5bb6a 100644 --- a/discord/ui/__init__.py +++ b/discord/ui/__init__.py @@ -28,3 +28,4 @@ from .text_display import * from .thumbnail import * from .view import * +# pre commit test trigger diff --git a/discord/ui/action_row.py b/discord/ui/action_row.py index 730a1b2905..0365d8d618 100644 --- a/discord/ui/action_row.py +++ b/discord/ui/action_row.py @@ -434,3 +434,4 @@ def from_component(cls: type[A], component: ActionRowComponent) -> A: ) callback = None +# pre commit test trigger diff --git a/discord/ui/button.py b/discord/ui/button.py index a8ad878c38..7e0a1d2c80 100644 --- a/discord/ui/button.py +++ b/discord/ui/button.py @@ -418,3 +418,4 @@ def decorator(func: ItemCallbackType) -> ItemCallbackType: return func return decorator # type: ignore # lie to the type checkers, because after a View is instated, the button callback is converted into a Button instance +# pre commit test trigger diff --git a/discord/ui/checkbox.py b/discord/ui/checkbox.py index 5915f9938d..9d20db1df2 100644 --- a/discord/ui/checkbox.py +++ b/discord/ui/checkbox.py @@ -135,3 +135,4 @@ def refresh_from_modal( self, interaction: Interaction, data: CheckboxComponentPayload ) -> None: return self.refresh_state(data) +# pre commit test trigger diff --git a/discord/ui/checkbox_group.py b/discord/ui/checkbox_group.py index ed155898ab..2444205c87 100644 --- a/discord/ui/checkbox_group.py +++ b/discord/ui/checkbox_group.py @@ -284,3 +284,4 @@ def refresh_from_modal( self, interaction: Interaction, data: CheckboxGroupComponentPayload ) -> None: return self.refresh_state(data) +# pre commit test trigger diff --git a/discord/ui/container.py b/discord/ui/container.py index e35c05f7d6..d0435f1ebf 100644 --- a/discord/ui/container.py +++ b/discord/ui/container.py @@ -441,3 +441,4 @@ def from_component(cls: type[C], component: ContainerComponent) -> C: ) callback = None +# pre commit test trigger diff --git a/discord/ui/core.py b/discord/ui/core.py index c98a2265aa..5ca764a912 100644 --- a/discord/ui/core.py +++ b/discord/ui/core.py @@ -156,3 +156,4 @@ async def on_timeout(self) -> None: A callback that is called when this structure's timeout elapses without being explicitly stopped. """ +# pre commit test trigger diff --git a/discord/ui/file.py b/discord/ui/file.py index fd1109295d..c465d0fa60 100644 --- a/discord/ui/file.py +++ b/discord/ui/file.py @@ -148,3 +148,4 @@ def from_component(cls: type[F], component: FileComponent) -> F: ) callback = None +# pre commit test trigger diff --git a/discord/ui/file_upload.py b/discord/ui/file_upload.py index 784b8f6733..17a4e3931a 100644 --- a/discord/ui/file_upload.py +++ b/discord/ui/file_upload.py @@ -197,3 +197,4 @@ def from_component( required=component.required, id=component.id, ) +# pre commit test trigger diff --git a/discord/ui/input_text.py b/discord/ui/input_text.py index 5b632e933c..419be1971a 100644 --- a/discord/ui/input_text.py +++ b/discord/ui/input_text.py @@ -297,3 +297,4 @@ def from_component( TextInput = InputText +# pre commit test trigger diff --git a/discord/ui/item.py b/discord/ui/item.py index 6236bb77fd..f924fd9487 100644 --- a/discord/ui/item.py +++ b/discord/ui/item.py @@ -268,3 +268,4 @@ def modal(self) -> M | None: @modal.setter def modal(self, value) -> None: self._modal = value +# pre commit test trigger diff --git a/discord/ui/label.py b/discord/ui/label.py index 720b02b226..e87de9cb3d 100644 --- a/discord/ui/label.py +++ b/discord/ui/label.py @@ -564,3 +564,4 @@ def from_component(cls: type[L], component: LabelComponent) -> L: id=component.id, description=component.description, ) +# pre commit test trigger diff --git a/discord/ui/media_gallery.py b/discord/ui/media_gallery.py index 98ad8c965a..06a99517ab 100644 --- a/discord/ui/media_gallery.py +++ b/discord/ui/media_gallery.py @@ -177,3 +177,4 @@ def from_component(cls: type[M], component: MediaGalleryComponent) -> M: return cls(*component.items, id=component.id) callback = None +# pre commit test trigger diff --git a/discord/ui/modal.py b/discord/ui/modal.py index bb5fabc8ee..0fd918429a 100644 --- a/discord/ui/modal.py +++ b/discord/ui/modal.py @@ -526,3 +526,4 @@ async def dispatch(self, user_id: int, custom_id: str, interaction: Interaction) self.remove_modal(modal, user_id) except Exception as e: return await modal.on_error(e, interaction) +# pre commit test trigger diff --git a/discord/ui/radio_group.py b/discord/ui/radio_group.py index 7a01501776..6343b64544 100644 --- a/discord/ui/radio_group.py +++ b/discord/ui/radio_group.py @@ -234,3 +234,4 @@ def refresh_from_modal( self, interaction: Interaction, data: RadioGroupComponentPayload ) -> None: return self.refresh_state(data) +# pre commit test trigger diff --git a/discord/ui/section.py b/discord/ui/section.py index f0a5f95ac0..7653f5b526 100644 --- a/discord/ui/section.py +++ b/discord/ui/section.py @@ -357,3 +357,4 @@ def from_component(cls: type[S], component: SectionComponent) -> S: return cls(*items, accessory=accessory, id=component.id) callback = None +# pre commit test trigger diff --git a/discord/ui/select.py b/discord/ui/select.py index df18c9385c..083865634b 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -1179,3 +1179,4 @@ def channel_select( id=id, default_values=default_values, ) +# pre commit test trigger diff --git a/discord/ui/separator.py b/discord/ui/separator.py index 9277211f84..3516c444ab 100644 --- a/discord/ui/separator.py +++ b/discord/ui/separator.py @@ -120,3 +120,4 @@ def from_component(cls: type[S], component: SeparatorComponent) -> S: ) callback = None +# pre commit test trigger diff --git a/discord/ui/text_display.py b/discord/ui/text_display.py index be5cc83324..a2748abb54 100644 --- a/discord/ui/text_display.py +++ b/discord/ui/text_display.py @@ -108,3 +108,4 @@ def from_component(cls: type[T], component: TextDisplayComponent) -> T: return cls(component.content, id=component.id) callback = None +# pre commit test trigger diff --git a/discord/ui/thumbnail.py b/discord/ui/thumbnail.py index ea72969703..3faf2ee8fa 100644 --- a/discord/ui/thumbnail.py +++ b/discord/ui/thumbnail.py @@ -151,3 +151,4 @@ def from_component(cls: type[T], component: ThumbnailComponent) -> T: ) callback = None +# pre commit test trigger diff --git a/discord/ui/view.py b/discord/ui/view.py index fdc478b868..9c1fae393e 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -1047,3 +1047,4 @@ def update_from_message(self, message_id: int, components: list[ComponentPayload _log.exception( f"Failed to refresh View {view} from Message {message_id} due to mismatched state. Items may not have complete data." ) +# pre commit test trigger diff --git a/discord/user.py b/discord/user.py index 32a0cfe2be..64a64ce5da 100644 --- a/discord/user.py +++ b/discord/user.py @@ -738,3 +738,4 @@ def entitlements( user_id=self.id, exclude_ended=exclude_ended, ) +# pre commit test trigger diff --git a/discord/utils.py b/discord/utils.py index 8a8c4439b0..a3ab9c4a92 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -1688,3 +1688,4 @@ def _get_event_loop() -> asyncio.AbstractEventLoop: asyncio.set_event_loop(loop) return loop return asyncio.get_event_loop() +# pre commit test trigger diff --git a/discord/voice/__init__.py b/discord/voice/__init__.py index 97fd59cf62..5b366dc66b 100644 --- a/discord/voice/__init__.py +++ b/discord/voice/__init__.py @@ -17,3 +17,4 @@ from ._types import * from .client import * from .packets import * +# pre commit test trigger diff --git a/discord/voice/_types.py b/discord/voice/_types.py index 1426e1d6e8..cd8f086f6f 100644 --- a/discord/voice/_types.py +++ b/discord/voice/_types.py @@ -164,3 +164,4 @@ def cleanup(self) -> None: """ key, _ = self.channel._get_voice_client_key() self.client._connection._remove_voice_client(key) +# pre commit test trigger diff --git a/discord/voice/client.py b/discord/voice/client.py index 01f59fbf32..6bd885acd0 100644 --- a/discord/voice/client.py +++ b/discord/voice/client.py @@ -808,3 +808,4 @@ def is_speaking(self, member: Member | User) -> bool | None: return None if self._reader: return self._reader.speaking_timer.get_speaking(ssrc) +# pre commit test trigger diff --git a/discord/voice/enums.py b/discord/voice/enums.py index 76f78c768d..d497457927 100644 --- a/discord/voice/enums.py +++ b/discord/voice/enums.py @@ -77,3 +77,4 @@ class ConnectionFlowState(Enum): got_websocket_ready = 6 got_ip_discovery = 7 connected = 8 +# pre commit test trigger diff --git a/discord/voice/gateway.py b/discord/voice/gateway.py index 7b2aa3a17d..bfed36b76c 100644 --- a/discord/voice/gateway.py +++ b/discord/voice/gateway.py @@ -519,3 +519,4 @@ async def send_dave_transition_ready(self, transition_id: int) -> None: }, } await self.send_as_json(payload) +# pre commit test trigger diff --git a/discord/voice/packets/__init__.py b/discord/voice/packets/__init__.py index 04104643af..fd8651dbc7 100644 --- a/discord/voice/packets/__init__.py +++ b/discord/voice/packets/__init__.py @@ -61,3 +61,4 @@ def __init__( @property def opus(self) -> bytes | None: return self.packet.decrypted_data +# pre commit test trigger diff --git a/discord/voice/packets/core.py b/discord/voice/packets/core.py index 8fd82c232b..94263d3bdb 100644 --- a/discord/voice/packets/core.py +++ b/discord/voice/packets/core.py @@ -91,3 +91,4 @@ def is_silence(self) -> bool: def __hash__(self) -> int: return hash(self.data) +# pre commit test trigger diff --git a/discord/voice/packets/rtp.py b/discord/voice/packets/rtp.py index cbee2e1c96..4c59f80ee6 100644 --- a/discord/voice/packets/rtp.py +++ b/discord/voice/packets/rtp.py @@ -318,3 +318,4 @@ def _read_report(self, data: bytes, offset: int) -> _report: 200: SenderReportPacket, 201: ReceiverReportPacket, } +# pre commit test trigger diff --git a/discord/voice/receive/__init__.py b/discord/voice/receive/__init__.py index 7a1d31ba89..5df85df4d8 100644 --- a/discord/voice/receive/__init__.py +++ b/discord/voice/receive/__init__.py @@ -31,3 +31,4 @@ "PacketRouter", "SinkEventRouter", ) +# pre commit test trigger diff --git a/discord/voice/receive/reader.py b/discord/voice/receive/reader.py index bf3b88f6c6..c68116b55c 100644 --- a/discord/voice/receive/reader.py +++ b/discord/voice/receive/reader.py @@ -575,3 +575,4 @@ def run(self) -> None: def stop(self) -> None: self._end_thread.set() +# pre commit test trigger diff --git a/discord/voice/receive/router.py b/discord/voice/receive/router.py index b7f2f28064..eb82c2fac2 100644 --- a/discord/voice/receive/router.py +++ b/discord/voice/receive/router.py @@ -229,3 +229,4 @@ def _do_run(self) -> None: with self._lock: with self.reader.packet_router._lock: self._dispatch_to_listeners(event, *args, **kwargs) +# pre commit test trigger diff --git a/discord/voice/state.py b/discord/voice/state.py index e6d622df56..50cc991f5e 100644 --- a/discord/voice/state.py +++ b/discord/voice/state.py @@ -981,3 +981,4 @@ async def execute_dave_transition(self, transition: int) -> None: ) self.dave_pending_transition = None +# pre commit test trigger diff --git a/discord/voice/utils/__init__.py b/discord/voice/utils/__init__.py index e69de29bb2..78f7c87ba9 100644 --- a/discord/voice/utils/__init__.py +++ b/discord/voice/utils/__init__.py @@ -0,0 +1 @@ +# pre commit test trigger diff --git a/discord/voice/utils/buffer.py b/discord/voice/utils/buffer.py index f12fb0ae6e..dd864bf1a0 100644 --- a/discord/voice/utils/buffer.py +++ b/discord/voice/utils/buffer.py @@ -213,3 +213,4 @@ def reset(self) -> None: self._has_item.clear() self._prefill = self.prefill self._last_tx_seq = -1 +# pre commit test trigger diff --git a/discord/voice/utils/dependencies.py b/discord/voice/utils/dependencies.py index e3a8c3f83d..54e53f5ead 100644 --- a/discord/voice/utils/dependencies.py +++ b/discord/voice/utils/dependencies.py @@ -38,3 +38,4 @@ HAS_NACL = False else: HAS_NACL = True +# pre commit test trigger diff --git a/discord/voice/utils/multidataevent.py b/discord/voice/utils/multidataevent.py index e0079b5a54..cd46fe97b6 100644 --- a/discord/voice/utils/multidataevent.py +++ b/discord/voice/utils/multidataevent.py @@ -77,3 +77,4 @@ def unregister(self, item: T) -> None: def clear(self) -> None: self._items.clear() self._ready.clear() +# pre commit test trigger diff --git a/discord/voice/utils/wrapped.py b/discord/voice/utils/wrapped.py index fb2aafc630..74b63cb85f 100644 --- a/discord/voice/utils/wrapped.py +++ b/discord/voice/utils/wrapped.py @@ -30,3 +30,4 @@ def gap_wrapped(a: int, b: int, *, wrap: int = 65536) -> int: def add_wrapped(a: int, b: int, *, wrap: int = 65536) -> int: return (a + b) % wrap +# pre commit test trigger diff --git a/discord/webhook/__init__.py b/discord/webhook/__init__.py index adf7aa06c4..027f3dcfdc 100644 --- a/discord/webhook/__init__.py +++ b/discord/webhook/__init__.py @@ -10,3 +10,4 @@ from .async_ import * from .sync import * +# pre commit test trigger diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 53689278aa..e38d11b066 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -2210,3 +2210,4 @@ async def delete_message( proxy_auth=self.proxy_auth, thread_id=thread_id, ) +# pre commit test trigger diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py index a33655c868..8bdaff5590 100644 --- a/discord/webhook/sync.py +++ b/discord/webhook/sync.py @@ -1316,3 +1316,4 @@ def delete_message(self, message_id: int, *, thread_id: int | None = None) -> No session=self.session, thread_id=thread_id, ) +# pre commit test trigger diff --git a/discord/welcome_screen.py b/discord/welcome_screen.py index cb0d1eea0a..2bb146e03f 100644 --- a/discord/welcome_screen.py +++ b/discord/welcome_screen.py @@ -232,3 +232,4 @@ async def edit(self, **options): self._update(new) return self +# pre commit test trigger diff --git a/discord/widget.py b/discord/widget.py index b6bcf0f013..6bcc2d1c97 100644 --- a/discord/widget.py +++ b/discord/widget.py @@ -346,3 +346,4 @@ async def fetch_invite(self, *, with_counts: bool = True) -> Invite: invite_id = resolve_invite(self._invite) data = await self._state.http.get_invite(invite_id, with_counts=with_counts) return Invite.from_incomplete(state=self._state, data=data) +# pre commit test trigger diff --git a/docs/conf.py b/docs/conf.py index 053fb7d942..6caa7842ea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -316,3 +316,4 @@ def write_new(): "tasklist", ] myst_links_external_new_tab = True +# pre commit test trigger diff --git a/docs/extensions/attributetable.py b/docs/extensions/attributetable.py index e8c469efb4..39cca11f04 100644 --- a/docs/extensions/attributetable.py +++ b/docs/extensions/attributetable.py @@ -295,3 +295,4 @@ def setup(app): ) app.add_node(attributetableplaceholder) app.connect("doctree-resolved", process_attributetable) +# pre commit test trigger diff --git a/docs/extensions/exception_hierarchy.py b/docs/extensions/exception_hierarchy.py index 11a7bdd65c..47609918e7 100644 --- a/docs/extensions/exception_hierarchy.py +++ b/docs/extensions/exception_hierarchy.py @@ -32,3 +32,4 @@ def setup(app): html=(visit_exception_hierarchy_node, depart_exception_hierarchy_node), ) app.add_directive("exception_hierarchy", ExceptionHierarchyDirective) +# pre commit test trigger diff --git a/docs/extensions/nitpick_file_ignorer.py b/docs/extensions/nitpick_file_ignorer.py index 3b205da5fc..ecb70d861a 100644 --- a/docs/extensions/nitpick_file_ignorer.py +++ b/docs/extensions/nitpick_file_ignorer.py @@ -22,3 +22,4 @@ def setup(app: Sphinx): app.add_config_value("nitpick_ignore_files", [], "") f = NitpickFileIgnorer(app) sphinx_logging.getLogger("sphinx.transforms.post_transforms").logger.addFilter(f) +# pre commit test trigger diff --git a/docs/extensions/resourcelinks.py b/docs/extensions/resourcelinks.py index 73bbfb9247..8a30b77010 100644 --- a/docs/extensions/resourcelinks.py +++ b/docs/extensions/resourcelinks.py @@ -42,3 +42,4 @@ def setup(app: Sphinx) -> dict[str, Any]: app.add_config_value("resource_links", {}, "env") app.connect("builder-inited", add_link_role) return {"version": sphinx.__display_version__, "parallel_read_safe": True} +# pre commit test trigger diff --git a/examples/app_commands/context_menus.py b/examples/app_commands/context_menus.py index d6fbca3711..e4faf58afa 100644 --- a/examples/app_commands/context_menus.py +++ b/examples/app_commands/context_menus.py @@ -26,3 +26,4 @@ async def show_id( bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/info.py b/examples/app_commands/info.py index 51e769b033..e5b0cfe8b5 100644 --- a/examples/app_commands/info.py +++ b/examples/app_commands/info.py @@ -46,3 +46,4 @@ async def info(ctx: discord.ApplicationContext, user: discord.Member = None): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/slash_autocomplete.py b/examples/app_commands/slash_autocomplete.py index f5acb08829..a61c179286 100644 --- a/examples/app_commands/slash_autocomplete.py +++ b/examples/app_commands/slash_autocomplete.py @@ -234,3 +234,4 @@ async def get_vegetable(ctx: discord.ApplicationContext, choice: str): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/slash_basic.py b/examples/app_commands/slash_basic.py index 63c074f27b..7b56066423 100644 --- a/examples/app_commands/slash_basic.py +++ b/examples/app_commands/slash_basic.py @@ -44,3 +44,4 @@ async def joined(ctx: discord.ApplicationContext, member: discord.Member = None) # To learn how to add descriptions and choices to options, check slash_options.py bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/slash_cog.py b/examples/app_commands/slash_cog.py index 01b5a84480..c770f3a05a 100644 --- a/examples/app_commands/slash_cog.py +++ b/examples/app_commands/slash_cog.py @@ -27,3 +27,4 @@ def setup(bot): # bot = commands.Bot(command_prefix=commands.when_mentioned_or("!")) # bot.load_extension("slash_cog") # bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/slash_cog_groups.py b/examples/app_commands/slash_cog_groups.py index 0fd964d746..c9549d78bd 100644 --- a/examples/app_commands/slash_cog_groups.py +++ b/examples/app_commands/slash_cog_groups.py @@ -54,3 +54,4 @@ async def on_application_command_error( bot.add_cog(Example(bot)) # Put in a setup function for cog files bot.run("TOKEN") # Main file +# pre commit test trigger diff --git a/examples/app_commands/slash_groups.py b/examples/app_commands/slash_groups.py index fa216781ad..ce877f8a3d 100644 --- a/examples/app_commands/slash_groups.py +++ b/examples/app_commands/slash_groups.py @@ -22,3 +22,4 @@ async def add(ctx: discord.ApplicationContext, num1: int, num2: int): bot.add_application_command(math) bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/slash_options.py b/examples/app_commands/slash_options.py index be625738b1..17aaeb906c 100644 --- a/examples/app_commands/slash_options.py +++ b/examples/app_commands/slash_options.py @@ -72,3 +72,4 @@ async def say( bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/slash_perms.py b/examples/app_commands/slash_perms.py index bf21e04073..83cf506289 100644 --- a/examples/app_commands/slash_perms.py +++ b/examples/app_commands/slash_perms.py @@ -27,3 +27,4 @@ async def staff_only(ctx: discord.ApplicationContext): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/app_commands/slash_users.py b/examples/app_commands/slash_users.py index 73c32cfbad..41c75f9204 100644 --- a/examples/app_commands/slash_users.py +++ b/examples/app_commands/slash_users.py @@ -31,3 +31,4 @@ async def say_hello(ctx: discord.ApplicationContext): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/audio_recording.py b/examples/audio_recording.py index 38156688f7..aa880f75d2 100644 --- a/examples/audio_recording.py +++ b/examples/audio_recording.py @@ -62,3 +62,4 @@ async def stop(ctx: discord.ApplicationContext): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/audio_recording_merged.py b/examples/audio_recording_merged.py index 9148a67a43..38d43df25f 100644 --- a/examples/audio_recording_merged.py +++ b/examples/audio_recording_merged.py @@ -111,3 +111,4 @@ async def leave(ctx: discord.ApplicationContext): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/background_task.py b/examples/background_task.py index 9bba50abda..e676f73fb5 100644 --- a/examples/background_task.py +++ b/examples/background_task.py @@ -67,3 +67,4 @@ async def fetch_status_task(self): client = MyClient() client.run("TOKEN") +# pre commit test trigger diff --git a/examples/background_task_asyncio.py b/examples/background_task_asyncio.py index 05eadf0516..f21af2ed45 100644 --- a/examples/background_task_asyncio.py +++ b/examples/background_task_asyncio.py @@ -26,3 +26,4 @@ async def my_background_task(self): client = MyClient() client.run("TOKEN") +# pre commit test trigger diff --git a/examples/basic_async_bot.py b/examples/basic_async_bot.py index a72859fb37..8a6eaf92f2 100644 --- a/examples/basic_async_bot.py +++ b/examples/basic_async_bot.py @@ -27,3 +27,4 @@ async def main(): asyncio.run(main()) +# pre commit test trigger diff --git a/examples/basic_bot.py b/examples/basic_bot.py index e452742983..500061dabd 100644 --- a/examples/basic_bot.py +++ b/examples/basic_bot.py @@ -86,3 +86,4 @@ async def _bot(ctx: commands.Context): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/basic_voice.py b/examples/basic_voice.py index f81c7ad373..bbda95688c 100644 --- a/examples/basic_voice.py +++ b/examples/basic_voice.py @@ -149,3 +149,4 @@ async def on_ready(): bot.add_cog(Music(bot)) bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/bridge_commands.py b/examples/bridge_commands.py index 4eecebe632..63ba56ad60 100644 --- a/examples/bridge_commands.py +++ b/examples/bridge_commands.py @@ -69,3 +69,4 @@ async def on_command_error(ctx: commands.Context, error: commands.CommandError): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/community_invites.py b/examples/community_invites.py index efa7d22684..3aa2092c12 100644 --- a/examples/community_invites.py +++ b/examples/community_invites.py @@ -66,3 +66,4 @@ async def get_invite_target_users(ctx: discord.ApplicationContext, code: str): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/converters.py b/examples/converters.py index 1d2359e944..307be53142 100644 --- a/examples/converters.py +++ b/examples/converters.py @@ -124,3 +124,4 @@ async def multiply(ctx: commands.Context, number: int, maybe: bool): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/cooldown.py b/examples/cooldown.py index ee25ac699d..bb4afea52e 100644 --- a/examples/cooldown.py +++ b/examples/cooldown.py @@ -70,3 +70,4 @@ async def on_command_error(ctx: commands.Context, error: commands.CommandError): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/create_private_emoji.py b/examples/create_private_emoji.py index 66ce3823bf..d70e13c0b9 100644 --- a/examples/create_private_emoji.py +++ b/examples/create_private_emoji.py @@ -31,3 +31,4 @@ async def add_private_emoji( bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/custom_context.py b/examples/custom_context.py index 334cd06041..51ea22af7d 100644 --- a/examples/custom_context.py +++ b/examples/custom_context.py @@ -87,3 +87,4 @@ async def slash_guess(ctx: MyApplicationContext, number: int): # bot. Try to use a file or something to keep # them private, and don't commit it to GitHub. bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/deleted.py b/examples/deleted.py index 75512362b4..f8785af995 100644 --- a/examples/deleted.py +++ b/examples/deleted.py @@ -32,3 +32,4 @@ async def on_message_delete(message: discord.Message): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/edits.py b/examples/edits.py index 1cc43c9438..e3bc76dddb 100644 --- a/examples/edits.py +++ b/examples/edits.py @@ -35,3 +35,4 @@ async def on_message_edit(before: discord.Message, after: discord.Message): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/modal_dialogs.py b/examples/modal_dialogs.py index 426b0ad075..0e7fa41f2b 100644 --- a/examples/modal_dialogs.py +++ b/examples/modal_dialogs.py @@ -151,3 +151,4 @@ async def select_callback( bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/new_member.py b/examples/new_member.py index d9c2be7201..950e668f63 100644 --- a/examples/new_member.py +++ b/examples/new_member.py @@ -22,3 +22,4 @@ async def on_member_join(member: discord.Member): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/reaction_roles.py b/examples/reaction_roles.py index edceab62b2..cd35c4de78 100644 --- a/examples/reaction_roles.py +++ b/examples/reaction_roles.py @@ -99,3 +99,4 @@ async def on_raw_reaction_remove(payload: discord.RawReactionActionEvent): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/reply.py b/examples/reply.py index d7a4d60969..0d8136f8ee 100644 --- a/examples/reply.py +++ b/examples/reply.py @@ -26,3 +26,4 @@ async def on_message(message: discord.Message): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/secret.py b/examples/secret.py index b78ce2e88d..801c6093fc 100644 --- a/examples/secret.py +++ b/examples/secret.py @@ -131,3 +131,4 @@ async def on_command_error(ctx: commands.Context, error: commands.CommandError): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/soundboard.py b/examples/soundboard.py index edda65cf5f..7b2ab95929 100644 --- a/examples/soundboard.py +++ b/examples/soundboard.py @@ -168,3 +168,4 @@ async def play_sound( bot.add_cog(SoundboardCog(bot)) bot.run(TOKEN) +# pre commit test trigger diff --git a/examples/timeout.py b/examples/timeout.py index e91b907acc..13511567b0 100644 --- a/examples/timeout.py +++ b/examples/timeout.py @@ -24,3 +24,4 @@ async def timeout( bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/button_roles.py b/examples/views/button_roles.py index 12284e65bc..0ca069d872 100644 --- a/examples/views/button_roles.py +++ b/examples/views/button_roles.py @@ -111,3 +111,4 @@ def setup(bot): # bot = commands.Bot(command_prefix=commands.when_mentioned_or("!")) # bot.load_extension("button_roles") # bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/channel_select.py b/examples/views/channel_select.py index bc24d1109e..8b2e482cca 100644 --- a/examples/views/channel_select.py +++ b/examples/views/channel_select.py @@ -43,3 +43,4 @@ async def on_ready() -> None: bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/confirm.py b/examples/views/confirm.py index c557693d42..0329a1ad63 100644 --- a/examples/views/confirm.py +++ b/examples/views/confirm.py @@ -64,3 +64,4 @@ async def ask(ctx: commands.Context): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/counter.py b/examples/views/counter.py index 642d7df6c9..53e4cc75c9 100644 --- a/examples/views/counter.py +++ b/examples/views/counter.py @@ -44,3 +44,4 @@ async def counter(ctx: commands.Context): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/dropdown.py b/examples/views/dropdown.py index 38c877d2a4..bd6e45f88f 100644 --- a/examples/views/dropdown.py +++ b/examples/views/dropdown.py @@ -76,3 +76,4 @@ async def on_ready(): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/ephemeral.py b/examples/views/ephemeral.py index 6f94d390ac..469294a587 100644 --- a/examples/views/ephemeral.py +++ b/examples/views/ephemeral.py @@ -48,3 +48,4 @@ async def on_ready(): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/link.py b/examples/views/link.py index c7c463c0ae..f206bf7d2a 100644 --- a/examples/views/link.py +++ b/examples/views/link.py @@ -37,3 +37,4 @@ async def on_ready(): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/new_components.py b/examples/views/new_components.py index e022dab089..956e2eaf54 100644 --- a/examples/views/new_components.py +++ b/examples/views/new_components.py @@ -85,3 +85,4 @@ async def show_view(ctx: ApplicationContext): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/paginator.py b/examples/views/paginator.py index 043a7aeb9b..dc4bba27a8 100644 --- a/examples/views/paginator.py +++ b/examples/views/paginator.py @@ -339,3 +339,4 @@ def setup(bot): # bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"), intents=intents) # bot.load_extension("paginator") # bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/persistent.py b/examples/views/persistent.py index 527c2fe172..7a6168d626 100644 --- a/examples/views/persistent.py +++ b/examples/views/persistent.py @@ -75,3 +75,4 @@ async def prepare(ctx: commands.Context): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/role_select.py b/examples/views/role_select.py index e8da45f414..4d611cdd5d 100644 --- a/examples/views/role_select.py +++ b/examples/views/role_select.py @@ -43,3 +43,4 @@ async def on_ready() -> None: bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/views/tic_tac_toe.py b/examples/views/tic_tac_toe.py index 19e5415bc9..937083adbb 100644 --- a/examples/views/tic_tac_toe.py +++ b/examples/views/tic_tac_toe.py @@ -141,3 +141,4 @@ async def on_ready(): bot.run("TOKEN") +# pre commit test trigger diff --git a/examples/wait_for_event.py b/examples/wait_for_event.py index 927443af1a..99cc684555 100644 --- a/examples/wait_for_event.py +++ b/examples/wait_for_event.py @@ -53,3 +53,4 @@ def is_valid_guess(m: discord.Message): bot.run("TOKEN") +# pre commit test trigger diff --git a/scripts/add-precommit-trigger.cmd b/scripts/add-precommit-trigger.cmd new file mode 100644 index 0000000000..6981275d35 --- /dev/null +++ b/scripts/add-precommit-trigger.cmd @@ -0,0 +1,22 @@ +@echo off +setlocal + +powershell -NoProfile -ExecutionPolicy Bypass -Command ^ + "$marker = '# pre commit test trigger';" ^ + "$utf8 = New-Object System.Text.UTF8Encoding($false);" ^ + "Get-ChildItem -LiteralPath . -Filter '*.py' -File -Recurse |" ^ + "Where-Object { $_.FullName -notmatch '\\(?:\.git|\.venv|venv|env|__pycache__|node_modules)\\' } |" ^ + "ForEach-Object {" ^ + " $path = $_.FullName;" ^ + " $content = [System.IO.File]::ReadAllText($path);" ^ + " if ($content -notmatch '(?s)(?:^|\r?\n)# pre commit test trigger(?:\r?\n)?$') {" ^ + " $newline = if ($content.Contains(\"`r`n\")) { \"`r`n\" } else { \"`n\" };" ^ + " $separator = if ($content.Length -eq 0 -or $content.EndsWith(\"`n\")) { '' } else { $newline };" ^ + " [System.IO.File]::WriteAllText($path, $content + $separator + $marker + $newline, $utf8);" ^ + " Write-Host ('Added: ' + $_.FullName);" ^ + " }" ^ + "}" + +echo. +echo Finished adding pre-commit trigger comments. +endlocal \ No newline at end of file diff --git a/scripts/count_sourcelines.py b/scripts/count_sourcelines.py index 4cad2bcb25..e8ff82c55d 100644 --- a/scripts/count_sourcelines.py +++ b/scripts/count_sourcelines.py @@ -45,3 +45,4 @@ print("%05d lines in %s" % (line_number_count, filename)) print(f"\nTotal: {sum([x[0] for x in loc_list])} lines ({cur_path})") +# pre commit test trigger diff --git a/scripts/discord_release_notification.py b/scripts/discord_release_notification.py index 58c17aec92..f709455e4d 100644 --- a/scripts/discord_release_notification.py +++ b/scripts/discord_release_notification.py @@ -119,3 +119,4 @@ def main() -> None: if __name__ == "__main__": main() +# pre commit test trigger diff --git a/scripts/docs_json_exporter.py b/scripts/docs_json_exporter.py index a853349baa..94b01703c4 100644 --- a/scripts/docs_json_exporter.py +++ b/scripts/docs_json_exporter.py @@ -88,3 +88,4 @@ def log(msg): log("To upload as artifact: docs.json") except Exception as e: print(f"::error::Docs JSON export failed: {e}") +# pre commit test trigger diff --git a/scripts/release_changelog.py b/scripts/release_changelog.py index b98415c642..6e26525ee3 100644 --- a/scripts/release_changelog.py +++ b/scripts/release_changelog.py @@ -231,3 +231,4 @@ def main() -> None: if __name__ == "__main__": main() +# pre commit test trigger diff --git a/scripts/release_rtd_versions.py b/scripts/release_rtd_versions.py index 96224f6506..05bf8b4c63 100644 --- a/scripts/release_rtd_versions.py +++ b/scripts/release_rtd_versions.py @@ -138,3 +138,4 @@ def main() -> None: if __name__ == "__main__": main() +# pre commit test trigger diff --git a/scripts/remove-precommit-trigger.cmd b/scripts/remove-precommit-trigger.cmd new file mode 100644 index 0000000000..3f7a2e453b --- /dev/null +++ b/scripts/remove-precommit-trigger.cmd @@ -0,0 +1,21 @@ +@echo off +setlocal + +powershell -NoProfile -ExecutionPolicy Bypass -Command ^ + "$markerPattern = '(?m)^# pre commit test trigger\r?\n?$';" ^ + "$utf8 = New-Object System.Text.UTF8Encoding($false);" ^ + "Get-ChildItem -LiteralPath . -Filter '*.py' -File -Recurse |" ^ + "Where-Object { $_.FullName -notmatch '\\(?:\.git|\.venv|venv|env|__pycache__|node_modules)\\' } |" ^ + "ForEach-Object {" ^ + " $path = $_.FullName;" ^ + " $content = [System.IO.File]::ReadAllText($path);" ^ + " $updated = [regex]::Replace($content, $markerPattern, '');" ^ + " if ($updated -ne $content) {" ^ + " [System.IO.File]::WriteAllText($path, $updated, $utf8);" ^ + " Write-Host ('Removed: ' + $_.FullName);" ^ + " }" ^ + "}" + +echo. +echo Finished removing pre-commit trigger comments. +endlocal \ No newline at end of file diff --git a/setup.py b/setup.py index 7f1a1763ca..58bb999f2a 100644 --- a/setup.py +++ b/setup.py @@ -2,3 +2,4 @@ if __name__ == "__main__": setup() +# pre commit test trigger diff --git a/tests/__init__.py b/tests/__init__.py index e69de29bb2..78f7c87ba9 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1 @@ +# pre commit test trigger diff --git a/tests/voice/__init__.py b/tests/voice/__init__.py index e69de29bb2..78f7c87ba9 100644 --- a/tests/voice/__init__.py +++ b/tests/voice/__init__.py @@ -0,0 +1 @@ +# pre commit test trigger diff --git a/tests/voice/test_dependency_behavior.py b/tests/voice/test_dependency_behavior.py index 9ad8f773d8..9dbab115ef 100644 --- a/tests/voice/test_dependency_behavior.py +++ b/tests/voice/test_dependency_behavior.py @@ -64,3 +64,4 @@ def test_voice_modules_imports_without_voice_dependencies(): with pytest.raises(discord.MissingVoiceDependenciesError): __import__("discord.voice.receive.reader") +# pre commit test trigger diff --git a/tests/voice/test_imports.py b/tests/voice/test_imports.py index 510751253a..3f9d85e3f3 100644 --- a/tests/voice/test_imports.py +++ b/tests/voice/test_imports.py @@ -53,3 +53,4 @@ def test_voice_modules_import_with_voice_extra(): __import__("discord.voice") __import__("discord.voice.gateway") __import__("discord.voice.receive.reader") +# pre commit test trigger diff --git a/tests/voice/test_player.py b/tests/voice/test_player.py index 83900ad7aa..943ba2ed56 100644 --- a/tests/voice/test_player.py +++ b/tests/voice/test_player.py @@ -50,3 +50,4 @@ def test_audio_player_resume_preserves_played_frames(): assert player._played_frames_offset == 75 assert player.loops == 0 assert player.played_frames() == 75 +# pre commit test trigger diff --git a/tests/voice/test_wait_finish.py b/tests/voice/test_wait_finish.py index f8abcfeff1..051f6df523 100644 --- a/tests/voice/test_wait_finish.py +++ b/tests/voice/test_wait_finish.py @@ -111,3 +111,4 @@ def __init__(self, *args, **kwargs) -> None: assert future.result() is err finally: loop.close() +# pre commit test trigger From aef8b078e1ac0888b622bf31b8a56bab5fc935ac Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 11:37:56 +0000 Subject: [PATCH 19/21] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/abc.py | 2 ++ discord/activity.py | 2 ++ discord/appinfo.py | 2 ++ discord/application_role_connection.py | 2 ++ discord/asset.py | 2 ++ discord/audit_logs.py | 2 ++ discord/automod.py | 2 ++ discord/backoff.py | 2 ++ discord/bot.py | 2 ++ discord/channel.py | 2 ++ discord/client.py | 2 ++ discord/cog.py | 2 ++ discord/collectibles.py | 2 ++ discord/commands/__init__.py | 1 + discord/commands/context.py | 2 ++ discord/commands/core.py | 2 ++ discord/commands/options.py | 2 ++ discord/commands/permissions.py | 2 ++ discord/components.py | 2 ++ discord/context_managers.py | 2 ++ discord/embeds.py | 2 ++ discord/emoji.py | 2 ++ discord/enums.py | 2 ++ discord/errors.py | 2 ++ discord/ext/bridge/__init__.py | 1 + discord/ext/bridge/bot.py | 2 ++ discord/ext/bridge/core.py | 2 ++ discord/ext/commands/__init__.py | 1 + discord/ext/commands/bot.py | 2 ++ discord/ext/commands/cog.py | 2 ++ discord/ext/commands/context.py | 2 ++ discord/ext/commands/converter.py | 2 ++ discord/ext/commands/cooldowns.py | 2 ++ discord/ext/commands/core.py | 2 ++ discord/ext/commands/errors.py | 2 ++ discord/ext/commands/flags.py | 2 ++ discord/ext/commands/help.py | 2 ++ discord/ext/commands/view.py | 2 ++ discord/ext/pages/__init__.py | 1 + discord/ext/pages/pagination.py | 2 ++ discord/ext/tasks/__init__.py | 2 ++ discord/file.py | 2 ++ discord/flags.py | 2 ++ discord/gateway.py | 2 ++ discord/guild.py | 2 ++ discord/http.py | 2 ++ discord/incidents.py | 2 ++ discord/integrations.py | 2 ++ discord/interactions.py | 2 ++ discord/invite.py | 2 ++ discord/iterators.py | 2 ++ discord/member.py | 2 ++ discord/mentions.py | 2 ++ discord/message.py | 2 ++ discord/mixins.py | 2 ++ discord/monetization.py | 2 ++ discord/object.py | 2 ++ discord/oggparse.py | 2 ++ discord/onboarding.py | 2 ++ discord/opus.py | 2 ++ discord/partial_emoji.py | 2 ++ discord/permissions.py | 2 ++ discord/player.py | 2 ++ discord/poll.py | 2 ++ discord/primary_guild.py | 2 ++ discord/raw_models.py | 2 ++ discord/reaction.py | 2 ++ discord/role.py | 2 ++ discord/scheduled_events.py | 2 ++ discord/shard.py | 2 ++ discord/sinks/__init__.py | 1 + discord/sinks/core.py | 2 ++ discord/sinks/errors.py | 2 ++ discord/sinks/m4a.py | 2 ++ discord/sinks/mka.py | 2 ++ discord/sinks/mkv.py | 2 ++ discord/sinks/mp3.py | 2 ++ discord/sinks/mp4.py | 2 ++ discord/sinks/ogg.py | 2 ++ discord/sinks/pcm.py | 2 ++ discord/sinks/wave.py | 2 ++ discord/soundboard.py | 2 ++ discord/stage_instance.py | 2 ++ discord/state.py | 2 ++ discord/sticker.py | 2 ++ discord/team.py | 2 ++ discord/template.py | 2 ++ discord/threads.py | 2 ++ discord/types/__init__.py | 1 + discord/types/activity.py | 2 ++ discord/types/appinfo.py | 2 ++ discord/types/application_role_connection.py | 2 ++ discord/types/audit_log.py | 2 ++ discord/types/automod.py | 2 ++ discord/types/channel.py | 2 ++ discord/types/collectibles.py | 2 ++ discord/types/embed.py | 2 ++ discord/types/emoji.py | 2 ++ discord/types/gateway.py | 2 ++ discord/types/guild.py | 2 ++ discord/types/interactions.py | 2 ++ discord/types/invite.py | 2 ++ discord/types/member.py | 2 ++ discord/types/message.py | 2 ++ discord/types/monetization.py | 2 ++ discord/types/onboarding.py | 2 ++ discord/types/poll.py | 2 ++ discord/types/primary_guild.py | 2 ++ discord/types/raw_models.py | 2 ++ discord/types/role.py | 2 ++ discord/types/scheduled_events.py | 2 ++ discord/types/soundboard.py | 2 ++ discord/types/sticker.py | 2 ++ discord/types/team.py | 2 ++ discord/types/template.py | 2 ++ discord/types/threads.py | 2 ++ discord/types/user.py | 2 ++ discord/types/voice.py | 2 ++ discord/types/webhook.py | 2 ++ discord/types/welcome_screen.py | 2 ++ discord/types/widget.py | 2 ++ discord/ui/__init__.py | 1 + discord/ui/action_row.py | 2 ++ discord/ui/button.py | 2 ++ discord/ui/checkbox.py | 2 ++ discord/ui/checkbox_group.py | 2 ++ discord/ui/container.py | 2 ++ discord/ui/core.py | 2 ++ discord/ui/file.py | 2 ++ discord/ui/file_upload.py | 2 ++ discord/ui/item.py | 2 ++ discord/ui/label.py | 2 ++ discord/ui/media_gallery.py | 2 ++ discord/ui/modal.py | 2 ++ discord/ui/radio_group.py | 2 ++ discord/ui/section.py | 2 ++ discord/ui/select.py | 2 ++ discord/ui/separator.py | 2 ++ discord/ui/text_display.py | 2 ++ discord/ui/thumbnail.py | 2 ++ discord/ui/view.py | 2 ++ discord/user.py | 2 ++ discord/utils.py | 2 ++ discord/voice/__init__.py | 1 + discord/voice/_types.py | 2 ++ discord/voice/client.py | 2 ++ discord/voice/enums.py | 2 ++ discord/voice/gateway.py | 2 ++ discord/voice/packets/__init__.py | 2 ++ discord/voice/packets/core.py | 2 ++ discord/voice/receive/reader.py | 2 ++ discord/voice/receive/router.py | 2 ++ discord/voice/state.py | 2 ++ discord/voice/utils/buffer.py | 2 ++ discord/voice/utils/multidataevent.py | 2 ++ discord/voice/utils/wrapped.py | 2 ++ discord/webhook/__init__.py | 1 + discord/webhook/async_.py | 2 ++ discord/webhook/sync.py | 2 ++ discord/welcome_screen.py | 2 ++ discord/widget.py | 2 ++ docs/extensions/attributetable.py | 2 ++ docs/extensions/exception_hierarchy.py | 2 ++ docs/extensions/nitpick_file_ignorer.py | 2 ++ docs/extensions/resourcelinks.py | 2 ++ scripts/add-precommit-trigger.cmd | 2 +- scripts/remove-precommit-trigger.cmd | 2 +- tests/voice/test_dependency_behavior.py | 2 ++ tests/voice/test_imports.py | 2 ++ tests/voice/test_player.py | 2 ++ tests/voice/test_wait_finish.py | 2 ++ 171 files changed, 331 insertions(+), 2 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index 4d5aacf3b4..9bc7218a2a 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -2097,4 +2097,6 @@ async def connect( class Mentionable: # TODO: documentation, methods if needed pass + + # pre commit test trigger diff --git a/discord/activity.py b/discord/activity.py index 4d3ff3482d..0ec0071773 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -879,4 +879,6 @@ def create_activity(data: ActivityPayload | None) -> ActivityTypes | None: ): return Spotify(**data) return Activity(**data) + + # pre commit test trigger diff --git a/discord/appinfo.py b/discord/appinfo.py index 05a3d8992f..a8f5cc69bf 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -648,4 +648,6 @@ def _to_payload(self) -> dict[int, dict[str, dict[str, Any]] | None]: if self.user is not utils.MISSING: payload[1] = self._encode_install_params(self.user) return payload + + # pre commit test trigger diff --git a/discord/application_role_connection.py b/discord/application_role_connection.py index 3cc738d059..7184a46089 100644 --- a/discord/application_role_connection.py +++ b/discord/application_role_connection.py @@ -126,4 +126,6 @@ def to_dict(self) -> ApplicationRoleConnectionMetadataPayload: if self.description_localizations is not MISSING: data["description_localizations"] = self.description_localizations return data + + # pre commit test trigger diff --git a/discord/asset.py b/discord/asset.py index 718313b469..4b1b26dd92 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -524,4 +524,6 @@ def with_static_format(self, format: ValidStaticFormatTypes, /) -> Asset: if self._animated: return self return self.with_format(format) + + # pre commit test trigger diff --git a/discord/audit_logs.py b/discord/audit_logs.py index e0447dea45..7e104f4582 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -718,4 +718,6 @@ def _convert_target_scheduled_event( self, target_id: int ) -> ScheduledEvent | Object: return self.guild.get_scheduled_event(target_id) or Object(id=target_id) + + # pre commit test trigger diff --git a/discord/automod.py b/discord/automod.py index 904c41bc17..28c3d9faa4 100644 --- a/discord/automod.py +++ b/discord/automod.py @@ -558,4 +558,6 @@ async def edit( self.guild_id, self.id, payload, reason=reason ) return AutoModRule(state=self._state, data=data) + + # pre commit test trigger diff --git a/discord/backoff.py b/discord/backoff.py index f36313e9da..8173ed66b4 100644 --- a/discord/backoff.py +++ b/discord/backoff.py @@ -100,4 +100,6 @@ def delay(self) -> int | float: self._exp = min(self._exp + 1, self._max) return self._randfunc(0, self._base * 2**self._exp) + + # pre commit test trigger diff --git a/discord/bot.py b/discord/bot.py index 614efc04e6..088514ec9f 100644 --- a/discord/bot.py +++ b/discord/bot.py @@ -1681,4 +1681,6 @@ class AutoShardedBot(BotBase, AutoShardedClient): @property def _bot(self) -> AutoShardedBot: return self + + # pre commit test trigger diff --git a/discord/channel.py b/discord/channel.py index ff913de885..099aa8da55 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3644,4 +3644,6 @@ def _threaded_guild_channel_factory(channel_type: int): ): return Thread, value return cls, value + + # pre commit test trigger diff --git a/discord/client.py b/discord/client.py index c3a95f780f..867e6757c5 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2382,4 +2382,6 @@ async def fetch_default_sounds(self) -> list[SoundboardSound]: SoundboardSound(http=self.http, state=self._connection, data=s) for s in data ] + + # pre commit test trigger diff --git a/discord/cog.py b/discord/cog.py index b73a2027af..7f14b494ec 100644 --- a/discord/cog.py +++ b/discord/cog.py @@ -1164,4 +1164,6 @@ def reload_extension(self, name: str, *, package: str | None = None) -> None: def extensions(self) -> Mapping[str, types.ModuleType]: """A read-only mapping of extension name to extension.""" return types.MappingProxyType(self.__extensions) + + # pre commit test trigger diff --git a/discord/collectibles.py b/discord/collectibles.py index 5e1a318c9e..fb430b863c 100644 --- a/discord/collectibles.py +++ b/discord/collectibles.py @@ -134,4 +134,6 @@ def animated_asset(self) -> Asset: .. versionadded:: 2.7 """ return Asset._from_collectible(self._state, self._asset, animated=True) + + # pre commit test trigger diff --git a/discord/commands/__init__.py b/discord/commands/__init__.py index 5f769867c3..d98e97c073 100644 --- a/discord/commands/__init__.py +++ b/discord/commands/__init__.py @@ -27,4 +27,5 @@ from .core import * from .options import * from .permissions import * + # pre commit test trigger diff --git a/discord/commands/context.py b/discord/commands/context.py index 1e07b6d45a..43b2eb6e06 100644 --- a/discord/commands/context.py +++ b/discord/commands/context.py @@ -474,4 +474,6 @@ def command(self) -> ApplicationCommand | None: @command.setter def command(self, value: ApplicationCommand | None) -> None: self.interaction.command = value + + # pre commit test trigger diff --git a/discord/commands/core.py b/discord/commands/core.py index a3ab2e78c7..75d074c297 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -2301,4 +2301,6 @@ def validate_chat_input_description(description: Any, locale: str | None = None) if locale: error.args = (f"{error.args[0]} in locale {locale}",) raise error + + # pre commit test trigger diff --git a/discord/commands/options.py b/discord/commands/options.py index ba281f5e2a..85c67d62ec 100644 --- a/discord/commands/options.py +++ b/discord/commands/options.py @@ -554,4 +554,6 @@ def decorator(func): return func return decorator + + # pre commit test trigger diff --git a/discord/commands/permissions.py b/discord/commands/permissions.py index 7e87fd341a..a767b2abe6 100644 --- a/discord/commands/permissions.py +++ b/discord/commands/permissions.py @@ -137,4 +137,6 @@ def inner(command: Callable): return command return inner + + # pre commit test trigger diff --git a/discord/components.py b/discord/components.py index 24d3aab47c..e3b45ab2ee 100644 --- a/discord/components.py +++ b/discord/components.py @@ -1822,4 +1822,6 @@ def _component_factory(data: ComponentPayload, state=None) -> Component: else: as_enum = try_enum(ComponentType, component_type) return Component._raw_construct(type=as_enum) + + # pre commit test trigger diff --git a/discord/context_managers.py b/discord/context_managers.py index 1bbe942cf4..a0c8f5e01c 100644 --- a/discord/context_managers.py +++ b/discord/context_managers.py @@ -88,4 +88,6 @@ async def __aexit__( traceback: TracebackType | None, ) -> None: self.task.cancel() + + # pre commit test trigger diff --git a/discord/embeds.py b/discord/embeds.py index 516e00838d..5a7314396b 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -1078,4 +1078,6 @@ def to_dict(self) -> EmbedData: result["title"] = self.title return result # type: ignore + + # pre commit test trigger diff --git a/discord/emoji.py b/discord/emoji.py index dd1947e95f..0387c110e5 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -434,4 +434,6 @@ async def edit( self.application_id, self.id, payload=payload ) return self._state.maybe_store_app_emoji(self.application_id, data) + + # pre commit test trigger diff --git a/discord/enums.py b/discord/enums.py index 3a8ab6915b..b3738502c9 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -1231,4 +1231,6 @@ def try_enum(cls: type[T], val: Any) -> T: return cls._enum_value_map_[val] # type: ignore except (KeyError, TypeError, AttributeError): return create_unknown_value(cls, val) + + # pre commit test trigger diff --git a/discord/errors.py b/discord/errors.py index aa730649ae..e13695a623 100644 --- a/discord/errors.py +++ b/discord/errors.py @@ -432,4 +432,6 @@ def __init__(self, missing: tuple[str, ...]) -> None: f"{deps} {'is' if len(missing) == 1 else 'are'} required for voice support. " 'Install them with "pip install py-cord[voice]".' ) + + # pre commit test trigger diff --git a/discord/ext/bridge/__init__.py b/discord/ext/bridge/__init__.py index 48114dcfad..921e913040 100644 --- a/discord/ext/bridge/__init__.py +++ b/discord/ext/bridge/__init__.py @@ -26,4 +26,5 @@ from .bot import * from .context import * from .core import * + # pre commit test trigger diff --git a/discord/ext/bridge/bot.py b/discord/ext/bridge/bot.py index 3a21ef8260..1724bb3af3 100644 --- a/discord/ext/bridge/bot.py +++ b/discord/ext/bridge/bot.py @@ -202,4 +202,6 @@ class AutoShardedBot(BotBase, ExtAutoShardedBot): .. versionadded:: 2.0 """ + + # pre commit test trigger diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py index c2ec02c6e7..ab9abde737 100644 --- a/discord/ext/bridge/core.py +++ b/discord/ext/bridge/core.py @@ -687,4 +687,6 @@ def decorator(func): return func return decorator + + # pre commit test trigger diff --git a/discord/ext/commands/__init__.py b/discord/ext/commands/__init__.py index bf00aaffdd..1a89e7117f 100644 --- a/discord/ext/commands/__init__.py +++ b/discord/ext/commands/__init__.py @@ -17,4 +17,5 @@ from .errors import * from .flags import * from .help import * + # pre commit test trigger diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index d73de8e5b4..374f585ae3 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -456,4 +456,6 @@ class AutoShardedBot(BotBase, discord.AutoShardedBot): """This is similar to :class:`.Bot` except that it is inherited from :class:`discord.AutoShardedBot` instead. """ + + # pre commit test trigger diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 3a84895769..5c132544aa 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -84,4 +84,6 @@ def get_commands(self) -> list[ApplicationCommand | Command]: This does not include subcommands. """ return [c for c in self.__cog_commands__ if c.parent is None] + + # pre commit test trigger diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 238f2d61d7..3de05be9c7 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -409,4 +409,6 @@ async def forward_to( self, channel: discord.abc.Messageable, **kwargs: Any ) -> Message: return await self.message.forward_to(channel, **kwargs) + + # pre commit test trigger diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index c85c31295b..d52e83d476 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -1266,4 +1266,6 @@ async def run_converters( converter = origin return await _actual_conversion(ctx, converter, argument, param) + + # pre commit test trigger diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index 3caa521ffa..e6e9285dfe 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -408,4 +408,6 @@ async def release(self, message: Message) -> None: if sem.value >= self.number and not sem.is_active(): del self._mapping[key] + + # pre commit test trigger diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 6eda261d60..9b9a48ced9 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -2500,4 +2500,6 @@ def decorator(func: Command | CoroFunc) -> Command | CoroFunc: return func return decorator # type: ignore + + # pre commit test trigger diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py index 11be057103..c3ae4237c7 100644 --- a/discord/ext/commands/errors.py +++ b/discord/ext/commands/errors.py @@ -1021,4 +1021,6 @@ class MissingFlagArgument(FlagError): def __init__(self, flag: Flag) -> None: self.flag: Flag = flag super().__init__(f"Flag {flag.name!r} does not have an argument") + + # pre commit test trigger diff --git a/discord/ext/commands/flags.py b/discord/ext/commands/flags.py index 66b19a4a8f..f7c0638923 100644 --- a/discord/ext/commands/flags.py +++ b/discord/ext/commands/flags.py @@ -700,4 +700,6 @@ async def convert(cls: type[F], ctx: Context, argument: str) -> F: setattr(self, flag.attribute, values) return self + + # pre commit test trigger diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index f8150bcf12..45c8147e6a 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -1410,4 +1410,6 @@ async def send_command_help(self, command): self.add_command_formatting(command) self.paginator.close_page() await self.send_pages() + + # pre commit test trigger diff --git a/discord/ext/commands/view.py b/discord/ext/commands/view.py index eb3074daf8..4f7c2675db 100644 --- a/discord/ext/commands/view.py +++ b/discord/ext/commands/view.py @@ -198,4 +198,6 @@ def __repr__(self): f"" ) + + # pre commit test trigger diff --git a/discord/ext/pages/__init__.py b/discord/ext/pages/__init__.py index 46212632be..8c9816c4ff 100644 --- a/discord/ext/pages/__init__.py +++ b/discord/ext/pages/__init__.py @@ -8,4 +8,5 @@ """ from .pagination import * + # pre commit test trigger diff --git a/discord/ext/pages/pagination.py b/discord/ext/pages/pagination.py index 25c894695f..5856d4e741 100644 --- a/discord/ext/pages/pagination.py +++ b/discord/ext/pages/pagination.py @@ -1337,4 +1337,6 @@ async def callback(self, interaction: discord.Interaction): trigger_on_display=page_group.trigger_on_display, interaction=interaction, ) + + # pre commit test trigger diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 5c592f0765..0c46b3818d 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -856,4 +856,6 @@ def decorator(func: LF) -> Loop[LF]: ) return decorator + + # pre commit test trigger diff --git a/discord/file.py b/discord/file.py index 913755db01..67984e0cb7 100644 --- a/discord/file.py +++ b/discord/file.py @@ -204,4 +204,6 @@ def __init__( super().__init__(fp, filename, **kwargs) self.waveform = waveform self.duration_secs = duration_secs + + # pre commit test trigger diff --git a/discord/flags.py b/discord/flags.py index c92f2213a3..afdb2d56f1 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -1839,4 +1839,6 @@ class RoleFlags(BaseFlags): def in_prompt(self): """:class:`bool`: Returns ``True`` if the role is selectable in one of the guild's :class:`~discord.OnboardingPrompt`.""" return 1 << 0 + + # pre commit test trigger diff --git a/discord/gateway.py b/discord/gateway.py index 066d905970..f25e9a8823 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -779,4 +779,6 @@ async def close(self, code: int = 4000) -> None: self._close_code = code await self.socket.close(code=code) + + # pre commit test trigger diff --git a/discord/guild.py b/discord/guild.py index 379189501e..01fbda39d9 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -4719,4 +4719,6 @@ def get_sound(self, sound_id: int) -> SoundboardSound | None: The sound or ``None`` if not found. """ return self._sounds.get(sound_id) + + # pre commit test trigger diff --git a/discord/http.py b/discord/http.py index 56a3d6acbd..60327209c7 100644 --- a/discord/http.py +++ b/discord/http.py @@ -3385,4 +3385,6 @@ def send_soundboard_sound( ), json=payload, ) + + # pre commit test trigger diff --git a/discord/incidents.py b/discord/incidents.py index 5a38c31dbb..3d49b37b83 100644 --- a/discord/incidents.py +++ b/discord/incidents.py @@ -85,4 +85,6 @@ def to_dict(self) -> IncidentsDataPayload: "raid_detected_at": self.raid_detected_at and self.raid_detected_at.isoformat(), } + + # pre commit test trigger diff --git a/discord/integrations.py b/discord/integrations.py index 954b7d4ba3..67505b7865 100644 --- a/discord/integrations.py +++ b/discord/integrations.py @@ -372,4 +372,6 @@ def _integration_factory(value: str) -> tuple[type[Integration], str]: return StreamIntegration, value else: return Integration, value + + # pre commit test trigger diff --git a/discord/interactions.py b/discord/interactions.py index 86364dec7f..c0e531d5ef 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -1941,4 +1941,6 @@ def is_ephemeral(self) -> bool: This might be useful for determining if the message was forced to be ephemeral. """ return self._response_message_ephemeral + + # pre commit test trigger diff --git a/discord/invite.py b/discord/invite.py index 01b935ce1e..ce2cf118bf 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -816,4 +816,6 @@ def set_scheduled_event(self, event: ScheduledEvent) -> None: The scheduled event object to link. """ self.scheduled_event = event + + # pre commit test trigger diff --git a/discord/iterators.py b/discord/iterators.py index 1cd49944d7..cad57d9bb2 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -1297,4 +1297,6 @@ async def retrieve_inner(self) -> list[Message]: ) def __await__(self) -> Generator[Any, Any, list[Message]]: return self.retrieve_inner().__await__() + + # pre commit test trigger diff --git a/discord/member.py b/discord/member.py index 69dfcd5bed..c5c3d121bb 100644 --- a/discord/member.py +++ b/discord/member.py @@ -1310,4 +1310,6 @@ def get_role(self, role_id: int, /) -> Role | None: The role or ``None`` if not found in the member's roles. """ return self.guild.get_role(role_id) if self._roles.has(role_id) else None + + # pre commit test trigger diff --git a/discord/mentions.py b/discord/mentions.py index b0eb464dbc..148ae70018 100644 --- a/discord/mentions.py +++ b/discord/mentions.py @@ -156,4 +156,6 @@ def __repr__(self) -> str: f"{self.__class__.__name__}(everyone={self.everyone}, " f"users={self.users}, roles={self.roles}, replied_user={self.replied_user})" ) + + # pre commit test trigger diff --git a/discord/message.py b/discord/message.py index 36c49892b6..61f3add889 100644 --- a/discord/message.py +++ b/discord/message.py @@ -2619,4 +2619,6 @@ async def end_poll(self) -> Message: message = self._state.create_message(channel=self.channel, data=data) return message + + # pre commit test trigger diff --git a/discord/mixins.py b/discord/mixins.py index 2dbb0054b6..a57dc28992 100644 --- a/discord/mixins.py +++ b/discord/mixins.py @@ -46,4 +46,6 @@ class Hashable(EqualityComparable): def __hash__(self) -> int: return self.id >> 22 + + # pre commit test trigger diff --git a/discord/monetization.py b/discord/monetization.py index ffc32945d5..533f8eda2d 100644 --- a/discord/monetization.py +++ b/discord/monetization.py @@ -348,4 +348,6 @@ def __eq__(self, other: object) -> bool: def user(self): """Optional[:class:`User`]: The user that owns this subscription.""" return self._state.get_user(self.user_id) + + # pre commit test trigger diff --git a/discord/object.py b/discord/object.py index 4d50b2f906..1db1a6da89 100644 --- a/discord/object.py +++ b/discord/object.py @@ -109,4 +109,6 @@ def process_id(self) -> int: def increment_id(self) -> int: """Returns the increment id that made the snowflake.""" return self.id & 0xFFF + + # pre commit test trigger diff --git a/discord/oggparse.py b/discord/oggparse.py index cec24630cd..dcfe58d092 100644 --- a/discord/oggparse.py +++ b/discord/oggparse.py @@ -121,4 +121,6 @@ def iter_packets(self) -> Generator[bytes]: if complete: yield partial partial = b"" + + # pre commit test trigger diff --git a/discord/onboarding.py b/discord/onboarding.py index a78bce97c4..79f83a4b3c 100644 --- a/discord/onboarding.py +++ b/discord/onboarding.py @@ -481,4 +481,6 @@ async def delete_prompt( prompts = self.prompts[:] prompts.remove(to_delete) return await self.edit(prompts=prompts, reason=reason) + + # pre commit test trigger diff --git a/discord/opus.py b/discord/opus.py index 99e8f42612..fd47b99aac 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -732,4 +732,6 @@ def _decode_packet(self, packet: Packet) -> tuple[Packet, bytes]: pcm = dave.decrypt(user_id, davey.MediaType.audio, pcm) return packet, pcm + + # pre commit test trigger diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py index 5d8959b3c4..c5f2e027e0 100644 --- a/discord/partial_emoji.py +++ b/discord/partial_emoji.py @@ -263,4 +263,6 @@ async def read(self) -> bytes: raise InvalidArgument("PartialEmoji is not a custom emoji") return await super().read() + + # pre commit test trigger diff --git a/discord/permissions.py b/discord/permissions.py index 98f55494cc..94ab7da5df 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -899,4 +899,6 @@ def update(self, **kwargs: bool | None) -> None: def __iter__(self) -> Iterator[tuple[str, bool | None]]: for key in self.PURE_FLAGS: yield key, self._values.get(key) + + # pre commit test trigger diff --git a/discord/player.py b/discord/player.py index 59843b9208..bb1c63edc5 100644 --- a/discord/player.py +++ b/discord/player.py @@ -943,4 +943,6 @@ def send_silence(self, count: int = 5) -> None: def played_frames(self) -> int: return self._played_frames_offset + self.loops + + # pre commit test trigger diff --git a/discord/poll.py b/discord/poll.py index 2701b1d3b8..14b0a7a4ae 100644 --- a/discord/poll.py +++ b/discord/poll.py @@ -527,4 +527,6 @@ async def end(self) -> Message: raise RuntimeError("You can only end a poll received from a message.") return await self._message.end_poll() + + # pre commit test trigger diff --git a/discord/primary_guild.py b/discord/primary_guild.py index df9aa7eb81..93c39095a8 100644 --- a/discord/primary_guild.py +++ b/discord/primary_guild.py @@ -96,4 +96,6 @@ def badge(self) -> Asset | None: return Asset._from_user_primary_guild_tag( self._state, self.identity_guild_id, self._badge ) + + # pre commit test trigger diff --git a/discord/raw_models.py b/discord/raw_models.py index 3732e0a21b..16331d4987 100644 --- a/discord/raw_models.py +++ b/discord/raw_models.py @@ -1030,4 +1030,6 @@ def __init__(self, data: MemberUpdateEvent, member: Member) -> None: self.data: MemberUpdateEvent = data self.cached_member: Member | None = None self.member: Member = member + + # pre commit test trigger diff --git a/discord/reaction.py b/discord/reaction.py index 04c11808f6..c632b49c9b 100644 --- a/discord/reaction.py +++ b/discord/reaction.py @@ -294,4 +294,6 @@ class ReactionCountDetails: def __init__(self, data: ReactionCountDetailsPayload): self.normal = data.get("normal", 0) self.burst = data.get("burst", 0) + + # pre commit test trigger diff --git a/discord/role.py b/discord/role.py index 54fe21a473..33fbd80a10 100644 --- a/discord/role.py +++ b/discord/role.py @@ -933,4 +933,6 @@ async def delete(self, *, reason: str | None = None) -> None: """ await self._state.http.delete_role(self.guild.id, self.id, reason=reason) + + # pre commit test trigger diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py index ab168bfac1..3c74a52db7 100644 --- a/discord/scheduled_events.py +++ b/discord/scheduled_events.py @@ -576,4 +576,6 @@ def subscribers( return ScheduledEventSubscribersIterator( event=self, limit=limit, with_member=as_member, before=before, after=after ) + + # pre commit test trigger diff --git a/discord/shard.py b/discord/shard.py index 7fa44de03f..2c94ba263d 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -585,4 +585,6 @@ def is_ws_ratelimited(self) -> bool: .. versionadded:: 1.6 """ return any(shard.ws.is_ratelimited() for shard in self.__shards.values()) + + # pre commit test trigger diff --git a/discord/sinks/__init__.py b/discord/sinks/__init__.py index 9c507b4c5d..8ae00b8a68 100644 --- a/discord/sinks/__init__.py +++ b/discord/sinks/__init__.py @@ -18,4 +18,5 @@ from .ogg import * from .pcm import * from .wave import * + # pre commit test trigger diff --git a/discord/sinks/core.py b/discord/sinks/core.py index 21c77763fa..1a5112aeca 100644 --- a/discord/sinks/core.py +++ b/discord/sinks/core.py @@ -248,4 +248,6 @@ def get_all_audio(self): def get_user_audio(self, user: snowflake.Snowflake): """Gets the audio file(s) of one specific user.""" return os.path.realpath(self.audio_data.pop(user)) + + # pre commit test trigger diff --git a/discord/sinks/errors.py b/discord/sinks/errors.py index 020103db97..a826ecbab1 100644 --- a/discord/sinks/errors.py +++ b/discord/sinks/errors.py @@ -87,4 +87,6 @@ class MKASinkError(SinkException): .. versionadded:: 2.0 """ + + # pre commit test trigger diff --git a/discord/sinks/m4a.py b/discord/sinks/m4a.py index 740279298e..e22dc60e8d 100644 --- a/discord/sinks/m4a.py +++ b/discord/sinks/m4a.py @@ -101,4 +101,6 @@ def format_audio(self, audio): os.remove(m4a_file) audio.on_format(self.encoding) + + # pre commit test trigger diff --git a/discord/sinks/mka.py b/discord/sinks/mka.py index e8fb566132..ad6195c664 100644 --- a/discord/sinks/mka.py +++ b/discord/sinks/mka.py @@ -94,4 +94,6 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) + + # pre commit test trigger diff --git a/discord/sinks/mkv.py b/discord/sinks/mkv.py index 58d8f10ad1..ce7a7881aa 100644 --- a/discord/sinks/mkv.py +++ b/discord/sinks/mkv.py @@ -93,4 +93,6 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) + + # pre commit test trigger diff --git a/discord/sinks/mp3.py b/discord/sinks/mp3.py index 33e87843c9..8110221014 100644 --- a/discord/sinks/mp3.py +++ b/discord/sinks/mp3.py @@ -94,4 +94,6 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) + + # pre commit test trigger diff --git a/discord/sinks/mp4.py b/discord/sinks/mp4.py index ead46ad912..9ec54542fe 100644 --- a/discord/sinks/mp4.py +++ b/discord/sinks/mp4.py @@ -101,4 +101,6 @@ def format_audio(self, audio): os.remove(mp4_file) audio.on_format(self.encoding) + + # pre commit test trigger diff --git a/discord/sinks/ogg.py b/discord/sinks/ogg.py index 51b84c3d6d..5ab319fec8 100644 --- a/discord/sinks/ogg.py +++ b/discord/sinks/ogg.py @@ -94,4 +94,6 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) + + # pre commit test trigger diff --git a/discord/sinks/pcm.py b/discord/sinks/pcm.py index 5d1f4417ad..02f9724142 100644 --- a/discord/sinks/pcm.py +++ b/discord/sinks/pcm.py @@ -43,4 +43,6 @@ def __init__(self, *, filters=None): def format_audio(self, audio): return + + # pre commit test trigger diff --git a/discord/sinks/wave.py b/discord/sinks/wave.py index 8cd7b7f316..229555f871 100644 --- a/discord/sinks/wave.py +++ b/discord/sinks/wave.py @@ -67,4 +67,6 @@ def format_audio(self, audio): data.seek(0) audio.on_format(self.encoding) + + # pre commit test trigger diff --git a/discord/soundboard.py b/discord/soundboard.py index f6272d4dfe..5b1037c13e 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -268,4 +268,6 @@ def delete(self, *, reason: str | None = None) -> Coroutine[Any, Any, None]: @override def __repr__(self) -> str: return f"" + + # pre commit test trigger diff --git a/discord/stage_instance.py b/discord/stage_instance.py index 1ad997caec..1e6d22809d 100644 --- a/discord/stage_instance.py +++ b/discord/stage_instance.py @@ -197,4 +197,6 @@ async def delete(self, *, reason: str | None = None) -> None: Deleting the stage instance failed. """ await self._state.http.delete_stage_instance(self.channel_id, reason=reason) + + # pre commit test trigger diff --git a/discord/state.py b/discord/state.py index 0157b18130..b7db3fd25a 100644 --- a/discord/state.py +++ b/discord/state.py @@ -2287,4 +2287,6 @@ def parse_ready(self, data) -> None: def parse_resumed(self, data) -> None: self.dispatch("resumed") self.dispatch("shard_resumed", data["__shard_id__"]) + + # pre commit test trigger diff --git a/discord/sticker.py b/discord/sticker.py index 6caf4a8b6d..705771f261 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -552,4 +552,6 @@ def _sticker_factory( return GuildSticker, value else: return Sticker, value + + # pre commit test trigger diff --git a/discord/team.py b/discord/team.py index e0e425a77d..8b1325779d 100644 --- a/discord/team.py +++ b/discord/team.py @@ -178,4 +178,6 @@ def __repr__(self) -> str: ) def permissions(self) -> list[str]: return [] + + # pre commit test trigger diff --git a/discord/template.py b/discord/template.py index ae251eab69..cb97c1d9ba 100644 --- a/discord/template.py +++ b/discord/template.py @@ -278,4 +278,6 @@ def url(self) -> str: .. versionadded:: 2.0 """ return f"https://discord.new/{self.code}" + + # pre commit test trigger diff --git a/discord/threads.py b/discord/threads.py index 4964fe75aa..b2677c3d0a 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -938,4 +938,6 @@ def _from_data(self, data: ThreadMemberPayload): def thread(self) -> Thread: """The thread this member belongs to.""" return self.parent + + # pre commit test trigger diff --git a/discord/types/__init__.py b/discord/types/__init__.py index 20a9158749..80cc2fb788 100644 --- a/discord/types/__init__.py +++ b/discord/types/__init__.py @@ -7,4 +7,5 @@ :copyright: (c) 2015-2021 Rapptz & (c) 2021-present Pycord Development :license: MIT, see LICENSE for more details. """ + # pre commit test trigger diff --git a/discord/types/activity.py b/discord/types/activity.py index f3c21292e7..8ce773241d 100644 --- a/discord/types/activity.py +++ b/discord/types/activity.py @@ -109,4 +109,6 @@ class Activity(_BaseActivity, total=False): session_id: str | None instance: bool buttons: list[str] + + # pre commit test trigger diff --git a/discord/types/appinfo.py b/discord/types/appinfo.py index 696db2da1f..eef7e7c8d2 100644 --- a/discord/types/appinfo.py +++ b/discord/types/appinfo.py @@ -93,4 +93,6 @@ class AppInfo(BaseAppInfo, total=False): class PartialAppInfo(BaseAppInfo, total=False): pass + + # pre commit test trigger diff --git a/discord/types/application_role_connection.py b/discord/types/application_role_connection.py index 7f9a41b114..fc3cbc086e 100644 --- a/discord/types/application_role_connection.py +++ b/discord/types/application_role_connection.py @@ -38,4 +38,6 @@ class ApplicationRoleConnectionMetadata(TypedDict): name_localizations: NotRequired[dict[str, str]] description: str description_localizations: NotRequired[dict[str, str]] + + # pre commit test trigger diff --git a/discord/types/audit_log.py b/discord/types/audit_log.py index 1102fa0b49..54bfd7c3be 100644 --- a/discord/types/audit_log.py +++ b/discord/types/audit_log.py @@ -294,4 +294,6 @@ class AuditLog(TypedDict): threads: list[Thread] scheduled_events: list[ScheduledEvent] auto_moderation_rules: list[AutoModRule] + + # pre commit test trigger diff --git a/discord/types/automod.py b/discord/types/automod.py index f9221d504e..0de2a31521 100644 --- a/discord/types/automod.py +++ b/discord/types/automod.py @@ -89,4 +89,6 @@ class EditAutoModRule(TypedDict, total=False): enabled: bool exempt_roles: list[Snowflake] exempt_channels: list[Snowflake] + + # pre commit test trigger diff --git a/discord/types/channel.py b/discord/types/channel.py index 09d28e68ac..9c772dc0f1 100644 --- a/discord/types/channel.py +++ b/discord/types/channel.py @@ -194,4 +194,6 @@ class VoiceChannelEffectSendEvent(TypedDict): animation_id: NotRequired[int] sound_id: NotRequired[Snowflake | int] sound_volume: NotRequired[float] + + # pre commit test trigger diff --git a/discord/types/collectibles.py b/discord/types/collectibles.py index fdd76d3762..b0576905d6 100644 --- a/discord/types/collectibles.py +++ b/discord/types/collectibles.py @@ -43,4 +43,6 @@ class Nameplate(TypedDict): class AvatarDecoration(TypedDict): sku_id: Snowflake asset: str + + # pre commit test trigger diff --git a/discord/types/embed.py b/discord/types/embed.py index f6f786d891..19f8dcbbcb 100644 --- a/discord/types/embed.py +++ b/discord/types/embed.py @@ -101,4 +101,6 @@ class Embed(TypedDict, total=False): provider: EmbedProvider author: EmbedAuthor fields: list[EmbedField] + + # pre commit test trigger diff --git a/discord/types/emoji.py b/discord/types/emoji.py index f02ddf7197..ca1ffd1526 100644 --- a/discord/types/emoji.py +++ b/discord/types/emoji.py @@ -48,4 +48,6 @@ class Emoji(PartialEmoji, total=False): class EditEmoji(TypedDict): name: str roles: SnowflakeList | None + + # pre commit test trigger diff --git a/discord/types/gateway.py b/discord/types/gateway.py index 48d04cd14e..9e8cf6c82c 100644 --- a/discord/types/gateway.py +++ b/discord/types/gateway.py @@ -40,4 +40,6 @@ class Gateway(TypedDict): class GatewayBot(Gateway): shards: int session_start_limit: SessionStartLimit + + # pre commit test trigger diff --git a/discord/types/guild.py b/discord/types/guild.py index 070e413586..4629aada73 100644 --- a/discord/types/guild.py +++ b/discord/types/guild.py @@ -210,4 +210,6 @@ class IncidentsData(TypedDict, total=False): class ModifyIncidents(TypedDict, total=False): invites_disabled_until: str | None dms_disabled_until: str | None + + # pre commit test trigger diff --git a/discord/types/interactions.py b/discord/types/interactions.py index 5f4c0bfaf0..c40830a5ae 100644 --- a/discord/types/interactions.py +++ b/discord/types/interactions.py @@ -294,4 +294,6 @@ class InteractionCallbackResource(TypedDict): # This is not fully typed as activities are out of scope activity_instance: NotRequired[dict] message: NotRequired[Message] + + # pre commit test trigger diff --git a/discord/types/invite.py b/discord/types/invite.py index 07612e8033..eb304a5253 100644 --- a/discord/types/invite.py +++ b/discord/types/invite.py @@ -104,4 +104,6 @@ class InviteTargetUsersJobStatus(TypedDict): created_at: NotRequired[str] completed_at: NotRequired[str | None] error_message: NotRequired[str] + + # pre commit test trigger diff --git a/discord/types/member.py b/discord/types/member.py index 06fb0f743c..134b3d8851 100644 --- a/discord/types/member.py +++ b/discord/types/member.py @@ -90,4 +90,6 @@ class MemberUpdateEvent(TypedDict): flags: NotRequired[int | None] avatar_decoration_data: NotRequired[AvatarDecoration | None] # collectibles: Collectibles + + # pre commit test trigger diff --git a/discord/types/message.py b/discord/types/message.py index e5c01c7fc8..9efd95f396 100644 --- a/discord/types/message.py +++ b/discord/types/message.py @@ -194,4 +194,6 @@ class AllowedMentions(TypedDict): roles: SnowflakeList users: SnowflakeList replied_user: bool + + # pre commit test trigger diff --git a/discord/types/monetization.py b/discord/types/monetization.py index 48605e58a2..152364e325 100644 --- a/discord/types/monetization.py +++ b/discord/types/monetization.py @@ -76,4 +76,6 @@ class Subscription(TypedDict): status: SubscriptionStatus canceled_at: str | None country: NotRequired[str] + + # pre commit test trigger diff --git a/discord/types/onboarding.py b/discord/types/onboarding.py index 488feb6883..1dfed235ac 100644 --- a/discord/types/onboarding.py +++ b/discord/types/onboarding.py @@ -63,4 +63,6 @@ class PromptOption(TypedDict): emoji_animated: NotRequired[bool] title: str description: str | None + + # pre commit test trigger diff --git a/discord/types/poll.py b/discord/types/poll.py index 67264484ed..6513258278 100644 --- a/discord/types/poll.py +++ b/discord/types/poll.py @@ -62,4 +62,6 @@ class Poll(TypedDict): allow_multiselect: bool layout_type: NotRequired[PollLayoutType] results: NotRequired[PollResults] + + # pre commit test trigger diff --git a/discord/types/primary_guild.py b/discord/types/primary_guild.py index 90c3c38a3b..bb301bd2ab 100644 --- a/discord/types/primary_guild.py +++ b/discord/types/primary_guild.py @@ -34,4 +34,6 @@ class PrimaryGuild(TypedDict): identity_enabled: bool | None tag: str badge: str + + # pre commit test trigger diff --git a/discord/types/raw_models.py b/discord/types/raw_models.py index 4069f7778e..337c4aadb0 100644 --- a/discord/types/raw_models.py +++ b/discord/types/raw_models.py @@ -165,4 +165,6 @@ class MessagePollVoteEvent(TypedDict): channel_id: Snowflake message_id: Snowflake answer_id: int + + # pre commit test trigger diff --git a/discord/types/role.py b/discord/types/role.py index 8fec513bd0..00a9a5c08c 100644 --- a/discord/types/role.py +++ b/discord/types/role.py @@ -60,4 +60,6 @@ class RoleTags(TypedDict, total=False): premium_subscriber: NotRequired[Literal[None]] available_for_purchase: NotRequired[Literal[None]] guild_connections: NotRequired[Literal[None]] + + # pre commit test trigger diff --git a/discord/types/scheduled_events.py b/discord/types/scheduled_events.py index 02b36bc378..c3ac98b371 100644 --- a/discord/types/scheduled_events.py +++ b/discord/types/scheduled_events.py @@ -63,4 +63,6 @@ class ScheduledEventSubscriber(TypedDict): user_id: Snowflake user: User member: Member | None + + # pre commit test trigger diff --git a/discord/types/soundboard.py b/discord/types/soundboard.py index 75b19bdce6..e6e839dfdc 100644 --- a/discord/types/soundboard.py +++ b/discord/types/soundboard.py @@ -40,4 +40,6 @@ class SoundboardSound(TypedDict): guild_id: NotRequired[Snowflake] user: NotRequired[User] available: bool + + # pre commit test trigger diff --git a/discord/types/sticker.py b/discord/types/sticker.py index e82bf2055c..e1d48d4c37 100644 --- a/discord/types/sticker.py +++ b/discord/types/sticker.py @@ -89,4 +89,6 @@ class EditGuildSticker(TypedDict, total=False): class ListPremiumStickerPacks(TypedDict): sticker_packs: list[StickerPack] + + # pre commit test trigger diff --git a/discord/types/team.py b/discord/types/team.py index cd0b7db4fe..af2296ac00 100644 --- a/discord/types/team.py +++ b/discord/types/team.py @@ -44,4 +44,6 @@ class Team(TypedDict): owner_id: Snowflake members: list[TeamMember] icon: str | None + + # pre commit test trigger diff --git a/discord/types/template.py b/discord/types/template.py index c039699932..46a1a1a5fd 100644 --- a/discord/types/template.py +++ b/discord/types/template.py @@ -49,4 +49,6 @@ class Template(TypedDict): source_guild_id: Snowflake serialized_source_guild: Guild is_dirty: bool | None + + # pre commit test trigger diff --git a/discord/types/threads.py b/discord/types/threads.py index cb34b4085b..881662788d 100644 --- a/discord/types/threads.py +++ b/discord/types/threads.py @@ -74,4 +74,6 @@ class ThreadPaginationPayload(TypedDict): threads: list[Thread] members: list[ThreadMember] has_more: bool + + # pre commit test trigger diff --git a/discord/types/user.py b/discord/types/user.py index 1b8e448b6a..4fdf806be5 100644 --- a/discord/types/user.py +++ b/discord/types/user.py @@ -55,4 +55,6 @@ class User(PartialUser, total=False): public_flags: int primary_guild: PrimaryGuild collectibles: Collectibles + + # pre commit test trigger diff --git a/discord/types/voice.py b/discord/types/voice.py index dfe5521f59..734771278f 100644 --- a/discord/types/voice.py +++ b/discord/types/voice.py @@ -87,4 +87,6 @@ class VoiceReady(TypedDict): port: int modes: list[SupportedModes] heartbeat_interval: int + + # pre commit test trigger diff --git a/discord/types/webhook.py b/discord/types/webhook.py index dcab5bbbd8..ebd83ce508 100644 --- a/discord/types/webhook.py +++ b/discord/types/webhook.py @@ -63,4 +63,6 @@ class Webhook(PartialWebhook): avatar: NotRequired[str | None] channel_id: NotRequired[Snowflake] application_id: NotRequired[Snowflake | None] + + # pre commit test trigger diff --git a/discord/types/welcome_screen.py b/discord/types/welcome_screen.py index f4aaff2af6..8920affe96 100644 --- a/discord/types/welcome_screen.py +++ b/discord/types/welcome_screen.py @@ -40,4 +40,6 @@ class WelcomeScreenChannel(TypedDict): description: str emoji_id: Snowflake | None emoji_name: str | None + + # pre commit test trigger diff --git a/discord/types/widget.py b/discord/types/widget.py index 7137e4de6a..d346264af5 100644 --- a/discord/types/widget.py +++ b/discord/types/widget.py @@ -62,4 +62,6 @@ class Widget(TypedDict): class WidgetSettings(TypedDict): enabled: bool channel_id: Snowflake | None + + # pre commit test trigger diff --git a/discord/ui/__init__.py b/discord/ui/__init__.py index 9727e5bb6a..a9b4679cc6 100644 --- a/discord/ui/__init__.py +++ b/discord/ui/__init__.py @@ -28,4 +28,5 @@ from .text_display import * from .thumbnail import * from .view import * + # pre commit test trigger diff --git a/discord/ui/action_row.py b/discord/ui/action_row.py index 0365d8d618..b64ccbaf78 100644 --- a/discord/ui/action_row.py +++ b/discord/ui/action_row.py @@ -434,4 +434,6 @@ def from_component(cls: type[A], component: ActionRowComponent) -> A: ) callback = None + + # pre commit test trigger diff --git a/discord/ui/button.py b/discord/ui/button.py index 7e0a1d2c80..3e8d3c9a36 100644 --- a/discord/ui/button.py +++ b/discord/ui/button.py @@ -418,4 +418,6 @@ def decorator(func: ItemCallbackType) -> ItemCallbackType: return func return decorator # type: ignore # lie to the type checkers, because after a View is instated, the button callback is converted into a Button instance + + # pre commit test trigger diff --git a/discord/ui/checkbox.py b/discord/ui/checkbox.py index 9d20db1df2..d11634bd5f 100644 --- a/discord/ui/checkbox.py +++ b/discord/ui/checkbox.py @@ -135,4 +135,6 @@ def refresh_from_modal( self, interaction: Interaction, data: CheckboxComponentPayload ) -> None: return self.refresh_state(data) + + # pre commit test trigger diff --git a/discord/ui/checkbox_group.py b/discord/ui/checkbox_group.py index 2444205c87..2caf1da23e 100644 --- a/discord/ui/checkbox_group.py +++ b/discord/ui/checkbox_group.py @@ -284,4 +284,6 @@ def refresh_from_modal( self, interaction: Interaction, data: CheckboxGroupComponentPayload ) -> None: return self.refresh_state(data) + + # pre commit test trigger diff --git a/discord/ui/container.py b/discord/ui/container.py index d0435f1ebf..1449ece6a8 100644 --- a/discord/ui/container.py +++ b/discord/ui/container.py @@ -441,4 +441,6 @@ def from_component(cls: type[C], component: ContainerComponent) -> C: ) callback = None + + # pre commit test trigger diff --git a/discord/ui/core.py b/discord/ui/core.py index 5ca764a912..d8aced4cb0 100644 --- a/discord/ui/core.py +++ b/discord/ui/core.py @@ -156,4 +156,6 @@ async def on_timeout(self) -> None: A callback that is called when this structure's timeout elapses without being explicitly stopped. """ + + # pre commit test trigger diff --git a/discord/ui/file.py b/discord/ui/file.py index c465d0fa60..e214b6f87e 100644 --- a/discord/ui/file.py +++ b/discord/ui/file.py @@ -148,4 +148,6 @@ def from_component(cls: type[F], component: FileComponent) -> F: ) callback = None + + # pre commit test trigger diff --git a/discord/ui/file_upload.py b/discord/ui/file_upload.py index 17a4e3931a..a8155b0784 100644 --- a/discord/ui/file_upload.py +++ b/discord/ui/file_upload.py @@ -197,4 +197,6 @@ def from_component( required=component.required, id=component.id, ) + + # pre commit test trigger diff --git a/discord/ui/item.py b/discord/ui/item.py index f924fd9487..4c7b9633e0 100644 --- a/discord/ui/item.py +++ b/discord/ui/item.py @@ -268,4 +268,6 @@ def modal(self) -> M | None: @modal.setter def modal(self, value) -> None: self._modal = value + + # pre commit test trigger diff --git a/discord/ui/label.py b/discord/ui/label.py index e87de9cb3d..46d5dc1d20 100644 --- a/discord/ui/label.py +++ b/discord/ui/label.py @@ -564,4 +564,6 @@ def from_component(cls: type[L], component: LabelComponent) -> L: id=component.id, description=component.description, ) + + # pre commit test trigger diff --git a/discord/ui/media_gallery.py b/discord/ui/media_gallery.py index 06a99517ab..de77ca7558 100644 --- a/discord/ui/media_gallery.py +++ b/discord/ui/media_gallery.py @@ -177,4 +177,6 @@ def from_component(cls: type[M], component: MediaGalleryComponent) -> M: return cls(*component.items, id=component.id) callback = None + + # pre commit test trigger diff --git a/discord/ui/modal.py b/discord/ui/modal.py index 0fd918429a..fdb79b945b 100644 --- a/discord/ui/modal.py +++ b/discord/ui/modal.py @@ -526,4 +526,6 @@ async def dispatch(self, user_id: int, custom_id: str, interaction: Interaction) self.remove_modal(modal, user_id) except Exception as e: return await modal.on_error(e, interaction) + + # pre commit test trigger diff --git a/discord/ui/radio_group.py b/discord/ui/radio_group.py index 6343b64544..ae4db23b9f 100644 --- a/discord/ui/radio_group.py +++ b/discord/ui/radio_group.py @@ -234,4 +234,6 @@ def refresh_from_modal( self, interaction: Interaction, data: RadioGroupComponentPayload ) -> None: return self.refresh_state(data) + + # pre commit test trigger diff --git a/discord/ui/section.py b/discord/ui/section.py index 7653f5b526..e51795e0f8 100644 --- a/discord/ui/section.py +++ b/discord/ui/section.py @@ -357,4 +357,6 @@ def from_component(cls: type[S], component: SectionComponent) -> S: return cls(*items, accessory=accessory, id=component.id) callback = None + + # pre commit test trigger diff --git a/discord/ui/select.py b/discord/ui/select.py index 083865634b..62f9cba650 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -1179,4 +1179,6 @@ def channel_select( id=id, default_values=default_values, ) + + # pre commit test trigger diff --git a/discord/ui/separator.py b/discord/ui/separator.py index 3516c444ab..8fa598ccd4 100644 --- a/discord/ui/separator.py +++ b/discord/ui/separator.py @@ -120,4 +120,6 @@ def from_component(cls: type[S], component: SeparatorComponent) -> S: ) callback = None + + # pre commit test trigger diff --git a/discord/ui/text_display.py b/discord/ui/text_display.py index a2748abb54..f3cbfaa891 100644 --- a/discord/ui/text_display.py +++ b/discord/ui/text_display.py @@ -108,4 +108,6 @@ def from_component(cls: type[T], component: TextDisplayComponent) -> T: return cls(component.content, id=component.id) callback = None + + # pre commit test trigger diff --git a/discord/ui/thumbnail.py b/discord/ui/thumbnail.py index 3faf2ee8fa..de1ad2add1 100644 --- a/discord/ui/thumbnail.py +++ b/discord/ui/thumbnail.py @@ -151,4 +151,6 @@ def from_component(cls: type[T], component: ThumbnailComponent) -> T: ) callback = None + + # pre commit test trigger diff --git a/discord/ui/view.py b/discord/ui/view.py index 9c1fae393e..e86e0a479d 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -1047,4 +1047,6 @@ def update_from_message(self, message_id: int, components: list[ComponentPayload _log.exception( f"Failed to refresh View {view} from Message {message_id} due to mismatched state. Items may not have complete data." ) + + # pre commit test trigger diff --git a/discord/user.py b/discord/user.py index 64a64ce5da..697732e8d3 100644 --- a/discord/user.py +++ b/discord/user.py @@ -738,4 +738,6 @@ def entitlements( user_id=self.id, exclude_ended=exclude_ended, ) + + # pre commit test trigger diff --git a/discord/utils.py b/discord/utils.py index a3ab9c4a92..76b84fe51d 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -1688,4 +1688,6 @@ def _get_event_loop() -> asyncio.AbstractEventLoop: asyncio.set_event_loop(loop) return loop return asyncio.get_event_loop() + + # pre commit test trigger diff --git a/discord/voice/__init__.py b/discord/voice/__init__.py index 5b366dc66b..d3a92cd320 100644 --- a/discord/voice/__init__.py +++ b/discord/voice/__init__.py @@ -17,4 +17,5 @@ from ._types import * from .client import * from .packets import * + # pre commit test trigger diff --git a/discord/voice/_types.py b/discord/voice/_types.py index cd8f086f6f..73aa157de9 100644 --- a/discord/voice/_types.py +++ b/discord/voice/_types.py @@ -164,4 +164,6 @@ def cleanup(self) -> None: """ key, _ = self.channel._get_voice_client_key() self.client._connection._remove_voice_client(key) + + # pre commit test trigger diff --git a/discord/voice/client.py b/discord/voice/client.py index 6bd885acd0..8013580f11 100644 --- a/discord/voice/client.py +++ b/discord/voice/client.py @@ -808,4 +808,6 @@ def is_speaking(self, member: Member | User) -> bool | None: return None if self._reader: return self._reader.speaking_timer.get_speaking(ssrc) + + # pre commit test trigger diff --git a/discord/voice/enums.py b/discord/voice/enums.py index d497457927..113ef355a8 100644 --- a/discord/voice/enums.py +++ b/discord/voice/enums.py @@ -77,4 +77,6 @@ class ConnectionFlowState(Enum): got_websocket_ready = 6 got_ip_discovery = 7 connected = 8 + + # pre commit test trigger diff --git a/discord/voice/gateway.py b/discord/voice/gateway.py index bfed36b76c..4e2f714e88 100644 --- a/discord/voice/gateway.py +++ b/discord/voice/gateway.py @@ -519,4 +519,6 @@ async def send_dave_transition_ready(self, transition_id: int) -> None: }, } await self.send_as_json(payload) + + # pre commit test trigger diff --git a/discord/voice/packets/__init__.py b/discord/voice/packets/__init__.py index fd8651dbc7..2ef0c78351 100644 --- a/discord/voice/packets/__init__.py +++ b/discord/voice/packets/__init__.py @@ -61,4 +61,6 @@ def __init__( @property def opus(self) -> bytes | None: return self.packet.decrypted_data + + # pre commit test trigger diff --git a/discord/voice/packets/core.py b/discord/voice/packets/core.py index 94263d3bdb..742fc5b077 100644 --- a/discord/voice/packets/core.py +++ b/discord/voice/packets/core.py @@ -91,4 +91,6 @@ def is_silence(self) -> bool: def __hash__(self) -> int: return hash(self.data) + + # pre commit test trigger diff --git a/discord/voice/receive/reader.py b/discord/voice/receive/reader.py index c68116b55c..49b3e62e9c 100644 --- a/discord/voice/receive/reader.py +++ b/discord/voice/receive/reader.py @@ -575,4 +575,6 @@ def run(self) -> None: def stop(self) -> None: self._end_thread.set() + + # pre commit test trigger diff --git a/discord/voice/receive/router.py b/discord/voice/receive/router.py index eb82c2fac2..4ad9c56b21 100644 --- a/discord/voice/receive/router.py +++ b/discord/voice/receive/router.py @@ -229,4 +229,6 @@ def _do_run(self) -> None: with self._lock: with self.reader.packet_router._lock: self._dispatch_to_listeners(event, *args, **kwargs) + + # pre commit test trigger diff --git a/discord/voice/state.py b/discord/voice/state.py index 50cc991f5e..ffcf47fb07 100644 --- a/discord/voice/state.py +++ b/discord/voice/state.py @@ -981,4 +981,6 @@ async def execute_dave_transition(self, transition: int) -> None: ) self.dave_pending_transition = None + + # pre commit test trigger diff --git a/discord/voice/utils/buffer.py b/discord/voice/utils/buffer.py index dd864bf1a0..bb888592d6 100644 --- a/discord/voice/utils/buffer.py +++ b/discord/voice/utils/buffer.py @@ -213,4 +213,6 @@ def reset(self) -> None: self._has_item.clear() self._prefill = self.prefill self._last_tx_seq = -1 + + # pre commit test trigger diff --git a/discord/voice/utils/multidataevent.py b/discord/voice/utils/multidataevent.py index cd46fe97b6..7fa026dc0c 100644 --- a/discord/voice/utils/multidataevent.py +++ b/discord/voice/utils/multidataevent.py @@ -77,4 +77,6 @@ def unregister(self, item: T) -> None: def clear(self) -> None: self._items.clear() self._ready.clear() + + # pre commit test trigger diff --git a/discord/voice/utils/wrapped.py b/discord/voice/utils/wrapped.py index 74b63cb85f..563b951e4b 100644 --- a/discord/voice/utils/wrapped.py +++ b/discord/voice/utils/wrapped.py @@ -30,4 +30,6 @@ def gap_wrapped(a: int, b: int, *, wrap: int = 65536) -> int: def add_wrapped(a: int, b: int, *, wrap: int = 65536) -> int: return (a + b) % wrap + + # pre commit test trigger diff --git a/discord/webhook/__init__.py b/discord/webhook/__init__.py index 027f3dcfdc..71c46f77dd 100644 --- a/discord/webhook/__init__.py +++ b/discord/webhook/__init__.py @@ -10,4 +10,5 @@ from .async_ import * from .sync import * + # pre commit test trigger diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index e38d11b066..fd5545ac18 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -2210,4 +2210,6 @@ async def delete_message( proxy_auth=self.proxy_auth, thread_id=thread_id, ) + + # pre commit test trigger diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py index 8bdaff5590..ccf5dd6855 100644 --- a/discord/webhook/sync.py +++ b/discord/webhook/sync.py @@ -1316,4 +1316,6 @@ def delete_message(self, message_id: int, *, thread_id: int | None = None) -> No session=self.session, thread_id=thread_id, ) + + # pre commit test trigger diff --git a/discord/welcome_screen.py b/discord/welcome_screen.py index 2bb146e03f..a1a702b8f3 100644 --- a/discord/welcome_screen.py +++ b/discord/welcome_screen.py @@ -232,4 +232,6 @@ async def edit(self, **options): self._update(new) return self + + # pre commit test trigger diff --git a/discord/widget.py b/discord/widget.py index 6bcc2d1c97..db35ec7dcf 100644 --- a/discord/widget.py +++ b/discord/widget.py @@ -346,4 +346,6 @@ async def fetch_invite(self, *, with_counts: bool = True) -> Invite: invite_id = resolve_invite(self._invite) data = await self._state.http.get_invite(invite_id, with_counts=with_counts) return Invite.from_incomplete(state=self._state, data=data) + + # pre commit test trigger diff --git a/docs/extensions/attributetable.py b/docs/extensions/attributetable.py index 39cca11f04..ef62877b2f 100644 --- a/docs/extensions/attributetable.py +++ b/docs/extensions/attributetable.py @@ -295,4 +295,6 @@ def setup(app): ) app.add_node(attributetableplaceholder) app.connect("doctree-resolved", process_attributetable) + + # pre commit test trigger diff --git a/docs/extensions/exception_hierarchy.py b/docs/extensions/exception_hierarchy.py index 47609918e7..029b9a5669 100644 --- a/docs/extensions/exception_hierarchy.py +++ b/docs/extensions/exception_hierarchy.py @@ -32,4 +32,6 @@ def setup(app): html=(visit_exception_hierarchy_node, depart_exception_hierarchy_node), ) app.add_directive("exception_hierarchy", ExceptionHierarchyDirective) + + # pre commit test trigger diff --git a/docs/extensions/nitpick_file_ignorer.py b/docs/extensions/nitpick_file_ignorer.py index ecb70d861a..6511627a00 100644 --- a/docs/extensions/nitpick_file_ignorer.py +++ b/docs/extensions/nitpick_file_ignorer.py @@ -22,4 +22,6 @@ def setup(app: Sphinx): app.add_config_value("nitpick_ignore_files", [], "") f = NitpickFileIgnorer(app) sphinx_logging.getLogger("sphinx.transforms.post_transforms").logger.addFilter(f) + + # pre commit test trigger diff --git a/docs/extensions/resourcelinks.py b/docs/extensions/resourcelinks.py index 8a30b77010..a343967914 100644 --- a/docs/extensions/resourcelinks.py +++ b/docs/extensions/resourcelinks.py @@ -42,4 +42,6 @@ def setup(app: Sphinx) -> dict[str, Any]: app.add_config_value("resource_links", {}, "env") app.connect("builder-inited", add_link_role) return {"version": sphinx.__display_version__, "parallel_read_safe": True} + + # pre commit test trigger diff --git a/scripts/add-precommit-trigger.cmd b/scripts/add-precommit-trigger.cmd index 6981275d35..dd6f02632c 100644 --- a/scripts/add-precommit-trigger.cmd +++ b/scripts/add-precommit-trigger.cmd @@ -19,4 +19,4 @@ powershell -NoProfile -ExecutionPolicy Bypass -Command ^ echo. echo Finished adding pre-commit trigger comments. -endlocal \ No newline at end of file +endlocal diff --git a/scripts/remove-precommit-trigger.cmd b/scripts/remove-precommit-trigger.cmd index 3f7a2e453b..2e5c62a5fe 100644 --- a/scripts/remove-precommit-trigger.cmd +++ b/scripts/remove-precommit-trigger.cmd @@ -18,4 +18,4 @@ powershell -NoProfile -ExecutionPolicy Bypass -Command ^ echo. echo Finished removing pre-commit trigger comments. -endlocal \ No newline at end of file +endlocal diff --git a/tests/voice/test_dependency_behavior.py b/tests/voice/test_dependency_behavior.py index 9dbab115ef..3cbde3d26e 100644 --- a/tests/voice/test_dependency_behavior.py +++ b/tests/voice/test_dependency_behavior.py @@ -64,4 +64,6 @@ def test_voice_modules_imports_without_voice_dependencies(): with pytest.raises(discord.MissingVoiceDependenciesError): __import__("discord.voice.receive.reader") + + # pre commit test trigger diff --git a/tests/voice/test_imports.py b/tests/voice/test_imports.py index 3f9d85e3f3..86ca18a787 100644 --- a/tests/voice/test_imports.py +++ b/tests/voice/test_imports.py @@ -53,4 +53,6 @@ def test_voice_modules_import_with_voice_extra(): __import__("discord.voice") __import__("discord.voice.gateway") __import__("discord.voice.receive.reader") + + # pre commit test trigger diff --git a/tests/voice/test_player.py b/tests/voice/test_player.py index 943ba2ed56..eb568db71a 100644 --- a/tests/voice/test_player.py +++ b/tests/voice/test_player.py @@ -50,4 +50,6 @@ def test_audio_player_resume_preserves_played_frames(): assert player._played_frames_offset == 75 assert player.loops == 0 assert player.played_frames() == 75 + + # pre commit test trigger diff --git a/tests/voice/test_wait_finish.py b/tests/voice/test_wait_finish.py index 051f6df523..3490ba684d 100644 --- a/tests/voice/test_wait_finish.py +++ b/tests/voice/test_wait_finish.py @@ -111,4 +111,6 @@ def __init__(self, *args, **kwargs) -> None: assert future.result() is err finally: loop.close() + + # pre commit test trigger From 01bcafbaaf8323898d6c8b127eee4c7d82a34fd9 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sun, 26 Jul 2026 13:39:00 +0200 Subject: [PATCH 20/21] chore: remove trigger --- discord/__init__.py | 1 - discord/__main__.py | 1 - discord/_version.py | 1 - discord/abc.py | 1 - discord/activity.py | 1 - discord/appinfo.py | 1 - discord/application_role_connection.py | 1 - discord/asset.py | 1 - discord/audit_logs.py | 1 - discord/automod.py | 1 - discord/backoff.py | 1 - discord/bot.py | 1 - discord/channel.py | 1 - discord/client.py | 1 - discord/cog.py | 1 - discord/collectibles.py | 1 - discord/colour.py | 1 - discord/commands/__init__.py | 1 - discord/commands/context.py | 1 - discord/commands/core.py | 1 - discord/commands/options.py | 1 - discord/commands/permissions.py | 1 - discord/components.py | 1 - discord/context_managers.py | 1 - discord/embeds.py | 1 - discord/emoji.py | 1 - discord/enums.py | 1 - discord/errors.py | 1 - discord/ext/bridge/__init__.py | 1 - discord/ext/bridge/bot.py | 1 - discord/ext/bridge/context.py | 1 - discord/ext/bridge/core.py | 1 - discord/ext/commands/__init__.py | 1 - discord/ext/commands/_types.py | 1 - discord/ext/commands/bot.py | 1 - discord/ext/commands/cog.py | 1 - discord/ext/commands/context.py | 1 - discord/ext/commands/converter.py | 1 - discord/ext/commands/cooldowns.py | 1 - discord/ext/commands/core.py | 1 - discord/ext/commands/errors.py | 1 - discord/ext/commands/flags.py | 1 - discord/ext/commands/help.py | 1 - discord/ext/commands/view.py | 1 - discord/ext/pages/__init__.py | 1 - discord/ext/pages/pagination.py | 1 - discord/ext/tasks/__init__.py | 1 - discord/file.py | 1 - discord/flags.py | 1 - discord/gateway.py | 1 - discord/guild.py | 1 - discord/http.py | 1 - discord/incidents.py | 1 - discord/integrations.py | 1 - discord/interactions.py | 1 - discord/invite.py | 1 - discord/iterators.py | 1 - discord/member.py | 1 - discord/mentions.py | 1 - discord/message.py | 1 - discord/mixins.py | 1 - discord/monetization.py | 1 - discord/object.py | 1 - discord/oggparse.py | 1 - discord/onboarding.py | 1 - discord/opus.py | 1 - discord/partial_emoji.py | 1 - discord/permissions.py | 1 - discord/player.py | 1 - discord/poll.py | 1 - discord/primary_guild.py | 1 - discord/raw_models.py | 1 - discord/reaction.py | 1 - discord/role.py | 1 - discord/scheduled_events.py | 1 - discord/shard.py | 1 - discord/sinks/__init__.py | 1 - discord/sinks/core.py | 1 - discord/sinks/errors.py | 1 - discord/sinks/m4a.py | 1 - discord/sinks/mka.py | 1 - discord/sinks/mkv.py | 1 - discord/sinks/mp3.py | 1 - discord/sinks/mp4.py | 1 - discord/sinks/ogg.py | 1 - discord/sinks/pcm.py | 1 - discord/sinks/wave.py | 1 - discord/soundboard.py | 1 - discord/stage_instance.py | 1 - discord/state.py | 1 - discord/sticker.py | 1 - discord/team.py | 1 - discord/template.py | 1 - discord/threads.py | 1 - discord/types/__init__.py | 1 - discord/types/activity.py | 1 - discord/types/appinfo.py | 1 - discord/types/application_role_connection.py | 1 - discord/types/audit_log.py | 1 - discord/types/automod.py | 1 - discord/types/channel.py | 1 - discord/types/collectibles.py | 1 - discord/types/components.py | 1 - discord/types/embed.py | 1 - discord/types/emoji.py | 1 - discord/types/gateway.py | 1 - discord/types/guild.py | 1 - discord/types/integration.py | 1 - discord/types/interactions.py | 1 - discord/types/invite.py | 1 - discord/types/member.py | 1 - discord/types/message.py | 1 - discord/types/monetization.py | 1 - discord/types/onboarding.py | 1 - discord/types/poll.py | 1 - discord/types/primary_guild.py | 1 - discord/types/raw_models.py | 1 - discord/types/role.py | 1 - discord/types/scheduled_events.py | 1 - discord/types/snowflake.py | 1 - discord/types/soundboard.py | 1 - discord/types/sticker.py | 1 - discord/types/team.py | 1 - discord/types/template.py | 1 - discord/types/threads.py | 1 - discord/types/user.py | 1 - discord/types/voice.py | 1 - discord/types/webhook.py | 1 - discord/types/welcome_screen.py | 1 - discord/types/widget.py | 1 - discord/ui/__init__.py | 1 - discord/ui/action_row.py | 1 - discord/ui/button.py | 1 - discord/ui/checkbox.py | 1 - discord/ui/checkbox_group.py | 1 - discord/ui/container.py | 1 - discord/ui/core.py | 1 - discord/ui/file.py | 1 - discord/ui/file_upload.py | 1 - discord/ui/input_text.py | 1 - discord/ui/item.py | 1 - discord/ui/label.py | 1 - discord/ui/media_gallery.py | 1 - discord/ui/modal.py | 1 - discord/ui/radio_group.py | 1 - discord/ui/section.py | 1 - discord/ui/select.py | 1 - discord/ui/separator.py | 1 - discord/ui/text_display.py | 1 - discord/ui/thumbnail.py | 1 - discord/ui/view.py | 1 - discord/user.py | 1 - discord/utils.py | 1 - discord/voice/__init__.py | 1 - discord/voice/_types.py | 1 - discord/voice/client.py | 1 - discord/voice/enums.py | 1 - discord/voice/gateway.py | 1 - discord/voice/packets/__init__.py | 1 - discord/voice/packets/core.py | 1 - discord/voice/packets/rtp.py | 1 - discord/voice/receive/__init__.py | 1 - discord/voice/receive/reader.py | 1 - discord/voice/receive/router.py | 1 - discord/voice/state.py | 1 - discord/voice/utils/__init__.py | 1 - discord/voice/utils/buffer.py | 1 - discord/voice/utils/dependencies.py | 1 - discord/voice/utils/multidataevent.py | 1 - discord/voice/utils/wrapped.py | 1 - discord/webhook/__init__.py | 1 - discord/webhook/async_.py | 1 - discord/webhook/sync.py | 1 - discord/welcome_screen.py | 1 - discord/widget.py | 1 - docs/conf.py | 1 - docs/extensions/attributetable.py | 1 - docs/extensions/exception_hierarchy.py | 1 - docs/extensions/nitpick_file_ignorer.py | 1 - docs/extensions/resourcelinks.py | 1 - examples/app_commands/context_menus.py | 1 - examples/app_commands/info.py | 1 - examples/app_commands/slash_autocomplete.py | 1 - examples/app_commands/slash_basic.py | 1 - examples/app_commands/slash_cog.py | 1 - examples/app_commands/slash_cog_groups.py | 1 - examples/app_commands/slash_groups.py | 1 - examples/app_commands/slash_options.py | 1 - examples/app_commands/slash_perms.py | 1 - examples/app_commands/slash_users.py | 1 - examples/audio_recording.py | 1 - examples/audio_recording_merged.py | 1 - examples/background_task.py | 1 - examples/background_task_asyncio.py | 1 - examples/basic_async_bot.py | 1 - examples/basic_bot.py | 1 - examples/basic_voice.py | 1 - examples/bridge_commands.py | 1 - examples/community_invites.py | 1 - examples/converters.py | 1 - examples/cooldown.py | 1 - examples/create_private_emoji.py | 1 - examples/custom_context.py | 1 - examples/deleted.py | 1 - examples/edits.py | 1 - examples/modal_dialogs.py | 1 - examples/new_member.py | 1 - examples/reaction_roles.py | 1 - examples/reply.py | 1 - examples/secret.py | 1 - examples/soundboard.py | 1 - examples/timeout.py | 1 - examples/views/button_roles.py | 1 - examples/views/channel_select.py | 1 - examples/views/confirm.py | 1 - examples/views/counter.py | 1 - examples/views/dropdown.py | 1 - examples/views/ephemeral.py | 1 - examples/views/link.py | 1 - examples/views/new_components.py | 1 - examples/views/paginator.py | 1 - examples/views/persistent.py | 1 - examples/views/role_select.py | 1 - examples/views/tic_tac_toe.py | 1 - examples/wait_for_event.py | 1 - scripts/count_sourcelines.py | 1 - scripts/discord_release_notification.py | 1 - scripts/docs_json_exporter.py | 1 - scripts/release_changelog.py | 1 - scripts/release_rtd_versions.py | 1 - setup.py | 1 - tests/__init__.py | 1 - tests/voice/__init__.py | 1 - tests/voice/test_dependency_behavior.py | 1 - tests/voice/test_imports.py | 1 - tests/voice/test_player.py | 1 - tests/voice/test_wait_finish.py | 1 - 237 files changed, 237 deletions(-) diff --git a/discord/__init__.py b/discord/__init__.py index 8c7ba184d6..120069b750 100644 --- a/discord/__init__.py +++ b/discord/__init__.py @@ -121,4 +121,3 @@ def __getattr__(name: str) -> object: logging.getLogger(__name__).addHandler(logging.NullHandler()) -# pre commit test trigger diff --git a/discord/__main__.py b/discord/__main__.py index 81e2820eb4..b9b995500a 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -373,4 +373,3 @@ def main() -> None: if __name__ == "__main__": main() -# pre commit test trigger diff --git a/discord/_version.py b/discord/_version.py index ac9ad748a3..ddc7a10fd7 100644 --- a/discord/_version.py +++ b/discord/_version.py @@ -163,4 +163,3 @@ def date(self) -> datetime.date | None: commit=raw_info["commit"], date=date_info, ) -# pre commit test trigger diff --git a/discord/abc.py b/discord/abc.py index 9bc7218a2a..804bf116d2 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -2099,4 +2099,3 @@ class Mentionable: pass -# pre commit test trigger diff --git a/discord/activity.py b/discord/activity.py index 0ec0071773..30e1a1f91e 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -881,4 +881,3 @@ def create_activity(data: ActivityPayload | None) -> ActivityTypes | None: return Activity(**data) -# pre commit test trigger diff --git a/discord/appinfo.py b/discord/appinfo.py index a8f5cc69bf..64d33fbf56 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -650,4 +650,3 @@ def _to_payload(self) -> dict[int, dict[str, dict[str, Any]] | None]: return payload -# pre commit test trigger diff --git a/discord/application_role_connection.py b/discord/application_role_connection.py index 7184a46089..b547a1acda 100644 --- a/discord/application_role_connection.py +++ b/discord/application_role_connection.py @@ -128,4 +128,3 @@ def to_dict(self) -> ApplicationRoleConnectionMetadataPayload: return data -# pre commit test trigger diff --git a/discord/asset.py b/discord/asset.py index 4b1b26dd92..a8a872f6f1 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -526,4 +526,3 @@ def with_static_format(self, format: ValidStaticFormatTypes, /) -> Asset: return self.with_format(format) -# pre commit test trigger diff --git a/discord/audit_logs.py b/discord/audit_logs.py index 7e104f4582..51bc19e400 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -720,4 +720,3 @@ def _convert_target_scheduled_event( return self.guild.get_scheduled_event(target_id) or Object(id=target_id) -# pre commit test trigger diff --git a/discord/automod.py b/discord/automod.py index 28c3d9faa4..e9186d16d2 100644 --- a/discord/automod.py +++ b/discord/automod.py @@ -560,4 +560,3 @@ async def edit( return AutoModRule(state=self._state, data=data) -# pre commit test trigger diff --git a/discord/backoff.py b/discord/backoff.py index 8173ed66b4..ea16a3df56 100644 --- a/discord/backoff.py +++ b/discord/backoff.py @@ -102,4 +102,3 @@ def delay(self) -> int | float: return self._randfunc(0, self._base * 2**self._exp) -# pre commit test trigger diff --git a/discord/bot.py b/discord/bot.py index 088514ec9f..c694a6a976 100644 --- a/discord/bot.py +++ b/discord/bot.py @@ -1683,4 +1683,3 @@ def _bot(self) -> AutoShardedBot: return self -# pre commit test trigger diff --git a/discord/channel.py b/discord/channel.py index 099aa8da55..49da32ff12 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3646,4 +3646,3 @@ def _threaded_guild_channel_factory(channel_type: int): return cls, value -# pre commit test trigger diff --git a/discord/client.py b/discord/client.py index 867e6757c5..f1860b0b13 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2384,4 +2384,3 @@ async def fetch_default_sounds(self) -> list[SoundboardSound]: ] -# pre commit test trigger diff --git a/discord/cog.py b/discord/cog.py index 7f14b494ec..0e4dfb9335 100644 --- a/discord/cog.py +++ b/discord/cog.py @@ -1166,4 +1166,3 @@ def extensions(self) -> Mapping[str, types.ModuleType]: return types.MappingProxyType(self.__extensions) -# pre commit test trigger diff --git a/discord/collectibles.py b/discord/collectibles.py index fb430b863c..3b0f33a8cf 100644 --- a/discord/collectibles.py +++ b/discord/collectibles.py @@ -136,4 +136,3 @@ def animated_asset(self) -> Asset: return Asset._from_collectible(self._state, self._asset, animated=True) -# pre commit test trigger diff --git a/discord/colour.py b/discord/colour.py index db493eac8a..420ab9096f 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -409,4 +409,3 @@ def embed_background(cls, theme: str = "dark") -> Self: Color = Colour -# pre commit test trigger diff --git a/discord/commands/__init__.py b/discord/commands/__init__.py index d98e97c073..a5591f75d1 100644 --- a/discord/commands/__init__.py +++ b/discord/commands/__init__.py @@ -28,4 +28,3 @@ from .options import * from .permissions import * -# pre commit test trigger diff --git a/discord/commands/context.py b/discord/commands/context.py index 43b2eb6e06..41f0ea75db 100644 --- a/discord/commands/context.py +++ b/discord/commands/context.py @@ -476,4 +476,3 @@ def command(self, value: ApplicationCommand | None) -> None: self.interaction.command = value -# pre commit test trigger diff --git a/discord/commands/core.py b/discord/commands/core.py index 75d074c297..550ad42ffb 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -2303,4 +2303,3 @@ def validate_chat_input_description(description: Any, locale: str | None = None) raise error -# pre commit test trigger diff --git a/discord/commands/options.py b/discord/commands/options.py index 85c67d62ec..5d6bb57956 100644 --- a/discord/commands/options.py +++ b/discord/commands/options.py @@ -556,4 +556,3 @@ def decorator(func): return decorator -# pre commit test trigger diff --git a/discord/commands/permissions.py b/discord/commands/permissions.py index a767b2abe6..3782967ad3 100644 --- a/discord/commands/permissions.py +++ b/discord/commands/permissions.py @@ -139,4 +139,3 @@ def inner(command: Callable): return inner -# pre commit test trigger diff --git a/discord/components.py b/discord/components.py index e3b45ab2ee..f3177b5f3e 100644 --- a/discord/components.py +++ b/discord/components.py @@ -1824,4 +1824,3 @@ def _component_factory(data: ComponentPayload, state=None) -> Component: return Component._raw_construct(type=as_enum) -# pre commit test trigger diff --git a/discord/context_managers.py b/discord/context_managers.py index a0c8f5e01c..5261e8aa4b 100644 --- a/discord/context_managers.py +++ b/discord/context_managers.py @@ -90,4 +90,3 @@ async def __aexit__( self.task.cancel() -# pre commit test trigger diff --git a/discord/embeds.py b/discord/embeds.py index 5a7314396b..5e630b8758 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -1080,4 +1080,3 @@ def to_dict(self) -> EmbedData: return result # type: ignore -# pre commit test trigger diff --git a/discord/emoji.py b/discord/emoji.py index 0387c110e5..1e2e4bb983 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -436,4 +436,3 @@ async def edit( return self._state.maybe_store_app_emoji(self.application_id, data) -# pre commit test trigger diff --git a/discord/enums.py b/discord/enums.py index b3738502c9..18bba363fa 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -1233,4 +1233,3 @@ def try_enum(cls: type[T], val: Any) -> T: return create_unknown_value(cls, val) -# pre commit test trigger diff --git a/discord/errors.py b/discord/errors.py index e13695a623..01181a6260 100644 --- a/discord/errors.py +++ b/discord/errors.py @@ -434,4 +434,3 @@ def __init__(self, missing: tuple[str, ...]) -> None: ) -# pre commit test trigger diff --git a/discord/ext/bridge/__init__.py b/discord/ext/bridge/__init__.py index 921e913040..5552db84fb 100644 --- a/discord/ext/bridge/__init__.py +++ b/discord/ext/bridge/__init__.py @@ -27,4 +27,3 @@ from .context import * from .core import * -# pre commit test trigger diff --git a/discord/ext/bridge/bot.py b/discord/ext/bridge/bot.py index 1724bb3af3..d92b50f737 100644 --- a/discord/ext/bridge/bot.py +++ b/discord/ext/bridge/bot.py @@ -204,4 +204,3 @@ class AutoShardedBot(BotBase, ExtAutoShardedBot): """ -# pre commit test trigger diff --git a/discord/ext/bridge/context.py b/discord/ext/bridge/context.py index 4141651a13..8e7f9414f6 100644 --- a/discord/ext/bridge/context.py +++ b/discord/ext/bridge/context.py @@ -201,4 +201,3 @@ async def delete( A Union class for either :class:`BridgeExtContext` or :class:`BridgeApplicationContext`. Can be used as a type hint for Context for bridge commands. """ -# pre commit test trigger diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py index ab9abde737..edbcbfe57c 100644 --- a/discord/ext/bridge/core.py +++ b/discord/ext/bridge/core.py @@ -689,4 +689,3 @@ def decorator(func): return decorator -# pre commit test trigger diff --git a/discord/ext/commands/__init__.py b/discord/ext/commands/__init__.py index 1a89e7117f..4781f131b3 100644 --- a/discord/ext/commands/__init__.py +++ b/discord/ext/commands/__init__.py @@ -18,4 +18,3 @@ from .flags import * from .help import * -# pre commit test trigger diff --git a/discord/ext/commands/_types.py b/discord/ext/commands/_types.py index 3711e5d4d9..643dfd7ab0 100644 --- a/discord/ext/commands/_types.py +++ b/discord/ext/commands/_types.py @@ -48,4 +48,3 @@ Callable[["Cog", "Context[Any]", "CommandError"], Coro[Any]], Callable[["Context[Any]", "CommandError"], Coro[Any]], ] -# pre commit test trigger diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 374f585ae3..8501814335 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -458,4 +458,3 @@ class AutoShardedBot(BotBase, discord.AutoShardedBot): """ -# pre commit test trigger diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 5c132544aa..919e62815a 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -86,4 +86,3 @@ def get_commands(self) -> list[ApplicationCommand | Command]: return [c for c in self.__cog_commands__ if c.parent is None] -# pre commit test trigger diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 3de05be9c7..35964aa2a1 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -411,4 +411,3 @@ async def forward_to( return await self.message.forward_to(channel, **kwargs) -# pre commit test trigger diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index d52e83d476..2a00fc4373 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -1268,4 +1268,3 @@ async def run_converters( return await _actual_conversion(ctx, converter, argument, param) -# pre commit test trigger diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index e6e9285dfe..e8b30275b6 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -410,4 +410,3 @@ async def release(self, message: Message) -> None: del self._mapping[key] -# pre commit test trigger diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 9b9a48ced9..62173774a8 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -2502,4 +2502,3 @@ def decorator(func: Command | CoroFunc) -> Command | CoroFunc: return decorator # type: ignore -# pre commit test trigger diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py index c3ae4237c7..ac2c2ece4e 100644 --- a/discord/ext/commands/errors.py +++ b/discord/ext/commands/errors.py @@ -1023,4 +1023,3 @@ def __init__(self, flag: Flag) -> None: super().__init__(f"Flag {flag.name!r} does not have an argument") -# pre commit test trigger diff --git a/discord/ext/commands/flags.py b/discord/ext/commands/flags.py index f7c0638923..b458d31edd 100644 --- a/discord/ext/commands/flags.py +++ b/discord/ext/commands/flags.py @@ -702,4 +702,3 @@ async def convert(cls: type[F], ctx: Context, argument: str) -> F: return self -# pre commit test trigger diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 45c8147e6a..d15d85916f 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -1412,4 +1412,3 @@ async def send_command_help(self, command): await self.send_pages() -# pre commit test trigger diff --git a/discord/ext/commands/view.py b/discord/ext/commands/view.py index 4f7c2675db..7ee44b138e 100644 --- a/discord/ext/commands/view.py +++ b/discord/ext/commands/view.py @@ -200,4 +200,3 @@ def __repr__(self): ) -# pre commit test trigger diff --git a/discord/ext/pages/__init__.py b/discord/ext/pages/__init__.py index 8c9816c4ff..c7562a8a3e 100644 --- a/discord/ext/pages/__init__.py +++ b/discord/ext/pages/__init__.py @@ -9,4 +9,3 @@ from .pagination import * -# pre commit test trigger diff --git a/discord/ext/pages/pagination.py b/discord/ext/pages/pagination.py index 5856d4e741..d8fbd51977 100644 --- a/discord/ext/pages/pagination.py +++ b/discord/ext/pages/pagination.py @@ -1339,4 +1339,3 @@ async def callback(self, interaction: discord.Interaction): ) -# pre commit test trigger diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 0c46b3818d..0a6ecdfcc9 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -858,4 +858,3 @@ def decorator(func: LF) -> Loop[LF]: return decorator -# pre commit test trigger diff --git a/discord/file.py b/discord/file.py index 67984e0cb7..bc7a7ac39a 100644 --- a/discord/file.py +++ b/discord/file.py @@ -206,4 +206,3 @@ def __init__( self.duration_secs = duration_secs -# pre commit test trigger diff --git a/discord/flags.py b/discord/flags.py index afdb2d56f1..503a4a41e7 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -1841,4 +1841,3 @@ def in_prompt(self): return 1 << 0 -# pre commit test trigger diff --git a/discord/gateway.py b/discord/gateway.py index f25e9a8823..83bae75304 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -781,4 +781,3 @@ async def close(self, code: int = 4000) -> None: await self.socket.close(code=code) -# pre commit test trigger diff --git a/discord/guild.py b/discord/guild.py index 01fbda39d9..77062ccdff 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -4721,4 +4721,3 @@ def get_sound(self, sound_id: int) -> SoundboardSound | None: return self._sounds.get(sound_id) -# pre commit test trigger diff --git a/discord/http.py b/discord/http.py index 60327209c7..69f26d13db 100644 --- a/discord/http.py +++ b/discord/http.py @@ -3387,4 +3387,3 @@ def send_soundboard_sound( ) -# pre commit test trigger diff --git a/discord/incidents.py b/discord/incidents.py index 3d49b37b83..9809a5b561 100644 --- a/discord/incidents.py +++ b/discord/incidents.py @@ -87,4 +87,3 @@ def to_dict(self) -> IncidentsDataPayload: } -# pre commit test trigger diff --git a/discord/integrations.py b/discord/integrations.py index 67505b7865..263e82866a 100644 --- a/discord/integrations.py +++ b/discord/integrations.py @@ -374,4 +374,3 @@ def _integration_factory(value: str) -> tuple[type[Integration], str]: return Integration, value -# pre commit test trigger diff --git a/discord/interactions.py b/discord/interactions.py index c0e531d5ef..55c42193e1 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -1943,4 +1943,3 @@ def is_ephemeral(self) -> bool: return self._response_message_ephemeral -# pre commit test trigger diff --git a/discord/invite.py b/discord/invite.py index ce2cf118bf..e8631740ee 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -818,4 +818,3 @@ def set_scheduled_event(self, event: ScheduledEvent) -> None: self.scheduled_event = event -# pre commit test trigger diff --git a/discord/iterators.py b/discord/iterators.py index cad57d9bb2..1ed094374f 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -1299,4 +1299,3 @@ def __await__(self) -> Generator[Any, Any, list[Message]]: return self.retrieve_inner().__await__() -# pre commit test trigger diff --git a/discord/member.py b/discord/member.py index c5c3d121bb..4dbd5c9ecb 100644 --- a/discord/member.py +++ b/discord/member.py @@ -1312,4 +1312,3 @@ def get_role(self, role_id: int, /) -> Role | None: return self.guild.get_role(role_id) if self._roles.has(role_id) else None -# pre commit test trigger diff --git a/discord/mentions.py b/discord/mentions.py index 148ae70018..3d37f0cd71 100644 --- a/discord/mentions.py +++ b/discord/mentions.py @@ -158,4 +158,3 @@ def __repr__(self) -> str: ) -# pre commit test trigger diff --git a/discord/message.py b/discord/message.py index 61f3add889..37d6c7c5d3 100644 --- a/discord/message.py +++ b/discord/message.py @@ -2621,4 +2621,3 @@ async def end_poll(self) -> Message: return message -# pre commit test trigger diff --git a/discord/mixins.py b/discord/mixins.py index a57dc28992..67d2ba90e2 100644 --- a/discord/mixins.py +++ b/discord/mixins.py @@ -48,4 +48,3 @@ def __hash__(self) -> int: return self.id >> 22 -# pre commit test trigger diff --git a/discord/monetization.py b/discord/monetization.py index 533f8eda2d..e93632384c 100644 --- a/discord/monetization.py +++ b/discord/monetization.py @@ -350,4 +350,3 @@ def user(self): return self._state.get_user(self.user_id) -# pre commit test trigger diff --git a/discord/object.py b/discord/object.py index 1db1a6da89..13fd9eaac7 100644 --- a/discord/object.py +++ b/discord/object.py @@ -111,4 +111,3 @@ def increment_id(self) -> int: return self.id & 0xFFF -# pre commit test trigger diff --git a/discord/oggparse.py b/discord/oggparse.py index dcfe58d092..5f4156a674 100644 --- a/discord/oggparse.py +++ b/discord/oggparse.py @@ -123,4 +123,3 @@ def iter_packets(self) -> Generator[bytes]: partial = b"" -# pre commit test trigger diff --git a/discord/onboarding.py b/discord/onboarding.py index 79f83a4b3c..7edc518bfa 100644 --- a/discord/onboarding.py +++ b/discord/onboarding.py @@ -483,4 +483,3 @@ async def delete_prompt( return await self.edit(prompts=prompts, reason=reason) -# pre commit test trigger diff --git a/discord/opus.py b/discord/opus.py index fd47b99aac..ba0e562906 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -734,4 +734,3 @@ def _decode_packet(self, packet: Packet) -> tuple[Packet, bytes]: return packet, pcm -# pre commit test trigger diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py index c5f2e027e0..74b16a512f 100644 --- a/discord/partial_emoji.py +++ b/discord/partial_emoji.py @@ -265,4 +265,3 @@ async def read(self) -> bytes: return await super().read() -# pre commit test trigger diff --git a/discord/permissions.py b/discord/permissions.py index 94ab7da5df..c670543837 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -901,4 +901,3 @@ def __iter__(self) -> Iterator[tuple[str, bool | None]]: yield key, self._values.get(key) -# pre commit test trigger diff --git a/discord/player.py b/discord/player.py index bb1c63edc5..4e045492d0 100644 --- a/discord/player.py +++ b/discord/player.py @@ -945,4 +945,3 @@ def played_frames(self) -> int: return self._played_frames_offset + self.loops -# pre commit test trigger diff --git a/discord/poll.py b/discord/poll.py index 14b0a7a4ae..fd154437e5 100644 --- a/discord/poll.py +++ b/discord/poll.py @@ -529,4 +529,3 @@ async def end(self) -> Message: return await self._message.end_poll() -# pre commit test trigger diff --git a/discord/primary_guild.py b/discord/primary_guild.py index 93c39095a8..18f7224455 100644 --- a/discord/primary_guild.py +++ b/discord/primary_guild.py @@ -98,4 +98,3 @@ def badge(self) -> Asset | None: ) -# pre commit test trigger diff --git a/discord/raw_models.py b/discord/raw_models.py index 16331d4987..7cc83dcc35 100644 --- a/discord/raw_models.py +++ b/discord/raw_models.py @@ -1032,4 +1032,3 @@ def __init__(self, data: MemberUpdateEvent, member: Member) -> None: self.member: Member = member -# pre commit test trigger diff --git a/discord/reaction.py b/discord/reaction.py index c632b49c9b..a190e68e8b 100644 --- a/discord/reaction.py +++ b/discord/reaction.py @@ -296,4 +296,3 @@ def __init__(self, data: ReactionCountDetailsPayload): self.burst = data.get("burst", 0) -# pre commit test trigger diff --git a/discord/role.py b/discord/role.py index 33fbd80a10..3c9463dd96 100644 --- a/discord/role.py +++ b/discord/role.py @@ -935,4 +935,3 @@ async def delete(self, *, reason: str | None = None) -> None: await self._state.http.delete_role(self.guild.id, self.id, reason=reason) -# pre commit test trigger diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py index 3c74a52db7..eb58dccbf6 100644 --- a/discord/scheduled_events.py +++ b/discord/scheduled_events.py @@ -578,4 +578,3 @@ def subscribers( ) -# pre commit test trigger diff --git a/discord/shard.py b/discord/shard.py index 2c94ba263d..c183d2f741 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -587,4 +587,3 @@ def is_ws_ratelimited(self) -> bool: return any(shard.ws.is_ratelimited() for shard in self.__shards.values()) -# pre commit test trigger diff --git a/discord/sinks/__init__.py b/discord/sinks/__init__.py index 8ae00b8a68..c4289d19b3 100644 --- a/discord/sinks/__init__.py +++ b/discord/sinks/__init__.py @@ -19,4 +19,3 @@ from .pcm import * from .wave import * -# pre commit test trigger diff --git a/discord/sinks/core.py b/discord/sinks/core.py index 1a5112aeca..c15aa2d417 100644 --- a/discord/sinks/core.py +++ b/discord/sinks/core.py @@ -250,4 +250,3 @@ def get_user_audio(self, user: snowflake.Snowflake): return os.path.realpath(self.audio_data.pop(user)) -# pre commit test trigger diff --git a/discord/sinks/errors.py b/discord/sinks/errors.py index a826ecbab1..bbd79aba12 100644 --- a/discord/sinks/errors.py +++ b/discord/sinks/errors.py @@ -89,4 +89,3 @@ class MKASinkError(SinkException): """ -# pre commit test trigger diff --git a/discord/sinks/m4a.py b/discord/sinks/m4a.py index e22dc60e8d..dc2900c2e1 100644 --- a/discord/sinks/m4a.py +++ b/discord/sinks/m4a.py @@ -103,4 +103,3 @@ def format_audio(self, audio): audio.on_format(self.encoding) -# pre commit test trigger diff --git a/discord/sinks/mka.py b/discord/sinks/mka.py index ad6195c664..007b046db8 100644 --- a/discord/sinks/mka.py +++ b/discord/sinks/mka.py @@ -96,4 +96,3 @@ def format_audio(self, audio): audio.on_format(self.encoding) -# pre commit test trigger diff --git a/discord/sinks/mkv.py b/discord/sinks/mkv.py index ce7a7881aa..3fa0a4017c 100644 --- a/discord/sinks/mkv.py +++ b/discord/sinks/mkv.py @@ -95,4 +95,3 @@ def format_audio(self, audio): audio.on_format(self.encoding) -# pre commit test trigger diff --git a/discord/sinks/mp3.py b/discord/sinks/mp3.py index 8110221014..6eae89026f 100644 --- a/discord/sinks/mp3.py +++ b/discord/sinks/mp3.py @@ -96,4 +96,3 @@ def format_audio(self, audio): audio.on_format(self.encoding) -# pre commit test trigger diff --git a/discord/sinks/mp4.py b/discord/sinks/mp4.py index 9ec54542fe..895effccc8 100644 --- a/discord/sinks/mp4.py +++ b/discord/sinks/mp4.py @@ -103,4 +103,3 @@ def format_audio(self, audio): audio.on_format(self.encoding) -# pre commit test trigger diff --git a/discord/sinks/ogg.py b/discord/sinks/ogg.py index 5ab319fec8..10b4833ed6 100644 --- a/discord/sinks/ogg.py +++ b/discord/sinks/ogg.py @@ -96,4 +96,3 @@ def format_audio(self, audio): audio.on_format(self.encoding) -# pre commit test trigger diff --git a/discord/sinks/pcm.py b/discord/sinks/pcm.py index 02f9724142..0d09b850d3 100644 --- a/discord/sinks/pcm.py +++ b/discord/sinks/pcm.py @@ -45,4 +45,3 @@ def format_audio(self, audio): return -# pre commit test trigger diff --git a/discord/sinks/wave.py b/discord/sinks/wave.py index 229555f871..f31286ef90 100644 --- a/discord/sinks/wave.py +++ b/discord/sinks/wave.py @@ -69,4 +69,3 @@ def format_audio(self, audio): audio.on_format(self.encoding) -# pre commit test trigger diff --git a/discord/soundboard.py b/discord/soundboard.py index 5b1037c13e..8c91290026 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -270,4 +270,3 @@ def __repr__(self) -> str: return f"" -# pre commit test trigger diff --git a/discord/stage_instance.py b/discord/stage_instance.py index 1e6d22809d..f92329400a 100644 --- a/discord/stage_instance.py +++ b/discord/stage_instance.py @@ -199,4 +199,3 @@ async def delete(self, *, reason: str | None = None) -> None: await self._state.http.delete_stage_instance(self.channel_id, reason=reason) -# pre commit test trigger diff --git a/discord/state.py b/discord/state.py index b7db3fd25a..cd3562454c 100644 --- a/discord/state.py +++ b/discord/state.py @@ -2289,4 +2289,3 @@ def parse_resumed(self, data) -> None: self.dispatch("shard_resumed", data["__shard_id__"]) -# pre commit test trigger diff --git a/discord/sticker.py b/discord/sticker.py index 705771f261..7e66776eca 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -554,4 +554,3 @@ def _sticker_factory( return Sticker, value -# pre commit test trigger diff --git a/discord/team.py b/discord/team.py index 8b1325779d..0a61fef333 100644 --- a/discord/team.py +++ b/discord/team.py @@ -180,4 +180,3 @@ def permissions(self) -> list[str]: return [] -# pre commit test trigger diff --git a/discord/template.py b/discord/template.py index cb97c1d9ba..cbade06e6c 100644 --- a/discord/template.py +++ b/discord/template.py @@ -280,4 +280,3 @@ def url(self) -> str: return f"https://discord.new/{self.code}" -# pre commit test trigger diff --git a/discord/threads.py b/discord/threads.py index b2677c3d0a..c5c06bad1d 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -940,4 +940,3 @@ def thread(self) -> Thread: return self.parent -# pre commit test trigger diff --git a/discord/types/__init__.py b/discord/types/__init__.py index 80cc2fb788..1261a79089 100644 --- a/discord/types/__init__.py +++ b/discord/types/__init__.py @@ -8,4 +8,3 @@ :license: MIT, see LICENSE for more details. """ -# pre commit test trigger diff --git a/discord/types/activity.py b/discord/types/activity.py index 8ce773241d..9510a824b2 100644 --- a/discord/types/activity.py +++ b/discord/types/activity.py @@ -111,4 +111,3 @@ class Activity(_BaseActivity, total=False): buttons: list[str] -# pre commit test trigger diff --git a/discord/types/appinfo.py b/discord/types/appinfo.py index eef7e7c8d2..53f86e5673 100644 --- a/discord/types/appinfo.py +++ b/discord/types/appinfo.py @@ -95,4 +95,3 @@ class PartialAppInfo(BaseAppInfo, total=False): pass -# pre commit test trigger diff --git a/discord/types/application_role_connection.py b/discord/types/application_role_connection.py index fc3cbc086e..55a545987b 100644 --- a/discord/types/application_role_connection.py +++ b/discord/types/application_role_connection.py @@ -40,4 +40,3 @@ class ApplicationRoleConnectionMetadata(TypedDict): description_localizations: NotRequired[dict[str, str]] -# pre commit test trigger diff --git a/discord/types/audit_log.py b/discord/types/audit_log.py index 54bfd7c3be..4a85fa1f4b 100644 --- a/discord/types/audit_log.py +++ b/discord/types/audit_log.py @@ -296,4 +296,3 @@ class AuditLog(TypedDict): auto_moderation_rules: list[AutoModRule] -# pre commit test trigger diff --git a/discord/types/automod.py b/discord/types/automod.py index 0de2a31521..42c1f39c8b 100644 --- a/discord/types/automod.py +++ b/discord/types/automod.py @@ -91,4 +91,3 @@ class EditAutoModRule(TypedDict, total=False): exempt_channels: list[Snowflake] -# pre commit test trigger diff --git a/discord/types/channel.py b/discord/types/channel.py index 9c772dc0f1..ea51cb58f0 100644 --- a/discord/types/channel.py +++ b/discord/types/channel.py @@ -196,4 +196,3 @@ class VoiceChannelEffectSendEvent(TypedDict): sound_volume: NotRequired[float] -# pre commit test trigger diff --git a/discord/types/collectibles.py b/discord/types/collectibles.py index b0576905d6..c10b8181a4 100644 --- a/discord/types/collectibles.py +++ b/discord/types/collectibles.py @@ -45,4 +45,3 @@ class AvatarDecoration(TypedDict): asset: str -# pre commit test trigger diff --git a/discord/types/components.py b/discord/types/components.py index cda9049cc3..af567b6566 100644 --- a/discord/types/components.py +++ b/discord/types/components.py @@ -254,4 +254,3 @@ class CheckboxComponent(BaseComponent): CheckboxComponent, CheckboxGroupComponent, ] -# pre commit test trigger diff --git a/discord/types/embed.py b/discord/types/embed.py index 19f8dcbbcb..818f984f7e 100644 --- a/discord/types/embed.py +++ b/discord/types/embed.py @@ -103,4 +103,3 @@ class Embed(TypedDict, total=False): fields: list[EmbedField] -# pre commit test trigger diff --git a/discord/types/emoji.py b/discord/types/emoji.py index ca1ffd1526..3e4e49cf99 100644 --- a/discord/types/emoji.py +++ b/discord/types/emoji.py @@ -50,4 +50,3 @@ class EditEmoji(TypedDict): roles: SnowflakeList | None -# pre commit test trigger diff --git a/discord/types/gateway.py b/discord/types/gateway.py index 9e8cf6c82c..400ca29824 100644 --- a/discord/types/gateway.py +++ b/discord/types/gateway.py @@ -42,4 +42,3 @@ class GatewayBot(Gateway): session_start_limit: SessionStartLimit -# pre commit test trigger diff --git a/discord/types/guild.py b/discord/types/guild.py index 4629aada73..9e3875b36f 100644 --- a/discord/types/guild.py +++ b/discord/types/guild.py @@ -212,4 +212,3 @@ class ModifyIncidents(TypedDict, total=False): dms_disabled_until: str | None -# pre commit test trigger diff --git a/discord/types/integration.py b/discord/types/integration.py index 1b8f362386..1a6c8b70f1 100644 --- a/discord/types/integration.py +++ b/discord/types/integration.py @@ -81,4 +81,3 @@ class BotIntegration(BaseIntegration): Integration = Union[BaseIntegration, StreamIntegration, BotIntegration] -# pre commit test trigger diff --git a/discord/types/interactions.py b/discord/types/interactions.py index c40830a5ae..147429247b 100644 --- a/discord/types/interactions.py +++ b/discord/types/interactions.py @@ -296,4 +296,3 @@ class InteractionCallbackResource(TypedDict): message: NotRequired[Message] -# pre commit test trigger diff --git a/discord/types/invite.py b/discord/types/invite.py index eb304a5253..2bd3eeb365 100644 --- a/discord/types/invite.py +++ b/discord/types/invite.py @@ -106,4 +106,3 @@ class InviteTargetUsersJobStatus(TypedDict): error_message: NotRequired[str] -# pre commit test trigger diff --git a/discord/types/member.py b/discord/types/member.py index 134b3d8851..29ece598a2 100644 --- a/discord/types/member.py +++ b/discord/types/member.py @@ -92,4 +92,3 @@ class MemberUpdateEvent(TypedDict): # collectibles: Collectibles -# pre commit test trigger diff --git a/discord/types/message.py b/discord/types/message.py index 9efd95f396..614381e285 100644 --- a/discord/types/message.py +++ b/discord/types/message.py @@ -196,4 +196,3 @@ class AllowedMentions(TypedDict): replied_user: bool -# pre commit test trigger diff --git a/discord/types/monetization.py b/discord/types/monetization.py index 152364e325..bd7625ab5b 100644 --- a/discord/types/monetization.py +++ b/discord/types/monetization.py @@ -78,4 +78,3 @@ class Subscription(TypedDict): country: NotRequired[str] -# pre commit test trigger diff --git a/discord/types/onboarding.py b/discord/types/onboarding.py index 1dfed235ac..1988bb111e 100644 --- a/discord/types/onboarding.py +++ b/discord/types/onboarding.py @@ -65,4 +65,3 @@ class PromptOption(TypedDict): description: str | None -# pre commit test trigger diff --git a/discord/types/poll.py b/discord/types/poll.py index 6513258278..d7be0bd085 100644 --- a/discord/types/poll.py +++ b/discord/types/poll.py @@ -64,4 +64,3 @@ class Poll(TypedDict): results: NotRequired[PollResults] -# pre commit test trigger diff --git a/discord/types/primary_guild.py b/discord/types/primary_guild.py index bb301bd2ab..e163a20326 100644 --- a/discord/types/primary_guild.py +++ b/discord/types/primary_guild.py @@ -36,4 +36,3 @@ class PrimaryGuild(TypedDict): badge: str -# pre commit test trigger diff --git a/discord/types/raw_models.py b/discord/types/raw_models.py index 337c4aadb0..6c61e1f607 100644 --- a/discord/types/raw_models.py +++ b/discord/types/raw_models.py @@ -167,4 +167,3 @@ class MessagePollVoteEvent(TypedDict): answer_id: int -# pre commit test trigger diff --git a/discord/types/role.py b/discord/types/role.py index 00a9a5c08c..b57d05f5ff 100644 --- a/discord/types/role.py +++ b/discord/types/role.py @@ -62,4 +62,3 @@ class RoleTags(TypedDict, total=False): guild_connections: NotRequired[Literal[None]] -# pre commit test trigger diff --git a/discord/types/scheduled_events.py b/discord/types/scheduled_events.py index c3ac98b371..c793c68ffb 100644 --- a/discord/types/scheduled_events.py +++ b/discord/types/scheduled_events.py @@ -65,4 +65,3 @@ class ScheduledEventSubscriber(TypedDict): member: Member | None -# pre commit test trigger diff --git a/discord/types/snowflake.py b/discord/types/snowflake.py index 53e94e743a..3b89d29323 100644 --- a/discord/types/snowflake.py +++ b/discord/types/snowflake.py @@ -27,4 +27,3 @@ Snowflake = Union[str, int] SnowflakeList = list[Snowflake] -# pre commit test trigger diff --git a/discord/types/soundboard.py b/discord/types/soundboard.py index e6e839dfdc..b88d7b0248 100644 --- a/discord/types/soundboard.py +++ b/discord/types/soundboard.py @@ -42,4 +42,3 @@ class SoundboardSound(TypedDict): available: bool -# pre commit test trigger diff --git a/discord/types/sticker.py b/discord/types/sticker.py index e1d48d4c37..2f4f8524fd 100644 --- a/discord/types/sticker.py +++ b/discord/types/sticker.py @@ -91,4 +91,3 @@ class ListPremiumStickerPacks(TypedDict): sticker_packs: list[StickerPack] -# pre commit test trigger diff --git a/discord/types/team.py b/discord/types/team.py index af2296ac00..c3a100647d 100644 --- a/discord/types/team.py +++ b/discord/types/team.py @@ -46,4 +46,3 @@ class Team(TypedDict): icon: str | None -# pre commit test trigger diff --git a/discord/types/template.py b/discord/types/template.py index 46a1a1a5fd..47a958dc21 100644 --- a/discord/types/template.py +++ b/discord/types/template.py @@ -51,4 +51,3 @@ class Template(TypedDict): is_dirty: bool | None -# pre commit test trigger diff --git a/discord/types/threads.py b/discord/types/threads.py index 881662788d..08e623ef4d 100644 --- a/discord/types/threads.py +++ b/discord/types/threads.py @@ -76,4 +76,3 @@ class ThreadPaginationPayload(TypedDict): has_more: bool -# pre commit test trigger diff --git a/discord/types/user.py b/discord/types/user.py index 4fdf806be5..6227cdf16a 100644 --- a/discord/types/user.py +++ b/discord/types/user.py @@ -57,4 +57,3 @@ class User(PartialUser, total=False): collectibles: Collectibles -# pre commit test trigger diff --git a/discord/types/voice.py b/discord/types/voice.py index 734771278f..f7378ad24a 100644 --- a/discord/types/voice.py +++ b/discord/types/voice.py @@ -89,4 +89,3 @@ class VoiceReady(TypedDict): heartbeat_interval: int -# pre commit test trigger diff --git a/discord/types/webhook.py b/discord/types/webhook.py index ebd83ce508..5dae67e24e 100644 --- a/discord/types/webhook.py +++ b/discord/types/webhook.py @@ -65,4 +65,3 @@ class Webhook(PartialWebhook): application_id: NotRequired[Snowflake | None] -# pre commit test trigger diff --git a/discord/types/welcome_screen.py b/discord/types/welcome_screen.py index 8920affe96..e414f0d6ef 100644 --- a/discord/types/welcome_screen.py +++ b/discord/types/welcome_screen.py @@ -42,4 +42,3 @@ class WelcomeScreenChannel(TypedDict): emoji_name: str | None -# pre commit test trigger diff --git a/discord/types/widget.py b/discord/types/widget.py index d346264af5..cfd99075db 100644 --- a/discord/types/widget.py +++ b/discord/types/widget.py @@ -64,4 +64,3 @@ class WidgetSettings(TypedDict): channel_id: Snowflake | None -# pre commit test trigger diff --git a/discord/ui/__init__.py b/discord/ui/__init__.py index a9b4679cc6..bf3f9f65cf 100644 --- a/discord/ui/__init__.py +++ b/discord/ui/__init__.py @@ -29,4 +29,3 @@ from .thumbnail import * from .view import * -# pre commit test trigger diff --git a/discord/ui/action_row.py b/discord/ui/action_row.py index b64ccbaf78..c257f1f5d3 100644 --- a/discord/ui/action_row.py +++ b/discord/ui/action_row.py @@ -436,4 +436,3 @@ def from_component(cls: type[A], component: ActionRowComponent) -> A: callback = None -# pre commit test trigger diff --git a/discord/ui/button.py b/discord/ui/button.py index 3e8d3c9a36..1661131227 100644 --- a/discord/ui/button.py +++ b/discord/ui/button.py @@ -420,4 +420,3 @@ def decorator(func: ItemCallbackType) -> ItemCallbackType: return decorator # type: ignore # lie to the type checkers, because after a View is instated, the button callback is converted into a Button instance -# pre commit test trigger diff --git a/discord/ui/checkbox.py b/discord/ui/checkbox.py index d11634bd5f..60a3af079b 100644 --- a/discord/ui/checkbox.py +++ b/discord/ui/checkbox.py @@ -137,4 +137,3 @@ def refresh_from_modal( return self.refresh_state(data) -# pre commit test trigger diff --git a/discord/ui/checkbox_group.py b/discord/ui/checkbox_group.py index 2caf1da23e..e60b264468 100644 --- a/discord/ui/checkbox_group.py +++ b/discord/ui/checkbox_group.py @@ -286,4 +286,3 @@ def refresh_from_modal( return self.refresh_state(data) -# pre commit test trigger diff --git a/discord/ui/container.py b/discord/ui/container.py index 1449ece6a8..077573deb2 100644 --- a/discord/ui/container.py +++ b/discord/ui/container.py @@ -443,4 +443,3 @@ def from_component(cls: type[C], component: ContainerComponent) -> C: callback = None -# pre commit test trigger diff --git a/discord/ui/core.py b/discord/ui/core.py index d8aced4cb0..9cfa1044cc 100644 --- a/discord/ui/core.py +++ b/discord/ui/core.py @@ -158,4 +158,3 @@ async def on_timeout(self) -> None: """ -# pre commit test trigger diff --git a/discord/ui/file.py b/discord/ui/file.py index e214b6f87e..059b869fb2 100644 --- a/discord/ui/file.py +++ b/discord/ui/file.py @@ -150,4 +150,3 @@ def from_component(cls: type[F], component: FileComponent) -> F: callback = None -# pre commit test trigger diff --git a/discord/ui/file_upload.py b/discord/ui/file_upload.py index a8155b0784..783fddfa5c 100644 --- a/discord/ui/file_upload.py +++ b/discord/ui/file_upload.py @@ -199,4 +199,3 @@ def from_component( ) -# pre commit test trigger diff --git a/discord/ui/input_text.py b/discord/ui/input_text.py index 419be1971a..5b632e933c 100644 --- a/discord/ui/input_text.py +++ b/discord/ui/input_text.py @@ -297,4 +297,3 @@ def from_component( TextInput = InputText -# pre commit test trigger diff --git a/discord/ui/item.py b/discord/ui/item.py index 4c7b9633e0..bb5db35f27 100644 --- a/discord/ui/item.py +++ b/discord/ui/item.py @@ -270,4 +270,3 @@ def modal(self, value) -> None: self._modal = value -# pre commit test trigger diff --git a/discord/ui/label.py b/discord/ui/label.py index 46d5dc1d20..c22e368db7 100644 --- a/discord/ui/label.py +++ b/discord/ui/label.py @@ -566,4 +566,3 @@ def from_component(cls: type[L], component: LabelComponent) -> L: ) -# pre commit test trigger diff --git a/discord/ui/media_gallery.py b/discord/ui/media_gallery.py index de77ca7558..afd8078de4 100644 --- a/discord/ui/media_gallery.py +++ b/discord/ui/media_gallery.py @@ -179,4 +179,3 @@ def from_component(cls: type[M], component: MediaGalleryComponent) -> M: callback = None -# pre commit test trigger diff --git a/discord/ui/modal.py b/discord/ui/modal.py index fdb79b945b..62a6923243 100644 --- a/discord/ui/modal.py +++ b/discord/ui/modal.py @@ -528,4 +528,3 @@ async def dispatch(self, user_id: int, custom_id: str, interaction: Interaction) return await modal.on_error(e, interaction) -# pre commit test trigger diff --git a/discord/ui/radio_group.py b/discord/ui/radio_group.py index ae4db23b9f..1c08772bed 100644 --- a/discord/ui/radio_group.py +++ b/discord/ui/radio_group.py @@ -236,4 +236,3 @@ def refresh_from_modal( return self.refresh_state(data) -# pre commit test trigger diff --git a/discord/ui/section.py b/discord/ui/section.py index e51795e0f8..a41afecd7a 100644 --- a/discord/ui/section.py +++ b/discord/ui/section.py @@ -359,4 +359,3 @@ def from_component(cls: type[S], component: SectionComponent) -> S: callback = None -# pre commit test trigger diff --git a/discord/ui/select.py b/discord/ui/select.py index 62f9cba650..fb396539d7 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -1181,4 +1181,3 @@ def channel_select( ) -# pre commit test trigger diff --git a/discord/ui/separator.py b/discord/ui/separator.py index 8fa598ccd4..bd6cb4277b 100644 --- a/discord/ui/separator.py +++ b/discord/ui/separator.py @@ -122,4 +122,3 @@ def from_component(cls: type[S], component: SeparatorComponent) -> S: callback = None -# pre commit test trigger diff --git a/discord/ui/text_display.py b/discord/ui/text_display.py index f3cbfaa891..c05a8c1665 100644 --- a/discord/ui/text_display.py +++ b/discord/ui/text_display.py @@ -110,4 +110,3 @@ def from_component(cls: type[T], component: TextDisplayComponent) -> T: callback = None -# pre commit test trigger diff --git a/discord/ui/thumbnail.py b/discord/ui/thumbnail.py index de1ad2add1..1492d137ee 100644 --- a/discord/ui/thumbnail.py +++ b/discord/ui/thumbnail.py @@ -153,4 +153,3 @@ def from_component(cls: type[T], component: ThumbnailComponent) -> T: callback = None -# pre commit test trigger diff --git a/discord/ui/view.py b/discord/ui/view.py index e86e0a479d..af8a196f25 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -1049,4 +1049,3 @@ def update_from_message(self, message_id: int, components: list[ComponentPayload ) -# pre commit test trigger diff --git a/discord/user.py b/discord/user.py index 697732e8d3..7c4df21a45 100644 --- a/discord/user.py +++ b/discord/user.py @@ -740,4 +740,3 @@ def entitlements( ) -# pre commit test trigger diff --git a/discord/utils.py b/discord/utils.py index 76b84fe51d..5d15e42f2d 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -1690,4 +1690,3 @@ def _get_event_loop() -> asyncio.AbstractEventLoop: return asyncio.get_event_loop() -# pre commit test trigger diff --git a/discord/voice/__init__.py b/discord/voice/__init__.py index d3a92cd320..ae89eab51e 100644 --- a/discord/voice/__init__.py +++ b/discord/voice/__init__.py @@ -18,4 +18,3 @@ from .client import * from .packets import * -# pre commit test trigger diff --git a/discord/voice/_types.py b/discord/voice/_types.py index 73aa157de9..e8dc5bd05f 100644 --- a/discord/voice/_types.py +++ b/discord/voice/_types.py @@ -166,4 +166,3 @@ def cleanup(self) -> None: self.client._connection._remove_voice_client(key) -# pre commit test trigger diff --git a/discord/voice/client.py b/discord/voice/client.py index 8013580f11..8104277cd4 100644 --- a/discord/voice/client.py +++ b/discord/voice/client.py @@ -810,4 +810,3 @@ def is_speaking(self, member: Member | User) -> bool | None: return self._reader.speaking_timer.get_speaking(ssrc) -# pre commit test trigger diff --git a/discord/voice/enums.py b/discord/voice/enums.py index 113ef355a8..8fca52984c 100644 --- a/discord/voice/enums.py +++ b/discord/voice/enums.py @@ -79,4 +79,3 @@ class ConnectionFlowState(Enum): connected = 8 -# pre commit test trigger diff --git a/discord/voice/gateway.py b/discord/voice/gateway.py index 4e2f714e88..bc2e0e2c0d 100644 --- a/discord/voice/gateway.py +++ b/discord/voice/gateway.py @@ -521,4 +521,3 @@ async def send_dave_transition_ready(self, transition_id: int) -> None: await self.send_as_json(payload) -# pre commit test trigger diff --git a/discord/voice/packets/__init__.py b/discord/voice/packets/__init__.py index 2ef0c78351..cda9fa82ff 100644 --- a/discord/voice/packets/__init__.py +++ b/discord/voice/packets/__init__.py @@ -63,4 +63,3 @@ def opus(self) -> bytes | None: return self.packet.decrypted_data -# pre commit test trigger diff --git a/discord/voice/packets/core.py b/discord/voice/packets/core.py index 742fc5b077..c5fb729e8a 100644 --- a/discord/voice/packets/core.py +++ b/discord/voice/packets/core.py @@ -93,4 +93,3 @@ def __hash__(self) -> int: return hash(self.data) -# pre commit test trigger diff --git a/discord/voice/packets/rtp.py b/discord/voice/packets/rtp.py index 4c59f80ee6..cbee2e1c96 100644 --- a/discord/voice/packets/rtp.py +++ b/discord/voice/packets/rtp.py @@ -318,4 +318,3 @@ def _read_report(self, data: bytes, offset: int) -> _report: 200: SenderReportPacket, 201: ReceiverReportPacket, } -# pre commit test trigger diff --git a/discord/voice/receive/__init__.py b/discord/voice/receive/__init__.py index 5df85df4d8..7a1d31ba89 100644 --- a/discord/voice/receive/__init__.py +++ b/discord/voice/receive/__init__.py @@ -31,4 +31,3 @@ "PacketRouter", "SinkEventRouter", ) -# pre commit test trigger diff --git a/discord/voice/receive/reader.py b/discord/voice/receive/reader.py index 49b3e62e9c..ff3993db86 100644 --- a/discord/voice/receive/reader.py +++ b/discord/voice/receive/reader.py @@ -577,4 +577,3 @@ def stop(self) -> None: self._end_thread.set() -# pre commit test trigger diff --git a/discord/voice/receive/router.py b/discord/voice/receive/router.py index 4ad9c56b21..83398cbee7 100644 --- a/discord/voice/receive/router.py +++ b/discord/voice/receive/router.py @@ -231,4 +231,3 @@ def _do_run(self) -> None: self._dispatch_to_listeners(event, *args, **kwargs) -# pre commit test trigger diff --git a/discord/voice/state.py b/discord/voice/state.py index ffcf47fb07..5ecb16ab43 100644 --- a/discord/voice/state.py +++ b/discord/voice/state.py @@ -983,4 +983,3 @@ async def execute_dave_transition(self, transition: int) -> None: self.dave_pending_transition = None -# pre commit test trigger diff --git a/discord/voice/utils/__init__.py b/discord/voice/utils/__init__.py index 78f7c87ba9..e69de29bb2 100644 --- a/discord/voice/utils/__init__.py +++ b/discord/voice/utils/__init__.py @@ -1 +0,0 @@ -# pre commit test trigger diff --git a/discord/voice/utils/buffer.py b/discord/voice/utils/buffer.py index bb888592d6..9abd9ca951 100644 --- a/discord/voice/utils/buffer.py +++ b/discord/voice/utils/buffer.py @@ -215,4 +215,3 @@ def reset(self) -> None: self._last_tx_seq = -1 -# pre commit test trigger diff --git a/discord/voice/utils/dependencies.py b/discord/voice/utils/dependencies.py index 54e53f5ead..e3a8c3f83d 100644 --- a/discord/voice/utils/dependencies.py +++ b/discord/voice/utils/dependencies.py @@ -38,4 +38,3 @@ HAS_NACL = False else: HAS_NACL = True -# pre commit test trigger diff --git a/discord/voice/utils/multidataevent.py b/discord/voice/utils/multidataevent.py index 7fa026dc0c..91962f6387 100644 --- a/discord/voice/utils/multidataevent.py +++ b/discord/voice/utils/multidataevent.py @@ -79,4 +79,3 @@ def clear(self) -> None: self._ready.clear() -# pre commit test trigger diff --git a/discord/voice/utils/wrapped.py b/discord/voice/utils/wrapped.py index 563b951e4b..5786f45004 100644 --- a/discord/voice/utils/wrapped.py +++ b/discord/voice/utils/wrapped.py @@ -32,4 +32,3 @@ def add_wrapped(a: int, b: int, *, wrap: int = 65536) -> int: return (a + b) % wrap -# pre commit test trigger diff --git a/discord/webhook/__init__.py b/discord/webhook/__init__.py index 71c46f77dd..80890fb426 100644 --- a/discord/webhook/__init__.py +++ b/discord/webhook/__init__.py @@ -11,4 +11,3 @@ from .async_ import * from .sync import * -# pre commit test trigger diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index fd5545ac18..2b86141948 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -2212,4 +2212,3 @@ async def delete_message( ) -# pre commit test trigger diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py index ccf5dd6855..5312623ec2 100644 --- a/discord/webhook/sync.py +++ b/discord/webhook/sync.py @@ -1318,4 +1318,3 @@ def delete_message(self, message_id: int, *, thread_id: int | None = None) -> No ) -# pre commit test trigger diff --git a/discord/welcome_screen.py b/discord/welcome_screen.py index a1a702b8f3..b0c515cddc 100644 --- a/discord/welcome_screen.py +++ b/discord/welcome_screen.py @@ -234,4 +234,3 @@ async def edit(self, **options): return self -# pre commit test trigger diff --git a/discord/widget.py b/discord/widget.py index db35ec7dcf..b5ee7d9d0a 100644 --- a/discord/widget.py +++ b/discord/widget.py @@ -348,4 +348,3 @@ async def fetch_invite(self, *, with_counts: bool = True) -> Invite: return Invite.from_incomplete(state=self._state, data=data) -# pre commit test trigger diff --git a/docs/conf.py b/docs/conf.py index 6caa7842ea..053fb7d942 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -316,4 +316,3 @@ def write_new(): "tasklist", ] myst_links_external_new_tab = True -# pre commit test trigger diff --git a/docs/extensions/attributetable.py b/docs/extensions/attributetable.py index ef62877b2f..40faf1a7a2 100644 --- a/docs/extensions/attributetable.py +++ b/docs/extensions/attributetable.py @@ -297,4 +297,3 @@ def setup(app): app.connect("doctree-resolved", process_attributetable) -# pre commit test trigger diff --git a/docs/extensions/exception_hierarchy.py b/docs/extensions/exception_hierarchy.py index 029b9a5669..d0d3ba7025 100644 --- a/docs/extensions/exception_hierarchy.py +++ b/docs/extensions/exception_hierarchy.py @@ -34,4 +34,3 @@ def setup(app): app.add_directive("exception_hierarchy", ExceptionHierarchyDirective) -# pre commit test trigger diff --git a/docs/extensions/nitpick_file_ignorer.py b/docs/extensions/nitpick_file_ignorer.py index 6511627a00..0b919a6fa8 100644 --- a/docs/extensions/nitpick_file_ignorer.py +++ b/docs/extensions/nitpick_file_ignorer.py @@ -24,4 +24,3 @@ def setup(app: Sphinx): sphinx_logging.getLogger("sphinx.transforms.post_transforms").logger.addFilter(f) -# pre commit test trigger diff --git a/docs/extensions/resourcelinks.py b/docs/extensions/resourcelinks.py index a343967914..10467f1d4c 100644 --- a/docs/extensions/resourcelinks.py +++ b/docs/extensions/resourcelinks.py @@ -44,4 +44,3 @@ def setup(app: Sphinx) -> dict[str, Any]: return {"version": sphinx.__display_version__, "parallel_read_safe": True} -# pre commit test trigger diff --git a/examples/app_commands/context_menus.py b/examples/app_commands/context_menus.py index e4faf58afa..d6fbca3711 100644 --- a/examples/app_commands/context_menus.py +++ b/examples/app_commands/context_menus.py @@ -26,4 +26,3 @@ async def show_id( bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/info.py b/examples/app_commands/info.py index e5b0cfe8b5..51e769b033 100644 --- a/examples/app_commands/info.py +++ b/examples/app_commands/info.py @@ -46,4 +46,3 @@ async def info(ctx: discord.ApplicationContext, user: discord.Member = None): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/slash_autocomplete.py b/examples/app_commands/slash_autocomplete.py index a61c179286..f5acb08829 100644 --- a/examples/app_commands/slash_autocomplete.py +++ b/examples/app_commands/slash_autocomplete.py @@ -234,4 +234,3 @@ async def get_vegetable(ctx: discord.ApplicationContext, choice: str): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/slash_basic.py b/examples/app_commands/slash_basic.py index 7b56066423..63c074f27b 100644 --- a/examples/app_commands/slash_basic.py +++ b/examples/app_commands/slash_basic.py @@ -44,4 +44,3 @@ async def joined(ctx: discord.ApplicationContext, member: discord.Member = None) # To learn how to add descriptions and choices to options, check slash_options.py bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/slash_cog.py b/examples/app_commands/slash_cog.py index c770f3a05a..01b5a84480 100644 --- a/examples/app_commands/slash_cog.py +++ b/examples/app_commands/slash_cog.py @@ -27,4 +27,3 @@ def setup(bot): # bot = commands.Bot(command_prefix=commands.when_mentioned_or("!")) # bot.load_extension("slash_cog") # bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/slash_cog_groups.py b/examples/app_commands/slash_cog_groups.py index c9549d78bd..0fd964d746 100644 --- a/examples/app_commands/slash_cog_groups.py +++ b/examples/app_commands/slash_cog_groups.py @@ -54,4 +54,3 @@ async def on_application_command_error( bot.add_cog(Example(bot)) # Put in a setup function for cog files bot.run("TOKEN") # Main file -# pre commit test trigger diff --git a/examples/app_commands/slash_groups.py b/examples/app_commands/slash_groups.py index ce877f8a3d..fa216781ad 100644 --- a/examples/app_commands/slash_groups.py +++ b/examples/app_commands/slash_groups.py @@ -22,4 +22,3 @@ async def add(ctx: discord.ApplicationContext, num1: int, num2: int): bot.add_application_command(math) bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/slash_options.py b/examples/app_commands/slash_options.py index 17aaeb906c..be625738b1 100644 --- a/examples/app_commands/slash_options.py +++ b/examples/app_commands/slash_options.py @@ -72,4 +72,3 @@ async def say( bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/slash_perms.py b/examples/app_commands/slash_perms.py index 83cf506289..bf21e04073 100644 --- a/examples/app_commands/slash_perms.py +++ b/examples/app_commands/slash_perms.py @@ -27,4 +27,3 @@ async def staff_only(ctx: discord.ApplicationContext): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/app_commands/slash_users.py b/examples/app_commands/slash_users.py index 41c75f9204..73c32cfbad 100644 --- a/examples/app_commands/slash_users.py +++ b/examples/app_commands/slash_users.py @@ -31,4 +31,3 @@ async def say_hello(ctx: discord.ApplicationContext): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/audio_recording.py b/examples/audio_recording.py index aa880f75d2..38156688f7 100644 --- a/examples/audio_recording.py +++ b/examples/audio_recording.py @@ -62,4 +62,3 @@ async def stop(ctx: discord.ApplicationContext): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/audio_recording_merged.py b/examples/audio_recording_merged.py index 38d43df25f..9148a67a43 100644 --- a/examples/audio_recording_merged.py +++ b/examples/audio_recording_merged.py @@ -111,4 +111,3 @@ async def leave(ctx: discord.ApplicationContext): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/background_task.py b/examples/background_task.py index e676f73fb5..9bba50abda 100644 --- a/examples/background_task.py +++ b/examples/background_task.py @@ -67,4 +67,3 @@ async def fetch_status_task(self): client = MyClient() client.run("TOKEN") -# pre commit test trigger diff --git a/examples/background_task_asyncio.py b/examples/background_task_asyncio.py index f21af2ed45..05eadf0516 100644 --- a/examples/background_task_asyncio.py +++ b/examples/background_task_asyncio.py @@ -26,4 +26,3 @@ async def my_background_task(self): client = MyClient() client.run("TOKEN") -# pre commit test trigger diff --git a/examples/basic_async_bot.py b/examples/basic_async_bot.py index 8a6eaf92f2..a72859fb37 100644 --- a/examples/basic_async_bot.py +++ b/examples/basic_async_bot.py @@ -27,4 +27,3 @@ async def main(): asyncio.run(main()) -# pre commit test trigger diff --git a/examples/basic_bot.py b/examples/basic_bot.py index 500061dabd..e452742983 100644 --- a/examples/basic_bot.py +++ b/examples/basic_bot.py @@ -86,4 +86,3 @@ async def _bot(ctx: commands.Context): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/basic_voice.py b/examples/basic_voice.py index bbda95688c..f81c7ad373 100644 --- a/examples/basic_voice.py +++ b/examples/basic_voice.py @@ -149,4 +149,3 @@ async def on_ready(): bot.add_cog(Music(bot)) bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/bridge_commands.py b/examples/bridge_commands.py index 63ba56ad60..4eecebe632 100644 --- a/examples/bridge_commands.py +++ b/examples/bridge_commands.py @@ -69,4 +69,3 @@ async def on_command_error(ctx: commands.Context, error: commands.CommandError): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/community_invites.py b/examples/community_invites.py index 3aa2092c12..efa7d22684 100644 --- a/examples/community_invites.py +++ b/examples/community_invites.py @@ -66,4 +66,3 @@ async def get_invite_target_users(ctx: discord.ApplicationContext, code: str): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/converters.py b/examples/converters.py index 307be53142..1d2359e944 100644 --- a/examples/converters.py +++ b/examples/converters.py @@ -124,4 +124,3 @@ async def multiply(ctx: commands.Context, number: int, maybe: bool): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/cooldown.py b/examples/cooldown.py index bb4afea52e..ee25ac699d 100644 --- a/examples/cooldown.py +++ b/examples/cooldown.py @@ -70,4 +70,3 @@ async def on_command_error(ctx: commands.Context, error: commands.CommandError): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/create_private_emoji.py b/examples/create_private_emoji.py index d70e13c0b9..66ce3823bf 100644 --- a/examples/create_private_emoji.py +++ b/examples/create_private_emoji.py @@ -31,4 +31,3 @@ async def add_private_emoji( bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/custom_context.py b/examples/custom_context.py index 51ea22af7d..334cd06041 100644 --- a/examples/custom_context.py +++ b/examples/custom_context.py @@ -87,4 +87,3 @@ async def slash_guess(ctx: MyApplicationContext, number: int): # bot. Try to use a file or something to keep # them private, and don't commit it to GitHub. bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/deleted.py b/examples/deleted.py index f8785af995..75512362b4 100644 --- a/examples/deleted.py +++ b/examples/deleted.py @@ -32,4 +32,3 @@ async def on_message_delete(message: discord.Message): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/edits.py b/examples/edits.py index e3bc76dddb..1cc43c9438 100644 --- a/examples/edits.py +++ b/examples/edits.py @@ -35,4 +35,3 @@ async def on_message_edit(before: discord.Message, after: discord.Message): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/modal_dialogs.py b/examples/modal_dialogs.py index 0e7fa41f2b..426b0ad075 100644 --- a/examples/modal_dialogs.py +++ b/examples/modal_dialogs.py @@ -151,4 +151,3 @@ async def select_callback( bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/new_member.py b/examples/new_member.py index 950e668f63..d9c2be7201 100644 --- a/examples/new_member.py +++ b/examples/new_member.py @@ -22,4 +22,3 @@ async def on_member_join(member: discord.Member): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/reaction_roles.py b/examples/reaction_roles.py index cd35c4de78..edceab62b2 100644 --- a/examples/reaction_roles.py +++ b/examples/reaction_roles.py @@ -99,4 +99,3 @@ async def on_raw_reaction_remove(payload: discord.RawReactionActionEvent): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/reply.py b/examples/reply.py index 0d8136f8ee..d7a4d60969 100644 --- a/examples/reply.py +++ b/examples/reply.py @@ -26,4 +26,3 @@ async def on_message(message: discord.Message): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/secret.py b/examples/secret.py index 801c6093fc..b78ce2e88d 100644 --- a/examples/secret.py +++ b/examples/secret.py @@ -131,4 +131,3 @@ async def on_command_error(ctx: commands.Context, error: commands.CommandError): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/soundboard.py b/examples/soundboard.py index 7b2ab95929..edda65cf5f 100644 --- a/examples/soundboard.py +++ b/examples/soundboard.py @@ -168,4 +168,3 @@ async def play_sound( bot.add_cog(SoundboardCog(bot)) bot.run(TOKEN) -# pre commit test trigger diff --git a/examples/timeout.py b/examples/timeout.py index 13511567b0..e91b907acc 100644 --- a/examples/timeout.py +++ b/examples/timeout.py @@ -24,4 +24,3 @@ async def timeout( bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/button_roles.py b/examples/views/button_roles.py index 0ca069d872..12284e65bc 100644 --- a/examples/views/button_roles.py +++ b/examples/views/button_roles.py @@ -111,4 +111,3 @@ def setup(bot): # bot = commands.Bot(command_prefix=commands.when_mentioned_or("!")) # bot.load_extension("button_roles") # bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/channel_select.py b/examples/views/channel_select.py index 8b2e482cca..bc24d1109e 100644 --- a/examples/views/channel_select.py +++ b/examples/views/channel_select.py @@ -43,4 +43,3 @@ async def on_ready() -> None: bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/confirm.py b/examples/views/confirm.py index 0329a1ad63..c557693d42 100644 --- a/examples/views/confirm.py +++ b/examples/views/confirm.py @@ -64,4 +64,3 @@ async def ask(ctx: commands.Context): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/counter.py b/examples/views/counter.py index 53e4cc75c9..642d7df6c9 100644 --- a/examples/views/counter.py +++ b/examples/views/counter.py @@ -44,4 +44,3 @@ async def counter(ctx: commands.Context): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/dropdown.py b/examples/views/dropdown.py index bd6e45f88f..38c877d2a4 100644 --- a/examples/views/dropdown.py +++ b/examples/views/dropdown.py @@ -76,4 +76,3 @@ async def on_ready(): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/ephemeral.py b/examples/views/ephemeral.py index 469294a587..6f94d390ac 100644 --- a/examples/views/ephemeral.py +++ b/examples/views/ephemeral.py @@ -48,4 +48,3 @@ async def on_ready(): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/link.py b/examples/views/link.py index f206bf7d2a..c7c463c0ae 100644 --- a/examples/views/link.py +++ b/examples/views/link.py @@ -37,4 +37,3 @@ async def on_ready(): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/new_components.py b/examples/views/new_components.py index 956e2eaf54..e022dab089 100644 --- a/examples/views/new_components.py +++ b/examples/views/new_components.py @@ -85,4 +85,3 @@ async def show_view(ctx: ApplicationContext): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/paginator.py b/examples/views/paginator.py index dc4bba27a8..043a7aeb9b 100644 --- a/examples/views/paginator.py +++ b/examples/views/paginator.py @@ -339,4 +339,3 @@ def setup(bot): # bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"), intents=intents) # bot.load_extension("paginator") # bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/persistent.py b/examples/views/persistent.py index 7a6168d626..527c2fe172 100644 --- a/examples/views/persistent.py +++ b/examples/views/persistent.py @@ -75,4 +75,3 @@ async def prepare(ctx: commands.Context): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/role_select.py b/examples/views/role_select.py index 4d611cdd5d..e8da45f414 100644 --- a/examples/views/role_select.py +++ b/examples/views/role_select.py @@ -43,4 +43,3 @@ async def on_ready() -> None: bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/views/tic_tac_toe.py b/examples/views/tic_tac_toe.py index 937083adbb..19e5415bc9 100644 --- a/examples/views/tic_tac_toe.py +++ b/examples/views/tic_tac_toe.py @@ -141,4 +141,3 @@ async def on_ready(): bot.run("TOKEN") -# pre commit test trigger diff --git a/examples/wait_for_event.py b/examples/wait_for_event.py index 99cc684555..927443af1a 100644 --- a/examples/wait_for_event.py +++ b/examples/wait_for_event.py @@ -53,4 +53,3 @@ def is_valid_guess(m: discord.Message): bot.run("TOKEN") -# pre commit test trigger diff --git a/scripts/count_sourcelines.py b/scripts/count_sourcelines.py index e8ff82c55d..4cad2bcb25 100644 --- a/scripts/count_sourcelines.py +++ b/scripts/count_sourcelines.py @@ -45,4 +45,3 @@ print("%05d lines in %s" % (line_number_count, filename)) print(f"\nTotal: {sum([x[0] for x in loc_list])} lines ({cur_path})") -# pre commit test trigger diff --git a/scripts/discord_release_notification.py b/scripts/discord_release_notification.py index f709455e4d..58c17aec92 100644 --- a/scripts/discord_release_notification.py +++ b/scripts/discord_release_notification.py @@ -119,4 +119,3 @@ def main() -> None: if __name__ == "__main__": main() -# pre commit test trigger diff --git a/scripts/docs_json_exporter.py b/scripts/docs_json_exporter.py index 94b01703c4..a853349baa 100644 --- a/scripts/docs_json_exporter.py +++ b/scripts/docs_json_exporter.py @@ -88,4 +88,3 @@ def log(msg): log("To upload as artifact: docs.json") except Exception as e: print(f"::error::Docs JSON export failed: {e}") -# pre commit test trigger diff --git a/scripts/release_changelog.py b/scripts/release_changelog.py index 6e26525ee3..b98415c642 100644 --- a/scripts/release_changelog.py +++ b/scripts/release_changelog.py @@ -231,4 +231,3 @@ def main() -> None: if __name__ == "__main__": main() -# pre commit test trigger diff --git a/scripts/release_rtd_versions.py b/scripts/release_rtd_versions.py index 05bf8b4c63..96224f6506 100644 --- a/scripts/release_rtd_versions.py +++ b/scripts/release_rtd_versions.py @@ -138,4 +138,3 @@ def main() -> None: if __name__ == "__main__": main() -# pre commit test trigger diff --git a/setup.py b/setup.py index 58bb999f2a..7f1a1763ca 100644 --- a/setup.py +++ b/setup.py @@ -2,4 +2,3 @@ if __name__ == "__main__": setup() -# pre commit test trigger diff --git a/tests/__init__.py b/tests/__init__.py index 78f7c87ba9..e69de29bb2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +0,0 @@ -# pre commit test trigger diff --git a/tests/voice/__init__.py b/tests/voice/__init__.py index 78f7c87ba9..e69de29bb2 100644 --- a/tests/voice/__init__.py +++ b/tests/voice/__init__.py @@ -1 +0,0 @@ -# pre commit test trigger diff --git a/tests/voice/test_dependency_behavior.py b/tests/voice/test_dependency_behavior.py index 3cbde3d26e..3f9e0ab685 100644 --- a/tests/voice/test_dependency_behavior.py +++ b/tests/voice/test_dependency_behavior.py @@ -66,4 +66,3 @@ def test_voice_modules_imports_without_voice_dependencies(): __import__("discord.voice.receive.reader") -# pre commit test trigger diff --git a/tests/voice/test_imports.py b/tests/voice/test_imports.py index 86ca18a787..12a86262d6 100644 --- a/tests/voice/test_imports.py +++ b/tests/voice/test_imports.py @@ -55,4 +55,3 @@ def test_voice_modules_import_with_voice_extra(): __import__("discord.voice.receive.reader") -# pre commit test trigger diff --git a/tests/voice/test_player.py b/tests/voice/test_player.py index eb568db71a..df9d01c65a 100644 --- a/tests/voice/test_player.py +++ b/tests/voice/test_player.py @@ -52,4 +52,3 @@ def test_audio_player_resume_preserves_played_frames(): assert player.played_frames() == 75 -# pre commit test trigger diff --git a/tests/voice/test_wait_finish.py b/tests/voice/test_wait_finish.py index 3490ba684d..69e26cf1f7 100644 --- a/tests/voice/test_wait_finish.py +++ b/tests/voice/test_wait_finish.py @@ -113,4 +113,3 @@ def __init__(self, *args, **kwargs) -> None: loop.close() -# pre commit test trigger From fdcbf9718fdc4765dc8911270c09bbe4f6bdeeeb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 11:39:30 +0000 Subject: [PATCH 21/21] style(pre-commit): auto fixes from pre-commit.com hooks --- discord/abc.py | 2 -- discord/activity.py | 2 -- discord/appinfo.py | 2 -- discord/application_role_connection.py | 2 -- discord/asset.py | 2 -- discord/audit_logs.py | 2 -- discord/automod.py | 2 -- discord/backoff.py | 2 -- discord/bot.py | 2 -- discord/channel.py | 2 -- discord/client.py | 2 -- discord/cog.py | 2 -- discord/collectibles.py | 2 -- discord/commands/__init__.py | 1 - discord/commands/context.py | 2 -- discord/commands/core.py | 2 -- discord/commands/options.py | 2 -- discord/commands/permissions.py | 2 -- discord/components.py | 2 -- discord/context_managers.py | 2 -- discord/embeds.py | 2 -- discord/emoji.py | 2 -- discord/enums.py | 2 -- discord/errors.py | 2 -- discord/ext/bridge/__init__.py | 1 - discord/ext/bridge/bot.py | 2 -- discord/ext/bridge/core.py | 2 -- discord/ext/commands/__init__.py | 1 - discord/ext/commands/bot.py | 2 -- discord/ext/commands/cog.py | 2 -- discord/ext/commands/context.py | 2 -- discord/ext/commands/converter.py | 2 -- discord/ext/commands/cooldowns.py | 2 -- discord/ext/commands/core.py | 2 -- discord/ext/commands/errors.py | 2 -- discord/ext/commands/flags.py | 2 -- discord/ext/commands/help.py | 2 -- discord/ext/commands/view.py | 2 -- discord/ext/pages/__init__.py | 1 - discord/ext/pages/pagination.py | 2 -- discord/ext/tasks/__init__.py | 2 -- discord/file.py | 2 -- discord/flags.py | 2 -- discord/gateway.py | 2 -- discord/guild.py | 2 -- discord/http.py | 2 -- discord/incidents.py | 2 -- discord/integrations.py | 2 -- discord/interactions.py | 2 -- discord/invite.py | 2 -- discord/iterators.py | 2 -- discord/member.py | 2 -- discord/mentions.py | 2 -- discord/message.py | 2 -- discord/mixins.py | 2 -- discord/monetization.py | 2 -- discord/object.py | 2 -- discord/oggparse.py | 2 -- discord/onboarding.py | 2 -- discord/opus.py | 2 -- discord/partial_emoji.py | 2 -- discord/permissions.py | 2 -- discord/player.py | 2 -- discord/poll.py | 2 -- discord/primary_guild.py | 2 -- discord/raw_models.py | 2 -- discord/reaction.py | 2 -- discord/role.py | 2 -- discord/scheduled_events.py | 2 -- discord/shard.py | 2 -- discord/sinks/__init__.py | 1 - discord/sinks/core.py | 2 -- discord/sinks/errors.py | 2 -- discord/sinks/m4a.py | 2 -- discord/sinks/mka.py | 2 -- discord/sinks/mkv.py | 2 -- discord/sinks/mp3.py | 2 -- discord/sinks/mp4.py | 2 -- discord/sinks/ogg.py | 2 -- discord/sinks/pcm.py | 2 -- discord/sinks/wave.py | 2 -- discord/soundboard.py | 2 -- discord/stage_instance.py | 2 -- discord/state.py | 2 -- discord/sticker.py | 2 -- discord/team.py | 2 -- discord/template.py | 2 -- discord/threads.py | 2 -- discord/types/__init__.py | 1 - discord/types/activity.py | 2 -- discord/types/appinfo.py | 2 -- discord/types/application_role_connection.py | 2 -- discord/types/audit_log.py | 2 -- discord/types/automod.py | 2 -- discord/types/channel.py | 2 -- discord/types/collectibles.py | 2 -- discord/types/embed.py | 2 -- discord/types/emoji.py | 2 -- discord/types/gateway.py | 2 -- discord/types/guild.py | 2 -- discord/types/interactions.py | 2 -- discord/types/invite.py | 2 -- discord/types/member.py | 2 -- discord/types/message.py | 2 -- discord/types/monetization.py | 2 -- discord/types/onboarding.py | 2 -- discord/types/poll.py | 2 -- discord/types/primary_guild.py | 2 -- discord/types/raw_models.py | 2 -- discord/types/role.py | 2 -- discord/types/scheduled_events.py | 2 -- discord/types/soundboard.py | 2 -- discord/types/sticker.py | 2 -- discord/types/team.py | 2 -- discord/types/template.py | 2 -- discord/types/threads.py | 2 -- discord/types/user.py | 2 -- discord/types/voice.py | 2 -- discord/types/webhook.py | 2 -- discord/types/welcome_screen.py | 2 -- discord/types/widget.py | 2 -- discord/ui/__init__.py | 1 - discord/ui/action_row.py | 2 -- discord/ui/button.py | 2 -- discord/ui/checkbox.py | 2 -- discord/ui/checkbox_group.py | 2 -- discord/ui/container.py | 2 -- discord/ui/core.py | 2 -- discord/ui/file.py | 2 -- discord/ui/file_upload.py | 2 -- discord/ui/item.py | 2 -- discord/ui/label.py | 2 -- discord/ui/media_gallery.py | 2 -- discord/ui/modal.py | 2 -- discord/ui/radio_group.py | 2 -- discord/ui/section.py | 2 -- discord/ui/select.py | 2 -- discord/ui/separator.py | 2 -- discord/ui/text_display.py | 2 -- discord/ui/thumbnail.py | 2 -- discord/ui/view.py | 2 -- discord/user.py | 2 -- discord/utils.py | 2 -- discord/voice/__init__.py | 1 - discord/voice/_types.py | 2 -- discord/voice/client.py | 2 -- discord/voice/enums.py | 2 -- discord/voice/gateway.py | 2 -- discord/voice/packets/__init__.py | 2 -- discord/voice/packets/core.py | 2 -- discord/voice/receive/reader.py | 2 -- discord/voice/receive/router.py | 2 -- discord/voice/state.py | 2 -- discord/voice/utils/buffer.py | 2 -- discord/voice/utils/multidataevent.py | 2 -- discord/voice/utils/wrapped.py | 2 -- discord/webhook/__init__.py | 1 - discord/webhook/async_.py | 2 -- discord/webhook/sync.py | 2 -- discord/welcome_screen.py | 2 -- discord/widget.py | 2 -- docs/extensions/attributetable.py | 2 -- docs/extensions/exception_hierarchy.py | 2 -- docs/extensions/nitpick_file_ignorer.py | 2 -- docs/extensions/resourcelinks.py | 2 -- tests/voice/test_dependency_behavior.py | 2 -- tests/voice/test_imports.py | 2 -- tests/voice/test_player.py | 2 -- tests/voice/test_wait_finish.py | 2 -- 169 files changed, 329 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index 804bf116d2..0d49647911 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -2097,5 +2097,3 @@ async def connect( class Mentionable: # TODO: documentation, methods if needed pass - - diff --git a/discord/activity.py b/discord/activity.py index 30e1a1f91e..81128a5fb0 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -879,5 +879,3 @@ def create_activity(data: ActivityPayload | None) -> ActivityTypes | None: ): return Spotify(**data) return Activity(**data) - - diff --git a/discord/appinfo.py b/discord/appinfo.py index 64d33fbf56..943b6d7468 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -648,5 +648,3 @@ def _to_payload(self) -> dict[int, dict[str, dict[str, Any]] | None]: if self.user is not utils.MISSING: payload[1] = self._encode_install_params(self.user) return payload - - diff --git a/discord/application_role_connection.py b/discord/application_role_connection.py index b547a1acda..6cf9bd9acb 100644 --- a/discord/application_role_connection.py +++ b/discord/application_role_connection.py @@ -126,5 +126,3 @@ def to_dict(self) -> ApplicationRoleConnectionMetadataPayload: if self.description_localizations is not MISSING: data["description_localizations"] = self.description_localizations return data - - diff --git a/discord/asset.py b/discord/asset.py index a8a872f6f1..659d6dd5eb 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -524,5 +524,3 @@ def with_static_format(self, format: ValidStaticFormatTypes, /) -> Asset: if self._animated: return self return self.with_format(format) - - diff --git a/discord/audit_logs.py b/discord/audit_logs.py index 51bc19e400..e944149fd6 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -718,5 +718,3 @@ def _convert_target_scheduled_event( self, target_id: int ) -> ScheduledEvent | Object: return self.guild.get_scheduled_event(target_id) or Object(id=target_id) - - diff --git a/discord/automod.py b/discord/automod.py index e9186d16d2..5f2e7de920 100644 --- a/discord/automod.py +++ b/discord/automod.py @@ -558,5 +558,3 @@ async def edit( self.guild_id, self.id, payload, reason=reason ) return AutoModRule(state=self._state, data=data) - - diff --git a/discord/backoff.py b/discord/backoff.py index ea16a3df56..078f14e218 100644 --- a/discord/backoff.py +++ b/discord/backoff.py @@ -100,5 +100,3 @@ def delay(self) -> int | float: self._exp = min(self._exp + 1, self._max) return self._randfunc(0, self._base * 2**self._exp) - - diff --git a/discord/bot.py b/discord/bot.py index c694a6a976..0910f5d46e 100644 --- a/discord/bot.py +++ b/discord/bot.py @@ -1681,5 +1681,3 @@ class AutoShardedBot(BotBase, AutoShardedClient): @property def _bot(self) -> AutoShardedBot: return self - - diff --git a/discord/channel.py b/discord/channel.py index 49da32ff12..dab70c4a92 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3644,5 +3644,3 @@ def _threaded_guild_channel_factory(channel_type: int): ): return Thread, value return cls, value - - diff --git a/discord/client.py b/discord/client.py index f1860b0b13..3bc99d533e 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2382,5 +2382,3 @@ async def fetch_default_sounds(self) -> list[SoundboardSound]: SoundboardSound(http=self.http, state=self._connection, data=s) for s in data ] - - diff --git a/discord/cog.py b/discord/cog.py index 0e4dfb9335..d514e1febf 100644 --- a/discord/cog.py +++ b/discord/cog.py @@ -1164,5 +1164,3 @@ def reload_extension(self, name: str, *, package: str | None = None) -> None: def extensions(self) -> Mapping[str, types.ModuleType]: """A read-only mapping of extension name to extension.""" return types.MappingProxyType(self.__extensions) - - diff --git a/discord/collectibles.py b/discord/collectibles.py index 3b0f33a8cf..6c18d1a0a8 100644 --- a/discord/collectibles.py +++ b/discord/collectibles.py @@ -134,5 +134,3 @@ def animated_asset(self) -> Asset: .. versionadded:: 2.7 """ return Asset._from_collectible(self._state, self._asset, animated=True) - - diff --git a/discord/commands/__init__.py b/discord/commands/__init__.py index a5591f75d1..1813faf3dc 100644 --- a/discord/commands/__init__.py +++ b/discord/commands/__init__.py @@ -27,4 +27,3 @@ from .core import * from .options import * from .permissions import * - diff --git a/discord/commands/context.py b/discord/commands/context.py index 41f0ea75db..b7206d0946 100644 --- a/discord/commands/context.py +++ b/discord/commands/context.py @@ -474,5 +474,3 @@ def command(self) -> ApplicationCommand | None: @command.setter def command(self, value: ApplicationCommand | None) -> None: self.interaction.command = value - - diff --git a/discord/commands/core.py b/discord/commands/core.py index 550ad42ffb..e2354e64ad 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -2301,5 +2301,3 @@ def validate_chat_input_description(description: Any, locale: str | None = None) if locale: error.args = (f"{error.args[0]} in locale {locale}",) raise error - - diff --git a/discord/commands/options.py b/discord/commands/options.py index 5d6bb57956..a7d7d682ce 100644 --- a/discord/commands/options.py +++ b/discord/commands/options.py @@ -554,5 +554,3 @@ def decorator(func): return func return decorator - - diff --git a/discord/commands/permissions.py b/discord/commands/permissions.py index 3782967ad3..c1ed4f481e 100644 --- a/discord/commands/permissions.py +++ b/discord/commands/permissions.py @@ -137,5 +137,3 @@ def inner(command: Callable): return command return inner - - diff --git a/discord/components.py b/discord/components.py index f3177b5f3e..53aa06de6e 100644 --- a/discord/components.py +++ b/discord/components.py @@ -1822,5 +1822,3 @@ def _component_factory(data: ComponentPayload, state=None) -> Component: else: as_enum = try_enum(ComponentType, component_type) return Component._raw_construct(type=as_enum) - - diff --git a/discord/context_managers.py b/discord/context_managers.py index 5261e8aa4b..9f1a282b3f 100644 --- a/discord/context_managers.py +++ b/discord/context_managers.py @@ -88,5 +88,3 @@ async def __aexit__( traceback: TracebackType | None, ) -> None: self.task.cancel() - - diff --git a/discord/embeds.py b/discord/embeds.py index 5e630b8758..57f4c89302 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -1078,5 +1078,3 @@ def to_dict(self) -> EmbedData: result["title"] = self.title return result # type: ignore - - diff --git a/discord/emoji.py b/discord/emoji.py index 1e2e4bb983..b87f193aeb 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -434,5 +434,3 @@ async def edit( self.application_id, self.id, payload=payload ) return self._state.maybe_store_app_emoji(self.application_id, data) - - diff --git a/discord/enums.py b/discord/enums.py index 18bba363fa..5011a338c2 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -1231,5 +1231,3 @@ def try_enum(cls: type[T], val: Any) -> T: return cls._enum_value_map_[val] # type: ignore except (KeyError, TypeError, AttributeError): return create_unknown_value(cls, val) - - diff --git a/discord/errors.py b/discord/errors.py index 01181a6260..5e94e0279c 100644 --- a/discord/errors.py +++ b/discord/errors.py @@ -432,5 +432,3 @@ def __init__(self, missing: tuple[str, ...]) -> None: f"{deps} {'is' if len(missing) == 1 else 'are'} required for voice support. " 'Install them with "pip install py-cord[voice]".' ) - - diff --git a/discord/ext/bridge/__init__.py b/discord/ext/bridge/__init__.py index 5552db84fb..b92a536e82 100644 --- a/discord/ext/bridge/__init__.py +++ b/discord/ext/bridge/__init__.py @@ -26,4 +26,3 @@ from .bot import * from .context import * from .core import * - diff --git a/discord/ext/bridge/bot.py b/discord/ext/bridge/bot.py index d92b50f737..9e2c619fa6 100644 --- a/discord/ext/bridge/bot.py +++ b/discord/ext/bridge/bot.py @@ -202,5 +202,3 @@ class AutoShardedBot(BotBase, ExtAutoShardedBot): .. versionadded:: 2.0 """ - - diff --git a/discord/ext/bridge/core.py b/discord/ext/bridge/core.py index edbcbfe57c..4bf6b2cfac 100644 --- a/discord/ext/bridge/core.py +++ b/discord/ext/bridge/core.py @@ -687,5 +687,3 @@ def decorator(func): return func return decorator - - diff --git a/discord/ext/commands/__init__.py b/discord/ext/commands/__init__.py index 4781f131b3..b13b484c68 100644 --- a/discord/ext/commands/__init__.py +++ b/discord/ext/commands/__init__.py @@ -17,4 +17,3 @@ from .errors import * from .flags import * from .help import * - diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 8501814335..0b050a7b8f 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -456,5 +456,3 @@ class AutoShardedBot(BotBase, discord.AutoShardedBot): """This is similar to :class:`.Bot` except that it is inherited from :class:`discord.AutoShardedBot` instead. """ - - diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index 919e62815a..ac93818475 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -84,5 +84,3 @@ def get_commands(self) -> list[ApplicationCommand | Command]: This does not include subcommands. """ return [c for c in self.__cog_commands__ if c.parent is None] - - diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index 35964aa2a1..11e2216fce 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -409,5 +409,3 @@ async def forward_to( self, channel: discord.abc.Messageable, **kwargs: Any ) -> Message: return await self.message.forward_to(channel, **kwargs) - - diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 2a00fc4373..62e671d79c 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -1266,5 +1266,3 @@ async def run_converters( converter = origin return await _actual_conversion(ctx, converter, argument, param) - - diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index e8b30275b6..c2fe07b702 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -408,5 +408,3 @@ async def release(self, message: Message) -> None: if sem.value >= self.number and not sem.is_active(): del self._mapping[key] - - diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 62173774a8..d910a175d5 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -2500,5 +2500,3 @@ def decorator(func: Command | CoroFunc) -> Command | CoroFunc: return func return decorator # type: ignore - - diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py index ac2c2ece4e..8263af7150 100644 --- a/discord/ext/commands/errors.py +++ b/discord/ext/commands/errors.py @@ -1021,5 +1021,3 @@ class MissingFlagArgument(FlagError): def __init__(self, flag: Flag) -> None: self.flag: Flag = flag super().__init__(f"Flag {flag.name!r} does not have an argument") - - diff --git a/discord/ext/commands/flags.py b/discord/ext/commands/flags.py index b458d31edd..2606565857 100644 --- a/discord/ext/commands/flags.py +++ b/discord/ext/commands/flags.py @@ -700,5 +700,3 @@ async def convert(cls: type[F], ctx: Context, argument: str) -> F: setattr(self, flag.attribute, values) return self - - diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index d15d85916f..75dc6861f4 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -1410,5 +1410,3 @@ async def send_command_help(self, command): self.add_command_formatting(command) self.paginator.close_page() await self.send_pages() - - diff --git a/discord/ext/commands/view.py b/discord/ext/commands/view.py index 7ee44b138e..c8c7cd197b 100644 --- a/discord/ext/commands/view.py +++ b/discord/ext/commands/view.py @@ -198,5 +198,3 @@ def __repr__(self): f"" ) - - diff --git a/discord/ext/pages/__init__.py b/discord/ext/pages/__init__.py index c7562a8a3e..3ad7783499 100644 --- a/discord/ext/pages/__init__.py +++ b/discord/ext/pages/__init__.py @@ -8,4 +8,3 @@ """ from .pagination import * - diff --git a/discord/ext/pages/pagination.py b/discord/ext/pages/pagination.py index d8fbd51977..5509f7a177 100644 --- a/discord/ext/pages/pagination.py +++ b/discord/ext/pages/pagination.py @@ -1337,5 +1337,3 @@ async def callback(self, interaction: discord.Interaction): trigger_on_display=page_group.trigger_on_display, interaction=interaction, ) - - diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 0a6ecdfcc9..c1d1e72274 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -856,5 +856,3 @@ def decorator(func: LF) -> Loop[LF]: ) return decorator - - diff --git a/discord/file.py b/discord/file.py index bc7a7ac39a..f1f99ddc11 100644 --- a/discord/file.py +++ b/discord/file.py @@ -204,5 +204,3 @@ def __init__( super().__init__(fp, filename, **kwargs) self.waveform = waveform self.duration_secs = duration_secs - - diff --git a/discord/flags.py b/discord/flags.py index 503a4a41e7..ace2060a59 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -1839,5 +1839,3 @@ class RoleFlags(BaseFlags): def in_prompt(self): """:class:`bool`: Returns ``True`` if the role is selectable in one of the guild's :class:`~discord.OnboardingPrompt`.""" return 1 << 0 - - diff --git a/discord/gateway.py b/discord/gateway.py index 83bae75304..b9b28f887d 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -779,5 +779,3 @@ async def close(self, code: int = 4000) -> None: self._close_code = code await self.socket.close(code=code) - - diff --git a/discord/guild.py b/discord/guild.py index 77062ccdff..c94ea702ec 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -4719,5 +4719,3 @@ def get_sound(self, sound_id: int) -> SoundboardSound | None: The sound or ``None`` if not found. """ return self._sounds.get(sound_id) - - diff --git a/discord/http.py b/discord/http.py index 69f26d13db..40ebcd7c1f 100644 --- a/discord/http.py +++ b/discord/http.py @@ -3385,5 +3385,3 @@ def send_soundboard_sound( ), json=payload, ) - - diff --git a/discord/incidents.py b/discord/incidents.py index 9809a5b561..a7ca3ef69b 100644 --- a/discord/incidents.py +++ b/discord/incidents.py @@ -85,5 +85,3 @@ def to_dict(self) -> IncidentsDataPayload: "raid_detected_at": self.raid_detected_at and self.raid_detected_at.isoformat(), } - - diff --git a/discord/integrations.py b/discord/integrations.py index 263e82866a..f5d67faad8 100644 --- a/discord/integrations.py +++ b/discord/integrations.py @@ -372,5 +372,3 @@ def _integration_factory(value: str) -> tuple[type[Integration], str]: return StreamIntegration, value else: return Integration, value - - diff --git a/discord/interactions.py b/discord/interactions.py index 55c42193e1..f6af21d733 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -1941,5 +1941,3 @@ def is_ephemeral(self) -> bool: This might be useful for determining if the message was forced to be ephemeral. """ return self._response_message_ephemeral - - diff --git a/discord/invite.py b/discord/invite.py index e8631740ee..198f0987bf 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -816,5 +816,3 @@ def set_scheduled_event(self, event: ScheduledEvent) -> None: The scheduled event object to link. """ self.scheduled_event = event - - diff --git a/discord/iterators.py b/discord/iterators.py index 1ed094374f..50fdc6d2a3 100644 --- a/discord/iterators.py +++ b/discord/iterators.py @@ -1297,5 +1297,3 @@ async def retrieve_inner(self) -> list[Message]: ) def __await__(self) -> Generator[Any, Any, list[Message]]: return self.retrieve_inner().__await__() - - diff --git a/discord/member.py b/discord/member.py index 4dbd5c9ecb..915f42595c 100644 --- a/discord/member.py +++ b/discord/member.py @@ -1310,5 +1310,3 @@ def get_role(self, role_id: int, /) -> Role | None: The role or ``None`` if not found in the member's roles. """ return self.guild.get_role(role_id) if self._roles.has(role_id) else None - - diff --git a/discord/mentions.py b/discord/mentions.py index 3d37f0cd71..3323c67856 100644 --- a/discord/mentions.py +++ b/discord/mentions.py @@ -156,5 +156,3 @@ def __repr__(self) -> str: f"{self.__class__.__name__}(everyone={self.everyone}, " f"users={self.users}, roles={self.roles}, replied_user={self.replied_user})" ) - - diff --git a/discord/message.py b/discord/message.py index 37d6c7c5d3..e1633aa97e 100644 --- a/discord/message.py +++ b/discord/message.py @@ -2619,5 +2619,3 @@ async def end_poll(self) -> Message: message = self._state.create_message(channel=self.channel, data=data) return message - - diff --git a/discord/mixins.py b/discord/mixins.py index 67d2ba90e2..acf451361d 100644 --- a/discord/mixins.py +++ b/discord/mixins.py @@ -46,5 +46,3 @@ class Hashable(EqualityComparable): def __hash__(self) -> int: return self.id >> 22 - - diff --git a/discord/monetization.py b/discord/monetization.py index e93632384c..9244c2dcdf 100644 --- a/discord/monetization.py +++ b/discord/monetization.py @@ -348,5 +348,3 @@ def __eq__(self, other: object) -> bool: def user(self): """Optional[:class:`User`]: The user that owns this subscription.""" return self._state.get_user(self.user_id) - - diff --git a/discord/object.py b/discord/object.py index 13fd9eaac7..fd684069d8 100644 --- a/discord/object.py +++ b/discord/object.py @@ -109,5 +109,3 @@ def process_id(self) -> int: def increment_id(self) -> int: """Returns the increment id that made the snowflake.""" return self.id & 0xFFF - - diff --git a/discord/oggparse.py b/discord/oggparse.py index 5f4156a674..70dc7f2e25 100644 --- a/discord/oggparse.py +++ b/discord/oggparse.py @@ -121,5 +121,3 @@ def iter_packets(self) -> Generator[bytes]: if complete: yield partial partial = b"" - - diff --git a/discord/onboarding.py b/discord/onboarding.py index 7edc518bfa..4e4fa7e993 100644 --- a/discord/onboarding.py +++ b/discord/onboarding.py @@ -481,5 +481,3 @@ async def delete_prompt( prompts = self.prompts[:] prompts.remove(to_delete) return await self.edit(prompts=prompts, reason=reason) - - diff --git a/discord/opus.py b/discord/opus.py index ba0e562906..35f3e665aa 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -732,5 +732,3 @@ def _decode_packet(self, packet: Packet) -> tuple[Packet, bytes]: pcm = dave.decrypt(user_id, davey.MediaType.audio, pcm) return packet, pcm - - diff --git a/discord/partial_emoji.py b/discord/partial_emoji.py index 74b16a512f..acf1095eb8 100644 --- a/discord/partial_emoji.py +++ b/discord/partial_emoji.py @@ -263,5 +263,3 @@ async def read(self) -> bytes: raise InvalidArgument("PartialEmoji is not a custom emoji") return await super().read() - - diff --git a/discord/permissions.py b/discord/permissions.py index c670543837..3d3ce83c9c 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -899,5 +899,3 @@ def update(self, **kwargs: bool | None) -> None: def __iter__(self) -> Iterator[tuple[str, bool | None]]: for key in self.PURE_FLAGS: yield key, self._values.get(key) - - diff --git a/discord/player.py b/discord/player.py index 4e045492d0..007bd7e8d7 100644 --- a/discord/player.py +++ b/discord/player.py @@ -943,5 +943,3 @@ def send_silence(self, count: int = 5) -> None: def played_frames(self) -> int: return self._played_frames_offset + self.loops - - diff --git a/discord/poll.py b/discord/poll.py index fd154437e5..fd9ce2344d 100644 --- a/discord/poll.py +++ b/discord/poll.py @@ -527,5 +527,3 @@ async def end(self) -> Message: raise RuntimeError("You can only end a poll received from a message.") return await self._message.end_poll() - - diff --git a/discord/primary_guild.py b/discord/primary_guild.py index 18f7224455..645d3be65b 100644 --- a/discord/primary_guild.py +++ b/discord/primary_guild.py @@ -96,5 +96,3 @@ def badge(self) -> Asset | None: return Asset._from_user_primary_guild_tag( self._state, self.identity_guild_id, self._badge ) - - diff --git a/discord/raw_models.py b/discord/raw_models.py index 7cc83dcc35..291a44fadc 100644 --- a/discord/raw_models.py +++ b/discord/raw_models.py @@ -1030,5 +1030,3 @@ def __init__(self, data: MemberUpdateEvent, member: Member) -> None: self.data: MemberUpdateEvent = data self.cached_member: Member | None = None self.member: Member = member - - diff --git a/discord/reaction.py b/discord/reaction.py index a190e68e8b..418b0e3060 100644 --- a/discord/reaction.py +++ b/discord/reaction.py @@ -294,5 +294,3 @@ class ReactionCountDetails: def __init__(self, data: ReactionCountDetailsPayload): self.normal = data.get("normal", 0) self.burst = data.get("burst", 0) - - diff --git a/discord/role.py b/discord/role.py index 3c9463dd96..e7d24a6f83 100644 --- a/discord/role.py +++ b/discord/role.py @@ -933,5 +933,3 @@ async def delete(self, *, reason: str | None = None) -> None: """ await self._state.http.delete_role(self.guild.id, self.id, reason=reason) - - diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py index eb58dccbf6..7e339dcee7 100644 --- a/discord/scheduled_events.py +++ b/discord/scheduled_events.py @@ -576,5 +576,3 @@ def subscribers( return ScheduledEventSubscribersIterator( event=self, limit=limit, with_member=as_member, before=before, after=after ) - - diff --git a/discord/shard.py b/discord/shard.py index c183d2f741..6d5dfc4dbf 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -585,5 +585,3 @@ def is_ws_ratelimited(self) -> bool: .. versionadded:: 1.6 """ return any(shard.ws.is_ratelimited() for shard in self.__shards.values()) - - diff --git a/discord/sinks/__init__.py b/discord/sinks/__init__.py index c4289d19b3..6db5209af0 100644 --- a/discord/sinks/__init__.py +++ b/discord/sinks/__init__.py @@ -18,4 +18,3 @@ from .ogg import * from .pcm import * from .wave import * - diff --git a/discord/sinks/core.py b/discord/sinks/core.py index c15aa2d417..d22969a675 100644 --- a/discord/sinks/core.py +++ b/discord/sinks/core.py @@ -248,5 +248,3 @@ def get_all_audio(self): def get_user_audio(self, user: snowflake.Snowflake): """Gets the audio file(s) of one specific user.""" return os.path.realpath(self.audio_data.pop(user)) - - diff --git a/discord/sinks/errors.py b/discord/sinks/errors.py index bbd79aba12..5f036efff5 100644 --- a/discord/sinks/errors.py +++ b/discord/sinks/errors.py @@ -87,5 +87,3 @@ class MKASinkError(SinkException): .. versionadded:: 2.0 """ - - diff --git a/discord/sinks/m4a.py b/discord/sinks/m4a.py index dc2900c2e1..1cff9da538 100644 --- a/discord/sinks/m4a.py +++ b/discord/sinks/m4a.py @@ -101,5 +101,3 @@ def format_audio(self, audio): os.remove(m4a_file) audio.on_format(self.encoding) - - diff --git a/discord/sinks/mka.py b/discord/sinks/mka.py index 007b046db8..c2bbefb923 100644 --- a/discord/sinks/mka.py +++ b/discord/sinks/mka.py @@ -94,5 +94,3 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) - - diff --git a/discord/sinks/mkv.py b/discord/sinks/mkv.py index 3fa0a4017c..93f4cc7444 100644 --- a/discord/sinks/mkv.py +++ b/discord/sinks/mkv.py @@ -93,5 +93,3 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) - - diff --git a/discord/sinks/mp3.py b/discord/sinks/mp3.py index 6eae89026f..74386a2738 100644 --- a/discord/sinks/mp3.py +++ b/discord/sinks/mp3.py @@ -94,5 +94,3 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) - - diff --git a/discord/sinks/mp4.py b/discord/sinks/mp4.py index 895effccc8..c4d0ed2b63 100644 --- a/discord/sinks/mp4.py +++ b/discord/sinks/mp4.py @@ -101,5 +101,3 @@ def format_audio(self, audio): os.remove(mp4_file) audio.on_format(self.encoding) - - diff --git a/discord/sinks/ogg.py b/discord/sinks/ogg.py index 10b4833ed6..7b531464bd 100644 --- a/discord/sinks/ogg.py +++ b/discord/sinks/ogg.py @@ -94,5 +94,3 @@ def format_audio(self, audio): out.seek(0) audio.file = out audio.on_format(self.encoding) - - diff --git a/discord/sinks/pcm.py b/discord/sinks/pcm.py index 0d09b850d3..c587da349a 100644 --- a/discord/sinks/pcm.py +++ b/discord/sinks/pcm.py @@ -43,5 +43,3 @@ def __init__(self, *, filters=None): def format_audio(self, audio): return - - diff --git a/discord/sinks/wave.py b/discord/sinks/wave.py index f31286ef90..37f5aac933 100644 --- a/discord/sinks/wave.py +++ b/discord/sinks/wave.py @@ -67,5 +67,3 @@ def format_audio(self, audio): data.seek(0) audio.on_format(self.encoding) - - diff --git a/discord/soundboard.py b/discord/soundboard.py index 8c91290026..7ef8def8e3 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -268,5 +268,3 @@ def delete(self, *, reason: str | None = None) -> Coroutine[Any, Any, None]: @override def __repr__(self) -> str: return f"" - - diff --git a/discord/stage_instance.py b/discord/stage_instance.py index f92329400a..8864a2f59a 100644 --- a/discord/stage_instance.py +++ b/discord/stage_instance.py @@ -197,5 +197,3 @@ async def delete(self, *, reason: str | None = None) -> None: Deleting the stage instance failed. """ await self._state.http.delete_stage_instance(self.channel_id, reason=reason) - - diff --git a/discord/state.py b/discord/state.py index cd3562454c..0662fc64d2 100644 --- a/discord/state.py +++ b/discord/state.py @@ -2287,5 +2287,3 @@ def parse_ready(self, data) -> None: def parse_resumed(self, data) -> None: self.dispatch("resumed") self.dispatch("shard_resumed", data["__shard_id__"]) - - diff --git a/discord/sticker.py b/discord/sticker.py index 7e66776eca..78b4b8c1f4 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -552,5 +552,3 @@ def _sticker_factory( return GuildSticker, value else: return Sticker, value - - diff --git a/discord/team.py b/discord/team.py index 0a61fef333..87773ba49a 100644 --- a/discord/team.py +++ b/discord/team.py @@ -178,5 +178,3 @@ def __repr__(self) -> str: ) def permissions(self) -> list[str]: return [] - - diff --git a/discord/template.py b/discord/template.py index cbade06e6c..d4cdffb568 100644 --- a/discord/template.py +++ b/discord/template.py @@ -278,5 +278,3 @@ def url(self) -> str: .. versionadded:: 2.0 """ return f"https://discord.new/{self.code}" - - diff --git a/discord/threads.py b/discord/threads.py index c5c06bad1d..7d73331c1f 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -938,5 +938,3 @@ def _from_data(self, data: ThreadMemberPayload): def thread(self) -> Thread: """The thread this member belongs to.""" return self.parent - - diff --git a/discord/types/__init__.py b/discord/types/__init__.py index 1261a79089..79e1e68bb7 100644 --- a/discord/types/__init__.py +++ b/discord/types/__init__.py @@ -7,4 +7,3 @@ :copyright: (c) 2015-2021 Rapptz & (c) 2021-present Pycord Development :license: MIT, see LICENSE for more details. """ - diff --git a/discord/types/activity.py b/discord/types/activity.py index 9510a824b2..c19e9b18c1 100644 --- a/discord/types/activity.py +++ b/discord/types/activity.py @@ -109,5 +109,3 @@ class Activity(_BaseActivity, total=False): session_id: str | None instance: bool buttons: list[str] - - diff --git a/discord/types/appinfo.py b/discord/types/appinfo.py index 53f86e5673..8fdccf35f2 100644 --- a/discord/types/appinfo.py +++ b/discord/types/appinfo.py @@ -93,5 +93,3 @@ class AppInfo(BaseAppInfo, total=False): class PartialAppInfo(BaseAppInfo, total=False): pass - - diff --git a/discord/types/application_role_connection.py b/discord/types/application_role_connection.py index 55a545987b..cf797b8efa 100644 --- a/discord/types/application_role_connection.py +++ b/discord/types/application_role_connection.py @@ -38,5 +38,3 @@ class ApplicationRoleConnectionMetadata(TypedDict): name_localizations: NotRequired[dict[str, str]] description: str description_localizations: NotRequired[dict[str, str]] - - diff --git a/discord/types/audit_log.py b/discord/types/audit_log.py index 4a85fa1f4b..0575457e7a 100644 --- a/discord/types/audit_log.py +++ b/discord/types/audit_log.py @@ -294,5 +294,3 @@ class AuditLog(TypedDict): threads: list[Thread] scheduled_events: list[ScheduledEvent] auto_moderation_rules: list[AutoModRule] - - diff --git a/discord/types/automod.py b/discord/types/automod.py index 42c1f39c8b..0417e78497 100644 --- a/discord/types/automod.py +++ b/discord/types/automod.py @@ -89,5 +89,3 @@ class EditAutoModRule(TypedDict, total=False): enabled: bool exempt_roles: list[Snowflake] exempt_channels: list[Snowflake] - - diff --git a/discord/types/channel.py b/discord/types/channel.py index ea51cb58f0..d4661cf8c4 100644 --- a/discord/types/channel.py +++ b/discord/types/channel.py @@ -194,5 +194,3 @@ class VoiceChannelEffectSendEvent(TypedDict): animation_id: NotRequired[int] sound_id: NotRequired[Snowflake | int] sound_volume: NotRequired[float] - - diff --git a/discord/types/collectibles.py b/discord/types/collectibles.py index c10b8181a4..e655c6922c 100644 --- a/discord/types/collectibles.py +++ b/discord/types/collectibles.py @@ -43,5 +43,3 @@ class Nameplate(TypedDict): class AvatarDecoration(TypedDict): sku_id: Snowflake asset: str - - diff --git a/discord/types/embed.py b/discord/types/embed.py index 818f984f7e..7d39c1630d 100644 --- a/discord/types/embed.py +++ b/discord/types/embed.py @@ -101,5 +101,3 @@ class Embed(TypedDict, total=False): provider: EmbedProvider author: EmbedAuthor fields: list[EmbedField] - - diff --git a/discord/types/emoji.py b/discord/types/emoji.py index 3e4e49cf99..f4d7f64923 100644 --- a/discord/types/emoji.py +++ b/discord/types/emoji.py @@ -48,5 +48,3 @@ class Emoji(PartialEmoji, total=False): class EditEmoji(TypedDict): name: str roles: SnowflakeList | None - - diff --git a/discord/types/gateway.py b/discord/types/gateway.py index 400ca29824..42be89b337 100644 --- a/discord/types/gateway.py +++ b/discord/types/gateway.py @@ -40,5 +40,3 @@ class Gateway(TypedDict): class GatewayBot(Gateway): shards: int session_start_limit: SessionStartLimit - - diff --git a/discord/types/guild.py b/discord/types/guild.py index 9e3875b36f..3c71c8647e 100644 --- a/discord/types/guild.py +++ b/discord/types/guild.py @@ -210,5 +210,3 @@ class IncidentsData(TypedDict, total=False): class ModifyIncidents(TypedDict, total=False): invites_disabled_until: str | None dms_disabled_until: str | None - - diff --git a/discord/types/interactions.py b/discord/types/interactions.py index 147429247b..da1c345f64 100644 --- a/discord/types/interactions.py +++ b/discord/types/interactions.py @@ -294,5 +294,3 @@ class InteractionCallbackResource(TypedDict): # This is not fully typed as activities are out of scope activity_instance: NotRequired[dict] message: NotRequired[Message] - - diff --git a/discord/types/invite.py b/discord/types/invite.py index 2bd3eeb365..584b573094 100644 --- a/discord/types/invite.py +++ b/discord/types/invite.py @@ -104,5 +104,3 @@ class InviteTargetUsersJobStatus(TypedDict): created_at: NotRequired[str] completed_at: NotRequired[str | None] error_message: NotRequired[str] - - diff --git a/discord/types/member.py b/discord/types/member.py index 29ece598a2..ce582935d4 100644 --- a/discord/types/member.py +++ b/discord/types/member.py @@ -90,5 +90,3 @@ class MemberUpdateEvent(TypedDict): flags: NotRequired[int | None] avatar_decoration_data: NotRequired[AvatarDecoration | None] # collectibles: Collectibles - - diff --git a/discord/types/message.py b/discord/types/message.py index 614381e285..c6a48881c7 100644 --- a/discord/types/message.py +++ b/discord/types/message.py @@ -194,5 +194,3 @@ class AllowedMentions(TypedDict): roles: SnowflakeList users: SnowflakeList replied_user: bool - - diff --git a/discord/types/monetization.py b/discord/types/monetization.py index bd7625ab5b..13ed22ccc3 100644 --- a/discord/types/monetization.py +++ b/discord/types/monetization.py @@ -76,5 +76,3 @@ class Subscription(TypedDict): status: SubscriptionStatus canceled_at: str | None country: NotRequired[str] - - diff --git a/discord/types/onboarding.py b/discord/types/onboarding.py index 1988bb111e..31dda34ca8 100644 --- a/discord/types/onboarding.py +++ b/discord/types/onboarding.py @@ -63,5 +63,3 @@ class PromptOption(TypedDict): emoji_animated: NotRequired[bool] title: str description: str | None - - diff --git a/discord/types/poll.py b/discord/types/poll.py index d7be0bd085..ed747f93da 100644 --- a/discord/types/poll.py +++ b/discord/types/poll.py @@ -62,5 +62,3 @@ class Poll(TypedDict): allow_multiselect: bool layout_type: NotRequired[PollLayoutType] results: NotRequired[PollResults] - - diff --git a/discord/types/primary_guild.py b/discord/types/primary_guild.py index e163a20326..5ee6386cc3 100644 --- a/discord/types/primary_guild.py +++ b/discord/types/primary_guild.py @@ -34,5 +34,3 @@ class PrimaryGuild(TypedDict): identity_enabled: bool | None tag: str badge: str - - diff --git a/discord/types/raw_models.py b/discord/types/raw_models.py index 6c61e1f607..7ec8a446ca 100644 --- a/discord/types/raw_models.py +++ b/discord/types/raw_models.py @@ -165,5 +165,3 @@ class MessagePollVoteEvent(TypedDict): channel_id: Snowflake message_id: Snowflake answer_id: int - - diff --git a/discord/types/role.py b/discord/types/role.py index b57d05f5ff..5e672eb636 100644 --- a/discord/types/role.py +++ b/discord/types/role.py @@ -60,5 +60,3 @@ class RoleTags(TypedDict, total=False): premium_subscriber: NotRequired[Literal[None]] available_for_purchase: NotRequired[Literal[None]] guild_connections: NotRequired[Literal[None]] - - diff --git a/discord/types/scheduled_events.py b/discord/types/scheduled_events.py index c793c68ffb..9bb4ad0328 100644 --- a/discord/types/scheduled_events.py +++ b/discord/types/scheduled_events.py @@ -63,5 +63,3 @@ class ScheduledEventSubscriber(TypedDict): user_id: Snowflake user: User member: Member | None - - diff --git a/discord/types/soundboard.py b/discord/types/soundboard.py index b88d7b0248..9a4c19b0ed 100644 --- a/discord/types/soundboard.py +++ b/discord/types/soundboard.py @@ -40,5 +40,3 @@ class SoundboardSound(TypedDict): guild_id: NotRequired[Snowflake] user: NotRequired[User] available: bool - - diff --git a/discord/types/sticker.py b/discord/types/sticker.py index 2f4f8524fd..95945462e6 100644 --- a/discord/types/sticker.py +++ b/discord/types/sticker.py @@ -89,5 +89,3 @@ class EditGuildSticker(TypedDict, total=False): class ListPremiumStickerPacks(TypedDict): sticker_packs: list[StickerPack] - - diff --git a/discord/types/team.py b/discord/types/team.py index c3a100647d..466ef08cd4 100644 --- a/discord/types/team.py +++ b/discord/types/team.py @@ -44,5 +44,3 @@ class Team(TypedDict): owner_id: Snowflake members: list[TeamMember] icon: str | None - - diff --git a/discord/types/template.py b/discord/types/template.py index 47a958dc21..8561836ecc 100644 --- a/discord/types/template.py +++ b/discord/types/template.py @@ -49,5 +49,3 @@ class Template(TypedDict): source_guild_id: Snowflake serialized_source_guild: Guild is_dirty: bool | None - - diff --git a/discord/types/threads.py b/discord/types/threads.py index 08e623ef4d..447027183b 100644 --- a/discord/types/threads.py +++ b/discord/types/threads.py @@ -74,5 +74,3 @@ class ThreadPaginationPayload(TypedDict): threads: list[Thread] members: list[ThreadMember] has_more: bool - - diff --git a/discord/types/user.py b/discord/types/user.py index 6227cdf16a..2014286913 100644 --- a/discord/types/user.py +++ b/discord/types/user.py @@ -55,5 +55,3 @@ class User(PartialUser, total=False): public_flags: int primary_guild: PrimaryGuild collectibles: Collectibles - - diff --git a/discord/types/voice.py b/discord/types/voice.py index f7378ad24a..307f98cee3 100644 --- a/discord/types/voice.py +++ b/discord/types/voice.py @@ -87,5 +87,3 @@ class VoiceReady(TypedDict): port: int modes: list[SupportedModes] heartbeat_interval: int - - diff --git a/discord/types/webhook.py b/discord/types/webhook.py index 5dae67e24e..a312b30a41 100644 --- a/discord/types/webhook.py +++ b/discord/types/webhook.py @@ -63,5 +63,3 @@ class Webhook(PartialWebhook): avatar: NotRequired[str | None] channel_id: NotRequired[Snowflake] application_id: NotRequired[Snowflake | None] - - diff --git a/discord/types/welcome_screen.py b/discord/types/welcome_screen.py index e414f0d6ef..48dc4cbf93 100644 --- a/discord/types/welcome_screen.py +++ b/discord/types/welcome_screen.py @@ -40,5 +40,3 @@ class WelcomeScreenChannel(TypedDict): description: str emoji_id: Snowflake | None emoji_name: str | None - - diff --git a/discord/types/widget.py b/discord/types/widget.py index cfd99075db..d327fa58fb 100644 --- a/discord/types/widget.py +++ b/discord/types/widget.py @@ -62,5 +62,3 @@ class Widget(TypedDict): class WidgetSettings(TypedDict): enabled: bool channel_id: Snowflake | None - - diff --git a/discord/ui/__init__.py b/discord/ui/__init__.py index bf3f9f65cf..e4044b00ab 100644 --- a/discord/ui/__init__.py +++ b/discord/ui/__init__.py @@ -28,4 +28,3 @@ from .text_display import * from .thumbnail import * from .view import * - diff --git a/discord/ui/action_row.py b/discord/ui/action_row.py index c257f1f5d3..730a1b2905 100644 --- a/discord/ui/action_row.py +++ b/discord/ui/action_row.py @@ -434,5 +434,3 @@ def from_component(cls: type[A], component: ActionRowComponent) -> A: ) callback = None - - diff --git a/discord/ui/button.py b/discord/ui/button.py index 1661131227..a8ad878c38 100644 --- a/discord/ui/button.py +++ b/discord/ui/button.py @@ -418,5 +418,3 @@ def decorator(func: ItemCallbackType) -> ItemCallbackType: return func return decorator # type: ignore # lie to the type checkers, because after a View is instated, the button callback is converted into a Button instance - - diff --git a/discord/ui/checkbox.py b/discord/ui/checkbox.py index 60a3af079b..5915f9938d 100644 --- a/discord/ui/checkbox.py +++ b/discord/ui/checkbox.py @@ -135,5 +135,3 @@ def refresh_from_modal( self, interaction: Interaction, data: CheckboxComponentPayload ) -> None: return self.refresh_state(data) - - diff --git a/discord/ui/checkbox_group.py b/discord/ui/checkbox_group.py index e60b264468..ed155898ab 100644 --- a/discord/ui/checkbox_group.py +++ b/discord/ui/checkbox_group.py @@ -284,5 +284,3 @@ def refresh_from_modal( self, interaction: Interaction, data: CheckboxGroupComponentPayload ) -> None: return self.refresh_state(data) - - diff --git a/discord/ui/container.py b/discord/ui/container.py index 077573deb2..e35c05f7d6 100644 --- a/discord/ui/container.py +++ b/discord/ui/container.py @@ -441,5 +441,3 @@ def from_component(cls: type[C], component: ContainerComponent) -> C: ) callback = None - - diff --git a/discord/ui/core.py b/discord/ui/core.py index 9cfa1044cc..c98a2265aa 100644 --- a/discord/ui/core.py +++ b/discord/ui/core.py @@ -156,5 +156,3 @@ async def on_timeout(self) -> None: A callback that is called when this structure's timeout elapses without being explicitly stopped. """ - - diff --git a/discord/ui/file.py b/discord/ui/file.py index 059b869fb2..fd1109295d 100644 --- a/discord/ui/file.py +++ b/discord/ui/file.py @@ -148,5 +148,3 @@ def from_component(cls: type[F], component: FileComponent) -> F: ) callback = None - - diff --git a/discord/ui/file_upload.py b/discord/ui/file_upload.py index 783fddfa5c..784b8f6733 100644 --- a/discord/ui/file_upload.py +++ b/discord/ui/file_upload.py @@ -197,5 +197,3 @@ def from_component( required=component.required, id=component.id, ) - - diff --git a/discord/ui/item.py b/discord/ui/item.py index bb5db35f27..6236bb77fd 100644 --- a/discord/ui/item.py +++ b/discord/ui/item.py @@ -268,5 +268,3 @@ def modal(self) -> M | None: @modal.setter def modal(self, value) -> None: self._modal = value - - diff --git a/discord/ui/label.py b/discord/ui/label.py index c22e368db7..720b02b226 100644 --- a/discord/ui/label.py +++ b/discord/ui/label.py @@ -564,5 +564,3 @@ def from_component(cls: type[L], component: LabelComponent) -> L: id=component.id, description=component.description, ) - - diff --git a/discord/ui/media_gallery.py b/discord/ui/media_gallery.py index afd8078de4..98ad8c965a 100644 --- a/discord/ui/media_gallery.py +++ b/discord/ui/media_gallery.py @@ -177,5 +177,3 @@ def from_component(cls: type[M], component: MediaGalleryComponent) -> M: return cls(*component.items, id=component.id) callback = None - - diff --git a/discord/ui/modal.py b/discord/ui/modal.py index 62a6923243..bb5fabc8ee 100644 --- a/discord/ui/modal.py +++ b/discord/ui/modal.py @@ -526,5 +526,3 @@ async def dispatch(self, user_id: int, custom_id: str, interaction: Interaction) self.remove_modal(modal, user_id) except Exception as e: return await modal.on_error(e, interaction) - - diff --git a/discord/ui/radio_group.py b/discord/ui/radio_group.py index 1c08772bed..7a01501776 100644 --- a/discord/ui/radio_group.py +++ b/discord/ui/radio_group.py @@ -234,5 +234,3 @@ def refresh_from_modal( self, interaction: Interaction, data: RadioGroupComponentPayload ) -> None: return self.refresh_state(data) - - diff --git a/discord/ui/section.py b/discord/ui/section.py index a41afecd7a..f0a5f95ac0 100644 --- a/discord/ui/section.py +++ b/discord/ui/section.py @@ -357,5 +357,3 @@ def from_component(cls: type[S], component: SectionComponent) -> S: return cls(*items, accessory=accessory, id=component.id) callback = None - - diff --git a/discord/ui/select.py b/discord/ui/select.py index fb396539d7..df18c9385c 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -1179,5 +1179,3 @@ def channel_select( id=id, default_values=default_values, ) - - diff --git a/discord/ui/separator.py b/discord/ui/separator.py index bd6cb4277b..9277211f84 100644 --- a/discord/ui/separator.py +++ b/discord/ui/separator.py @@ -120,5 +120,3 @@ def from_component(cls: type[S], component: SeparatorComponent) -> S: ) callback = None - - diff --git a/discord/ui/text_display.py b/discord/ui/text_display.py index c05a8c1665..be5cc83324 100644 --- a/discord/ui/text_display.py +++ b/discord/ui/text_display.py @@ -108,5 +108,3 @@ def from_component(cls: type[T], component: TextDisplayComponent) -> T: return cls(component.content, id=component.id) callback = None - - diff --git a/discord/ui/thumbnail.py b/discord/ui/thumbnail.py index 1492d137ee..ea72969703 100644 --- a/discord/ui/thumbnail.py +++ b/discord/ui/thumbnail.py @@ -151,5 +151,3 @@ def from_component(cls: type[T], component: ThumbnailComponent) -> T: ) callback = None - - diff --git a/discord/ui/view.py b/discord/ui/view.py index af8a196f25..fdc478b868 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -1047,5 +1047,3 @@ def update_from_message(self, message_id: int, components: list[ComponentPayload _log.exception( f"Failed to refresh View {view} from Message {message_id} due to mismatched state. Items may not have complete data." ) - - diff --git a/discord/user.py b/discord/user.py index 7c4df21a45..32a0cfe2be 100644 --- a/discord/user.py +++ b/discord/user.py @@ -738,5 +738,3 @@ def entitlements( user_id=self.id, exclude_ended=exclude_ended, ) - - diff --git a/discord/utils.py b/discord/utils.py index 5d15e42f2d..8a8c4439b0 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -1688,5 +1688,3 @@ def _get_event_loop() -> asyncio.AbstractEventLoop: asyncio.set_event_loop(loop) return loop return asyncio.get_event_loop() - - diff --git a/discord/voice/__init__.py b/discord/voice/__init__.py index ae89eab51e..97fd59cf62 100644 --- a/discord/voice/__init__.py +++ b/discord/voice/__init__.py @@ -17,4 +17,3 @@ from ._types import * from .client import * from .packets import * - diff --git a/discord/voice/_types.py b/discord/voice/_types.py index e8dc5bd05f..1426e1d6e8 100644 --- a/discord/voice/_types.py +++ b/discord/voice/_types.py @@ -164,5 +164,3 @@ def cleanup(self) -> None: """ key, _ = self.channel._get_voice_client_key() self.client._connection._remove_voice_client(key) - - diff --git a/discord/voice/client.py b/discord/voice/client.py index 8104277cd4..01f59fbf32 100644 --- a/discord/voice/client.py +++ b/discord/voice/client.py @@ -808,5 +808,3 @@ def is_speaking(self, member: Member | User) -> bool | None: return None if self._reader: return self._reader.speaking_timer.get_speaking(ssrc) - - diff --git a/discord/voice/enums.py b/discord/voice/enums.py index 8fca52984c..76f78c768d 100644 --- a/discord/voice/enums.py +++ b/discord/voice/enums.py @@ -77,5 +77,3 @@ class ConnectionFlowState(Enum): got_websocket_ready = 6 got_ip_discovery = 7 connected = 8 - - diff --git a/discord/voice/gateway.py b/discord/voice/gateway.py index bc2e0e2c0d..7b2aa3a17d 100644 --- a/discord/voice/gateway.py +++ b/discord/voice/gateway.py @@ -519,5 +519,3 @@ async def send_dave_transition_ready(self, transition_id: int) -> None: }, } await self.send_as_json(payload) - - diff --git a/discord/voice/packets/__init__.py b/discord/voice/packets/__init__.py index cda9fa82ff..04104643af 100644 --- a/discord/voice/packets/__init__.py +++ b/discord/voice/packets/__init__.py @@ -61,5 +61,3 @@ def __init__( @property def opus(self) -> bytes | None: return self.packet.decrypted_data - - diff --git a/discord/voice/packets/core.py b/discord/voice/packets/core.py index c5fb729e8a..8fd82c232b 100644 --- a/discord/voice/packets/core.py +++ b/discord/voice/packets/core.py @@ -91,5 +91,3 @@ def is_silence(self) -> bool: def __hash__(self) -> int: return hash(self.data) - - diff --git a/discord/voice/receive/reader.py b/discord/voice/receive/reader.py index ff3993db86..bf3b88f6c6 100644 --- a/discord/voice/receive/reader.py +++ b/discord/voice/receive/reader.py @@ -575,5 +575,3 @@ def run(self) -> None: def stop(self) -> None: self._end_thread.set() - - diff --git a/discord/voice/receive/router.py b/discord/voice/receive/router.py index 83398cbee7..b7f2f28064 100644 --- a/discord/voice/receive/router.py +++ b/discord/voice/receive/router.py @@ -229,5 +229,3 @@ def _do_run(self) -> None: with self._lock: with self.reader.packet_router._lock: self._dispatch_to_listeners(event, *args, **kwargs) - - diff --git a/discord/voice/state.py b/discord/voice/state.py index 5ecb16ab43..e6d622df56 100644 --- a/discord/voice/state.py +++ b/discord/voice/state.py @@ -981,5 +981,3 @@ async def execute_dave_transition(self, transition: int) -> None: ) self.dave_pending_transition = None - - diff --git a/discord/voice/utils/buffer.py b/discord/voice/utils/buffer.py index 9abd9ca951..f12fb0ae6e 100644 --- a/discord/voice/utils/buffer.py +++ b/discord/voice/utils/buffer.py @@ -213,5 +213,3 @@ def reset(self) -> None: self._has_item.clear() self._prefill = self.prefill self._last_tx_seq = -1 - - diff --git a/discord/voice/utils/multidataevent.py b/discord/voice/utils/multidataevent.py index 91962f6387..e0079b5a54 100644 --- a/discord/voice/utils/multidataevent.py +++ b/discord/voice/utils/multidataevent.py @@ -77,5 +77,3 @@ def unregister(self, item: T) -> None: def clear(self) -> None: self._items.clear() self._ready.clear() - - diff --git a/discord/voice/utils/wrapped.py b/discord/voice/utils/wrapped.py index 5786f45004..fb2aafc630 100644 --- a/discord/voice/utils/wrapped.py +++ b/discord/voice/utils/wrapped.py @@ -30,5 +30,3 @@ def gap_wrapped(a: int, b: int, *, wrap: int = 65536) -> int: def add_wrapped(a: int, b: int, *, wrap: int = 65536) -> int: return (a + b) % wrap - - diff --git a/discord/webhook/__init__.py b/discord/webhook/__init__.py index 80890fb426..adf7aa06c4 100644 --- a/discord/webhook/__init__.py +++ b/discord/webhook/__init__.py @@ -10,4 +10,3 @@ from .async_ import * from .sync import * - diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 2b86141948..53689278aa 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -2210,5 +2210,3 @@ async def delete_message( proxy_auth=self.proxy_auth, thread_id=thread_id, ) - - diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py index 5312623ec2..a33655c868 100644 --- a/discord/webhook/sync.py +++ b/discord/webhook/sync.py @@ -1316,5 +1316,3 @@ def delete_message(self, message_id: int, *, thread_id: int | None = None) -> No session=self.session, thread_id=thread_id, ) - - diff --git a/discord/welcome_screen.py b/discord/welcome_screen.py index b0c515cddc..cb0d1eea0a 100644 --- a/discord/welcome_screen.py +++ b/discord/welcome_screen.py @@ -232,5 +232,3 @@ async def edit(self, **options): self._update(new) return self - - diff --git a/discord/widget.py b/discord/widget.py index b5ee7d9d0a..b6bcf0f013 100644 --- a/discord/widget.py +++ b/discord/widget.py @@ -346,5 +346,3 @@ async def fetch_invite(self, *, with_counts: bool = True) -> Invite: invite_id = resolve_invite(self._invite) data = await self._state.http.get_invite(invite_id, with_counts=with_counts) return Invite.from_incomplete(state=self._state, data=data) - - diff --git a/docs/extensions/attributetable.py b/docs/extensions/attributetable.py index 40faf1a7a2..e8c469efb4 100644 --- a/docs/extensions/attributetable.py +++ b/docs/extensions/attributetable.py @@ -295,5 +295,3 @@ def setup(app): ) app.add_node(attributetableplaceholder) app.connect("doctree-resolved", process_attributetable) - - diff --git a/docs/extensions/exception_hierarchy.py b/docs/extensions/exception_hierarchy.py index d0d3ba7025..11a7bdd65c 100644 --- a/docs/extensions/exception_hierarchy.py +++ b/docs/extensions/exception_hierarchy.py @@ -32,5 +32,3 @@ def setup(app): html=(visit_exception_hierarchy_node, depart_exception_hierarchy_node), ) app.add_directive("exception_hierarchy", ExceptionHierarchyDirective) - - diff --git a/docs/extensions/nitpick_file_ignorer.py b/docs/extensions/nitpick_file_ignorer.py index 0b919a6fa8..3b205da5fc 100644 --- a/docs/extensions/nitpick_file_ignorer.py +++ b/docs/extensions/nitpick_file_ignorer.py @@ -22,5 +22,3 @@ def setup(app: Sphinx): app.add_config_value("nitpick_ignore_files", [], "") f = NitpickFileIgnorer(app) sphinx_logging.getLogger("sphinx.transforms.post_transforms").logger.addFilter(f) - - diff --git a/docs/extensions/resourcelinks.py b/docs/extensions/resourcelinks.py index 10467f1d4c..73bbfb9247 100644 --- a/docs/extensions/resourcelinks.py +++ b/docs/extensions/resourcelinks.py @@ -42,5 +42,3 @@ def setup(app: Sphinx) -> dict[str, Any]: app.add_config_value("resource_links", {}, "env") app.connect("builder-inited", add_link_role) return {"version": sphinx.__display_version__, "parallel_read_safe": True} - - diff --git a/tests/voice/test_dependency_behavior.py b/tests/voice/test_dependency_behavior.py index 3f9e0ab685..9ad8f773d8 100644 --- a/tests/voice/test_dependency_behavior.py +++ b/tests/voice/test_dependency_behavior.py @@ -64,5 +64,3 @@ def test_voice_modules_imports_without_voice_dependencies(): with pytest.raises(discord.MissingVoiceDependenciesError): __import__("discord.voice.receive.reader") - - diff --git a/tests/voice/test_imports.py b/tests/voice/test_imports.py index 12a86262d6..510751253a 100644 --- a/tests/voice/test_imports.py +++ b/tests/voice/test_imports.py @@ -53,5 +53,3 @@ def test_voice_modules_import_with_voice_extra(): __import__("discord.voice") __import__("discord.voice.gateway") __import__("discord.voice.receive.reader") - - diff --git a/tests/voice/test_player.py b/tests/voice/test_player.py index df9d01c65a..83900ad7aa 100644 --- a/tests/voice/test_player.py +++ b/tests/voice/test_player.py @@ -50,5 +50,3 @@ def test_audio_player_resume_preserves_played_frames(): assert player._played_frames_offset == 75 assert player.loops == 0 assert player.played_frames() == 75 - - diff --git a/tests/voice/test_wait_finish.py b/tests/voice/test_wait_finish.py index 69e26cf1f7..f8abcfeff1 100644 --- a/tests/voice/test_wait_finish.py +++ b/tests/voice/test_wait_finish.py @@ -111,5 +111,3 @@ def __init__(self, *args, **kwargs) -> None: assert future.result() is err finally: loop.close() - -