diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..19d07ab --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,34 @@ +FROM ghcr.io/astral-sh/uv:0.5.24@sha256:2381d6aa60c326b71fd40023f921a0a3b8f91b14d5db6b90402e65a635053709 AS uv +FROM python:3.11-slim@sha256:6ed5bff4d7d377e2a27d9285553b8c21cfccc4f00881de1b24c9bc8d90016e82 AS python + +FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm@sha256:6155a486f236fd5127b76af33086029d64f64cf49dd504accb6e5f949098eb7e +LABEL repository="www.coastalcommits.com/cswimr/SeaCogs" +LABEL maintainer="cswimr " + +RUN apt-get update; \ + apt-get install -y --no-install-recommends \ + # Red-DiscordBot + build-essential \ + git \ + # PyNaCl + libsodium-dev \ + # CFFI + libffi-dev \ + # SSH repository support + openssh-client \ + # Cog dependencies + # Audio + openjdk-17-jre-headless \ + # PyLav + libaio1 \ + libaio-dev \ + # SeaUtils + dnsutils; \ + apt-get clean; \ + rm -rf /var/lib/apt/lists/* + +COPY --from=uv --chown=vscode: /uv /uvx /bin/ +COPY --from=python --chown=vscode: /usr/local /usr/local + +RUN ln -s /usr/local/bin/python3.11 /usr/local/bin/python; \ + python --version diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..23d0b75 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +{ + "name": "Red-DiscordBot: SeaCogs", + "build": { + "context": "..", + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "extensions": [ + "charliermarsh.ruff", + "ms-azuretools.vscode-docker", + "ms-python.python", + "tekumara.typos-vscode", + "tamasfe.even-better-toml", + "redhat.vscode-yaml", + "DavidAnson.vscode-markdownlint", + "yy0931.vscode-sqlite3-editor", + "aaron-bond.better-comments", + "donjayamanne.githistory", + "eamodio.gitlens" + ] + } + }, + "containerEnv": { + "DISPLAY": "dummy", + "PYTHONUNBUFFERED": "True", + "UV_LINK_MODE": "copy", + "UV_PYTHON_PREFERENCE": "only-system", + "UV_PYTHON_DOWNLOADS": "never", + "PROJECT_DIR": "/workspaces/SeaCogs" + }, + "mounts": ["source=seacogs-persistent-data,target=/workspaces/SeaCogs/.data,type=volume"], + "postCreateCommand": "uv sync --frozen", + "remoteUser": "vscode" +} diff --git a/.docs/aurora/index.md b/.docs/aurora/index.md index 0191f85..4c6f321 100644 --- a/.docs/aurora/index.md +++ b/.docs/aurora/index.md @@ -12,5 +12,5 @@ Aurora is a fully-featured moderation system. It is heavily inspired by Galactic ```bash [p]repo add seacogs https://www.coastalcommits.com/cswimr/SeaCogs [p]cog install seacogs aurora -[p]load aurora +[p]cog load aurora ``` diff --git a/.docs/backup.md b/.docs/backup.md index 26c949d..4ddc56f 100644 --- a/.docs/backup.md +++ b/.docs/backup.md @@ -7,7 +7,7 @@ Backup allows you to export a JSON list of all of your installed repositories an ```bash [p]repo add seacogs https://www.coastalcommits.com/cswimr/SeaCogs [p]cog install seacogs backup -[p]load backup +[p]cog load backup ``` ## Version Compatibility diff --git a/.docs/bible.md b/.docs/bible.md index 0db826b..188f985 100644 --- a/.docs/bible.md +++ b/.docs/bible.md @@ -8,7 +8,7 @@ This cog does require an api key to work. ```bash [p]repo add seacogs https://www.coastalcommits.com/cswimr/SeaCogs [p]cog install seacogs bible -[p]load bible +[p]cog load bible ``` ## Setup @@ -21,9 +21,8 @@ Then, you can use `[p]set api` to set the API key. Make sure your formatting mat ## Commands ### bible passage - -- Usage: `[p]bible passage ` -- Aliases: `verse` + - Usage: `[p]bible passage ` + - Aliases: `verse` Get a Bible passage. @@ -32,7 +31,6 @@ Example usage: `[p]bible passage John 3:16-3:17` ### bible random - -- Usage: `[p]bible random` + - Usage: `[p]bible random` Get a random Bible verse. diff --git a/.docs/emojiinfo.md b/.docs/emojiinfo.md index fc010a5..ef63ab6 100644 --- a/.docs/emojiinfo.md +++ b/.docs/emojiinfo.md @@ -7,7 +7,7 @@ EmojiInfo allows you to retrieve information about an emoji. ```bash [p]repo add seacogs https://www.coastalcommits.com/cswimr/SeaCogs [p]cog install seacogs emojiinfo -[p]load emojiinfo +[p]cog load emojiinfo ``` ## Commands diff --git a/.docs/hotreload.md b/.docs/hotreload.md deleted file mode 100644 index 0144e5d..0000000 --- a/.docs/hotreload.md +++ /dev/null @@ -1,26 +0,0 @@ -# HotReload - -HotReload automatically reloads cogs in local cog paths on file change. -This is useful for development, as it allows you to make changes to your cogs and see the changes reflected in Discord immediately, without having to manually `[p]reload` the cog. - -## Installation - -```bash -[p]repo add seacogs https://www.coastalcommits.com/cswimr/SeaCogs -[p]cog install seacogs hotreload -[p]load hotreload -``` - -## Commands - -### hotreload compile - -Determines if the cog should try to compile a modified Python file before reloading the associated cog. Useful for catching syntax errors. Disabled by default. - -### hotreload notifychannel - -Set the channel where hotreload will send notifications when a cog is reloaded. - -### hotreload list - -Debugging command that shows the list of currently active observers. May be expanded in the future to show watched file paths. diff --git a/.docs/nerdify.md b/.docs/nerdify.md index ceef1af..87662b6 100644 --- a/.docs/nerdify.md +++ b/.docs/nerdify.md @@ -7,7 +7,7 @@ Nerdify allows you to nerdify other people's text. ```bash [p]repo add seacogs https://www.coastalcommits.com/cswimr/SeaCogs [p]cog install seacogs nerdify -[p]load nerdify +[p]cog load nerdify ``` ## Commands diff --git a/.docs/pterodactyl/index.md b/.docs/pterodactyl/index.md index 732b505..cb69a5d 100644 --- a/.docs/pterodactyl/index.md +++ b/.docs/pterodactyl/index.md @@ -12,5 +12,5 @@ Pterodactyl allows for connecting to a Pterodactyl server through websockets. It ```bash [p]repo add seacogs https://www.coastalcommits.com/cswimr/SeaCogs [p]cog install seacogs pterodactyl -[p]load pterodactyl +[p]cog load aurora ``` diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 892e515..0000000 --- a/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.py] -indent_size = 4 - -[*.md] -trim_trailing_whitespace = false diff --git a/.envrc b/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/.forgejo/pull_request_template.md b/.forgejo/pull_request_template.md index 33f957c..efe146e 100644 --- a/.forgejo/pull_request_template.md +++ b/.forgejo/pull_request_template.md @@ -2,5 +2,5 @@ -- [ ] By submitting this pull request, I permit [cswimr](https://www.coastalcommits.com/cswimr) to license my work under +- [ ] By submitting this pull request, I permit cswimr to license my work under the [Mozilla Public License Version 2.0](https://www.coastalcommits.com/cswimr/SeaCogs/src/branch/main/LICENSE). diff --git a/.forgejo/workflows/config/.pylintrc b/.forgejo/workflows/config/.pylintrc index 4874462..94010af 100644 --- a/.forgejo/workflows/config/.pylintrc +++ b/.forgejo/workflows/config/.pylintrc @@ -12,7 +12,6 @@ too-many-locals, too-many-public-methods, too-many-statements, - too-many-positional-arguments, arguments-differ, too-many-return-statements, import-outside-toplevel, diff --git a/.forgejo/workflows/workflow.yaml b/.forgejo/workflows/workflow.yaml index 1dedbb1..732b227 100644 --- a/.forgejo/workflows/workflow.yaml +++ b/.forgejo/workflows/workflow.yaml @@ -1,28 +1,21 @@ name: Actions on: push: - branches: - - main pull_request: jobs: lint: name: Lint Code (Ruff & Pylint) runs-on: docker - container: catthehacker/ubuntu:act-latest@sha256:cd837565ef74f3d0f94e89ff6723292caa415306bddabfe566932ae892ca9334 + container: www.coastalcommits.com/cswimr/actions:uv@sha256:211aaf7d9ac98087579ebf9fab87a9122f51b2697e3a3649ac9f4bd3b03b8e5d steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: "Setup uv" - uses: actions/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5 - with: - version: "latest" - enable-cache: true - prune-cache: false - github-token: ${{ secrets.GITHUBTOKEN }} + - name: Install python + run: uv python install 3.11 - - name: "Install dependencies" + - name: Install dependencies run: uv sync - name: Analysing code with Ruff @@ -34,27 +27,23 @@ jobs: docs: name: Build Documentation (MkDocs) + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: docker - container: catthehacker/ubuntu:act-latest@sha256:cd837565ef74f3d0f94e89ff6723292caa415306bddabfe566932ae892ca9334 + container: www.coastalcommits.com/cswimr/actions:docs@sha256:e405cd6b9b1182a570ddee32ed8dd1b2f899edc625d006c8b4b2f18c100e724f steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: fetch-depth: 0 - - name: "Setup uv" - uses: actions/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5 - with: - version: "latest" - enable-cache: true - prune-cache: false - github-token: ${{ secrets.GITHUBTOKEN }} + - name: Install python + run: uv python install 3.11 - name: Install dependencies - run: uv sync --no-dev --group=documentation + run: uv sync --no-dev --extra=documentation - name: Set environment variables - uses: actions/env@1791216cd180e6578dd1d67fb8d2852b883a5f53 # v2 + uses: actions/env@v2 - name: Build documentation run: | @@ -74,13 +63,13 @@ jobs: echo "${YELLOW}Deploying to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$CI_ACTION_REF_NAME_SLUG${YELLOW}...\n" npx -p "@getmeli/cli" meli upload ./site \ - --url "https://meli.csw.im" \ + --url "https://pages.coastalcommits.com" \ --site "${{ vars.MELI_SITE_ID }}" \ --token "${{ secrets.MELI_TOKEN }}" \ --release "$CI_ACTION_REF_NAME_SLUG/${{ env.GITHUB_SHA }}" \ --branch "$CI_ACTION_REF_NAME_SLUG" echo "\n${YELLOW}Deployed to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$CI_ACTION_REF_NAME_SLUG${YELLOW}!" - echo "${GREEN}https://$CI_ACTION_REF_NAME_SLUG.seacogs.csw.im/" + echo "${GREEN}https://$CI_ACTION_REF_NAME_SLUG.seacogs.coastalcommits.com/" env: GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }} diff --git a/.gitignore b/.gitignore index 3902499..d937fba 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,3 @@ site .venv .data __pycache__ -.mypy_cache/ -.ruff_cache/ -.direnv/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 2a3559f..44c2cf3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,12 +1,15 @@ { - "version": "0.2.0", - "configurations": [ - { - "name": "Python: Red-DiscordBot", - "type": "debugpy", - "request": "launch", - "module": "redbot", - "args": ["local", "--dev", "-vvv", "--load-cogs=hotreload"] - } - ] + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Red-DiscordBot", + "type": "debugpy", + "request": "launch", + "module": "redbot", + "args": ["local", "-vvv"] + } + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 68a52a5..b314c1c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,32 +1,13 @@ { "[python]": { + "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": "explicit" }, "editor.defaultFormatter": "charliermarsh.ruff" }, "[json]": { + "editor.formatOnSave": true, "editor.defaultFormatter": "vscode.json-language-features" - }, - "[jsonc]": { - "editor.defaultFormatter": "vscode.json-language-features" - }, - "files.exclude": { - "**/.git": true, - "**/__pycache__": true, - "**/.ruff_cache": true, - "**/.mypy_cache": true - }, - "python.analysis.diagnosticSeverityOverrides": { - "reportAttributeAccessIssue": false, // disabled because `commands.group.command` is listed as Any / Unknown for some reason - "reportCallIssue": "information" - }, - "python.analysis.diagnosticMode": "workspace", - "python.analysis.supportDocstringTemplate": true, - "python.analysis.typeCheckingMode": "basic", - "python.analysis.typeEvaluation.enableReachabilityAnalysis": true, - "python.analysis.typeEvaluation.strictDictionaryInference": true, - "python.analysis.typeEvaluation.strictListInference": true, - "python.analysis.typeEvaluation.strictSetInference": true, - "editor.formatOnSave": true, + } } diff --git a/README.md b/README.md index 90818be..ea29384 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,27 @@ # SeaCogs [![Discord](https://img.shields.io/discord/1070058354925383681?logo=discord&color=%235661f6)](https://discord.gg/eMUMe77Yb8) -[![Documentation](https://img.shields.io/badge/docs-CoastalCommits%20Pages-3e83fd?logo=materialformkdocs)](https://seacogs.csw.im) +[![Documentation](https://img.shields.io/badge/docs-CoastalCommits%20Pages-3e83fd?logo=materialformkdocs)](https://seacogs.coastalcommits.com) ![Python Versions](https://img.shields.io/badge/python-3.10%20%7C%203.11-%233776ab?logo=python) My assorted cogs for Red-DiscordBot. -## Developing +## Development -You'll need some prerequisites before you can start working on my cogs. -[git](https://git-scm.com) - [uv](https://docs.astral.sh/uv) -Additionally, I recommend a code editor of some variety. [Visual Studio Code](https://code.visualstudio.com) is a good, beginner-friendly option. +To get started with a development environment, first clone this repository. -### Installing Prerequisites - -_This section of the guide only applies to Windows systems. -If you're on Linux, refer to the documentation of the projects listed above. I also offer a [Nix Flake](./flake.nix) that contains all of the required prerequisites, if you're a Nix user._ - -#### [`git`](https://git-scm.com) - -You can download git from the [git download page](https://git-scm.com/downloads/win). - -Alternatively, you can use `winget`: - -```ps1 -winget install --id=Git.Git -e --source=winget +```sh +git clone https://coastalcommits.com/cswimr/SeaCogs.git ``` -#### [`uv`](https://docs.astral.sh/uv) +Then, install Poetry. -You can install uv with the following Powershell command: - -```ps1 -powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" +```sh +pip install poetry ``` -Alternatively, you can use `winget`: +Finally, use Poetry to create a virtual environment with all of the dependencies required by my cogs. -```ps1 -winget install --id=astral-sh.uv -e -``` - -### Getting the Source Code - -Once you have [`git`](https://git-scm.com) installed, you can use the `git clone` command to get a copy of the repository on your system. - -```bash -git clone https://c.csw.im/cswimr/SeaCogs.git -``` - -Then, you can use `uv` to install the Python dependencies required for development. - -```bash -uv sync --frozen +```sh +poetry install ``` diff --git a/antipolls/antipolls.py b/antipolls/antipolls.py index 6f6dac6..15aecfd 100644 --- a/antipolls/antipolls.py +++ b/antipolls/antipolls.py @@ -17,7 +17,7 @@ class AntiPolls(commands.Cog): __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.0.3" + __version__ = "1.0.1" __documentation__ = "https://seacogs.coastalcommits.com/antipolls/" def __init__(self, bot: Red): @@ -45,11 +45,11 @@ class AntiPolls(commands.Cog): ] return "\n".join(text) - async def red_delete_data_for_user(self, **kwargs): # pylint: disable=unused-argument + async def red_delete_data_for_user(self, **kwargs): # pylint: disable=unused-argument """Nothing to delete.""" return - @commands.Cog.listener("on_message") + @commands.Cog.listener('on_message') async def polls_listener(self, message: discord.Message) -> None: if message.guild is None: return self.logger.verbose("Message in direct messages ignored") @@ -62,13 +62,13 @@ class AntiPolls(commands.Cog): guild_config = await self.config.guild(message.guild).all() - if guild_config["manage_messages"] is True and message.author.guild_permissions.manage_messages: + if guild_config['manage_messages'] is True and message.author.guild_permissions.manage_messages: return self.logger.verbose("Message from user with Manage Messages permission ignored") - if message.channel.id in guild_config["channel_whitelist"]: + if message.channel.id in guild_config['channel_whitelist']: return self.logger.verbose("Message in whitelisted channel %s ignored", message.channel.id) - if any(role.id in guild_config["role_whitelist"] for role in message.author.roles): + if any(role.id in guild_config['role_whitelist'] for role in message.author.roles): return self.logger.verbose("Message from whitelisted role %s ignored", message.author.roles) if not message.content and not message.embeds and not message.attachments and not message.stickers: @@ -80,9 +80,9 @@ class AntiPolls(commands.Cog): return self.logger.error("Failed to delete message: %s", e) return self.logger.trace("Deleted poll message %s", message.id) - return self.logger.verbose("Message %s is not a poll, ignoring", message.id) + self.logger.verbose("Message %s is not a poll, ignoring", message.id) - @commands.group(name="antipolls", aliases=["ap"]) # type: ignore + @commands.group(name="antipolls", aliases=["ap"]) @commands.guild_only() @commands.admin_or_permissions(manage_guild=True) async def antipolls(self, ctx: commands.Context) -> None: @@ -95,8 +95,6 @@ class AntiPolls(commands.Cog): @antipolls_roles.command(name="add") async def antipolls_roles_add(self, ctx: commands.Context, *roles: discord.Role) -> None: """Add roles to the whitelist.""" - assert ctx.guild is not None # using `assert` here and in the rest of this file to satisfy typecheckers - # this is safe because the commands are part of a guild-only command group async with self.config.guild(ctx.guild).role_whitelist() as role_whitelist: role_whitelist: list failed: list[discord.Role] = [] @@ -112,7 +110,6 @@ class AntiPolls(commands.Cog): @antipolls_roles.command(name="remove") async def antipolls_roles_remove(self, ctx: commands.Context, *roles: discord.Role) -> None: """Remove roles from the whitelist.""" - assert ctx.guild is not None async with self.config.guild(ctx.guild).role_whitelist() as role_whitelist: role_whitelist: list failed: list[discord.Role] = [] @@ -126,14 +123,13 @@ class AntiPolls(commands.Cog): await ctx.send(f"The following roles were not in the whitelist: {humanize_list([role.mention for role in failed])}", delete_after=10) @antipolls_roles.command(name="list") - async def antipolls_roles_list(self, ctx: commands.Context) -> discord.Message: + async def antipolls_roles_list(self, ctx: commands.Context) -> None: """List roles in the whitelist.""" - assert ctx.guild is not None role_whitelist = await self.config.guild(ctx.guild).role_whitelist() if not role_whitelist: return await ctx.send("No roles in the whitelist.") - roles = [role for role in (ctx.guild.get_role(role) for role in role_whitelist) if role is not None] - return await ctx.send(humanize_list([role.mention for role in roles])) + roles = [ctx.guild.get_role(role) for role in role_whitelist] + await ctx.send(humanize_list([role.mention for role in roles])) @antipolls.group(name="channels") async def antipolls_channels(self, ctx: commands.Context) -> None: @@ -142,7 +138,6 @@ class AntiPolls(commands.Cog): @antipolls_channels.command(name="add") async def antipolls_channels_add(self, ctx: commands.Context, *channels: discord.TextChannel) -> None: """Add channels to the whitelist.""" - assert ctx.guild is not None async with self.config.guild(ctx.guild).channel_whitelist() as channel_whitelist: channel_whitelist: list failed: list[discord.TextChannel] = [] @@ -158,7 +153,6 @@ class AntiPolls(commands.Cog): @antipolls_channels.command(name="remove") async def antipolls_channels_remove(self, ctx: commands.Context, *channels: discord.TextChannel) -> None: """Remove channels from the whitelist.""" - assert ctx.guild is not None async with self.config.guild(ctx.guild).channel_whitelist() as channel_whitelist: channel_whitelist: list failed: list[discord.TextChannel] = [] @@ -172,21 +166,16 @@ class AntiPolls(commands.Cog): await ctx.send(f"The following channels were not in the whitelist: {humanize_list([channel.mention for channel in failed])}", delete_after=10) @antipolls_channels.command(name="list") - async def antipolls_channels_list(self, ctx: commands.Context) -> discord.Message: + async def antipolls_channels_list(self, ctx: commands.Context) -> None: """List channels in the whitelist.""" - assert ctx.guild is not None channel_whitelist = await self.config.guild(ctx.guild).channel_whitelist() if not channel_whitelist: return await ctx.send("No channels in the whitelist.") - channels = [channel for channel in (ctx.guild.get_channel(channel) for channel in channel_whitelist) if channel is not None] - for c in channels: - if not c: - channels.remove(c) - return await ctx.send(humanize_list([channel.mention for channel in channels])) + channels = [ctx.guild.get_channel(channel) for channel in channel_whitelist] + await ctx.send(humanize_list([channel.mention for channel in channels])) @antipolls.command(name="managemessages") async def antipolls_managemessages(self, ctx: commands.Context, enabled: bool) -> None: """Toggle Manage Messages permission check.""" - assert ctx.guild is not None await self.config.guild(ctx.guild).manage_messages.set(enabled) await ctx.tick() diff --git a/antipolls/info.json b/antipolls/info.json index 24bc0bb..7856195 100644 --- a/antipolls/info.json +++ b/antipolls/info.json @@ -1,14 +1,17 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thank you for installing AntiPolls!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", - "name": "AntiPolls", - "short": "AntiPolls deletes messages that contain polls.", - "description": "AntiPolls deletes messages that contain polls, with a configurable per-guild role and channel whitelist and support for default Discord permissions (Manage Messages).", - "end_user_data_statement": "This cog does not store any user data.", + "author" : ["cswimr"], + "install_msg" : "Thank you for installing AntiPolls!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", + "name" : "AntiPolls", + "short" : "AntiPolls deletes messages that contain polls.", + "description" : "AntiPolls deletes messages that contain polls, with a configurable per-guild role and channel whitelist and support for default Discord permissions (Manage Messages).", + "end_user_data_statement" : "This cog does not store any user data.", "hidden": true, "disabled": false, "min_bot_version": "3.5.0", "min_python_version": [3, 10, 0], - "tags": ["automod", "automoderation", "polls"] + "tags": [ + "automod", + "automoderation", + "polls" + ] } diff --git a/aurora/aurora.py b/aurora/aurora.py index 955b5cc..2cfd78a 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -6,32 +6,38 @@ # |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_| import json +import logging as py_logging import os -import sqlite3 import time from datetime import datetime, timedelta, timezone from math import ceil +from typing import List, Union import discord -from discord import Object +from class_registry.registry import RegistryKeyError +from dateutil.parser import ParserError, parse from discord.ext import tasks from redbot.core import app_commands, commands, data_manager from redbot.core.app_commands import Choice from redbot.core.bot import Red from redbot.core.commands.converter import parse_relativedelta, parse_timedelta -from redbot.core.utils.chat_formatting import box, error, humanize_list, humanize_timedelta, warning +from redbot.core.utils.chat_formatting import bold, box, error, humanize_list, humanize_timedelta, warning -from aurora.importers.aurora import ImportAuroraView -from aurora.importers.galacticbot import ImportGalacticBotView -from aurora.menus.addrole import Addrole -from aurora.menus.guild import Guild -from aurora.menus.immune import Immune -from aurora.menus.overrides import Overrides -from aurora.utilities.config import config, register_config -from aurora.utilities.database import connect, create_guild_table, fetch_case, mysql_log -from aurora.utilities.factory import addrole_embed, case_factory, changes_factory, evidenceformat_factory, guild_embed, immune_embed, message_factory, overrides_embed -from aurora.utilities.logger import logger -from aurora.utilities.utils import check_moddable, check_permissions, convert_timedelta_to_str, fetch_channel_dict, fetch_user_dict, generate_dict, get_footer_image, log, send_evidenceformat, timedelta_from_relativedelta +from .importers.aurora import ImportAuroraView +from .importers.galacticbot import ImportGalacticBotView +from .menus.addrole import Addrole +from .menus.guild import Guild +from .menus.immune import Immune +from .menus.overrides import Overrides +from .menus.types import Types +from .models.change import Change +from .models.moderation import Moderation +from .models.type import Type, type_registry +from .utilities.config import config, register_config +from .utilities.factory import addrole_embed, case_factory, changes_factory, evidenceformat_factory, guild_embed, immune_embed, overrides_embed, type_embed +from .utilities.json import dump +from .utilities.logger import logger +from .utilities.utils import check_moddable, check_permissions, create_guild_table, log, timedelta_from_relativedelta, timedelta_to_string class Aurora(commands.Cog): @@ -39,29 +45,24 @@ class Aurora(commands.Cog): It is heavily inspired by GalacticBot, and is designed to be a more user-friendly alternative to Red's core Mod cogs. This cog stores all of its data in an SQLite database.""" - __author__ = ["cswimr"] - __version__ = "2.1.5" + __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] + __version__ = "3.0.0-indev27" + __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" __documentation__ = "https://seacogs.coastalcommits.com/aurora/" async def red_delete_data_for_user(self, *, requester, user_id: int): if requester == "discord_deleted_user": await config.user_from_id(user_id).clear() - database = connect() - cursor = database.cursor() - - cursor.execute("SHOW TABLES;") - tables = [table[0] for table in cursor.fetchall()] + results = await Moderation.execute(query="SHOW TABLES;", return_obj=False) + tables = [table[0] for table in results] condition = "target_id = %s OR moderator_id = %s;" for table in tables: delete_query = f"DELETE FROM {table[0]} WHERE {condition}" - cursor.execute(delete_query, (user_id, user_id)) + await Moderation.execute(query=delete_query, parameters=(user_id, user_id), return_obj=False) - database.commit() - cursor.close() - database.close() if requester == "owner": await config.user_from_id(user_id).clear() if requester == "user": @@ -69,25 +70,29 @@ class Aurora(commands.Cog): if requester == "user_strict": await config.user_from_id(user_id).clear() else: - logger.warning( - "Invalid requester passed to red_delete_data_for_user: %s", - requester, - ) + logger.warning("Invalid requester passed to red_delete_data_for_user: %s", requester) - def __init__(self, bot: Red): + def __init__(self, bot: Red) -> None: super().__init__() self.bot = bot + self.type_registry = type_registry register_config(config) self.handle_expiry.start() + # If we don't override aiosqlite's logging level, it will spam the console with dozens of debug messages per query. + # This is unnecessary because Aurora already logs all of its SQL queries (or at least, most of them), + # and the information that aiosqlite logs is not useful to the bot owner. + # This is a bad solution though as it overrides it for any other cogs that are using aiosqlite too. + # If there's a better solution that you're aware of, please let me know in Discord or in a CoastalCommits issue. + py_logging.getLogger("aiosqlite").setLevel(py_logging.INFO) def format_help_for_context(self, ctx: commands.Context) -> str: pre_processed = super().format_help_for_context(ctx) or "" n = "\n" if "\n\n" not in pre_processed else "" text = [ f"{pre_processed}{n}", - f"Cog Version: **{self.__version__}**", - f"Author: {humanize_list(self.__author__)}", - f"Documentation: {self.__documentation__}", + f"{bold('Cog Version:')} [{self.__version__}]({self.__git__})", + f"{bold('Author:')} {humanize_list(self.__author__)}", + f"{bold('Documentation:')} {self.__documentation__}", ] return "\n".join(text) @@ -106,8 +111,37 @@ class Aurora(commands.Cog): async def cog_unload(self): self.handle_expiry.cancel() + @staticmethod + async def moderate(ctx: Union[commands.Context, discord.Interaction], target: discord.Member | discord.User | discord.abc.Messageable, permissions: List[str], moderation_type: Type | str, silent: bool | None = None, **kwargs) -> None | Type: + """This function is used to moderate users. + It checks if the target can be moderated, then calls the handler method of the moderation type specified. + + Args: + ctx (Union[commands.Context, discord.Interaction]): The context of the command. If this is a `discord.Interaction` object, it will be converted to a `commands.Context` object. Additionally, if the interaction originated from a context menu the `ctx.author` attribute will be overridden to `interaction.user`. + target (discord.Member, discord.User, discord.abc.Messageable): The target user or channel to moderate. + permissions (List[str]): The permissions required to moderate the target. + moderation_type (Type): The moderation type (handler) to use. See `aurora.models.moderation_types` for some examples. + silent (bool, optional): Whether or not to message the target. Defaults to None. + **kwargs: The keyword arguments to pass to the handler method. + """ + if isinstance(moderation_type, str): + moderation_type = type_registry[str.lower(moderation_type)] + if isinstance(ctx, discord.Interaction): + interaction = ctx + ctx = await commands.Context.from_interaction(interaction) + if isinstance(interaction.command, app_commands.ContextMenu): + ctx.author = interaction.user + if not await check_moddable(target=target, ctx=ctx, permissions=permissions, moderation_type=moderation_type): + return + if silent is None: + dm_users = await config.custom("types", ctx.guild.id, moderation_type.key).dm_users() + if dm_users is None: + dm_users = await config.guild(ctx.guild).dm_users() + silent = not dm_users + return await moderation_type.handler(ctx=ctx, target=target, silent=silent, **kwargs) + @commands.Cog.listener("on_guild_join") - async def db_generate_guild_join(self, guild: discord.Guild): + async def db_generate_on_guild_join(self, guild: discord.Guild): """This method prepares the database schema whenever the bot joins a guild.""" if not await self.bot.cog_disabled_in_guild(self, guild): try: @@ -120,68 +154,66 @@ class Aurora(commands.Cog): """This method automatically adds roles to users when they join the server.""" if not await self.bot.cog_disabled_in_guild(self, member.guild): query = f"""SELECT moderation_id, role_id, reason FROM moderation_{member.guild.id} WHERE target_id = ? AND moderation_type = 'ADDROLE' AND expired = 0 AND resolved = 0;""" - database = connect() - cursor = database.cursor() - cursor.execute(query, (member.id,)) - results = cursor.fetchall() - for result in results: - role = member.guild.get_role(result[1]) - reason = result[2] - await member.add_roles(role, reason=f"Role automatically added on member rejoin for: {reason} (Case #{result[0]:,})") + results = await Moderation.execute(query, (member.id,)) + for row in results: + role = member.guild.get_role(row[1]) + reason = row[2] + await member.add_roles(role, reason=f"Role automatically added on member rejoin for: {reason} (Case #{row[0]:,})") @commands.Cog.listener("on_audit_log_entry_create") async def autologger(self, entry: discord.AuditLogEntry): """This method automatically logs moderations done by users manually ("right clicks").""" - if not await self.bot.cog_disabled_in_guild(self, entry.guild): - if await config.guild(entry.guild).ignore_other_bots() is True: - if entry.user.bot or entry.target.bot: - return - elif entry.user.id == self.bot.user.id: - return - - duration = "NULL" - - if entry.reason: - reason = entry.reason + " (This action was performed without the bot.)" - - else: - reason = "This action was performed without the bot." - - if entry.action == discord.AuditLogAction.kick: - moderation_type = "KICK" - - elif entry.action == discord.AuditLogAction.ban: - moderation_type = "BAN" - - elif entry.action == discord.AuditLogAction.unban: - moderation_type = "UNBAN" - - elif entry.action == discord.AuditLogAction.member_update: - if entry.after.timed_out_until is not None: - timed_out_until_aware = entry.after.timed_out_until.replace( - tzinfo=timezone.utc, - ) - duration_datetime = timed_out_until_aware - datetime.now( - tz=timezone.utc, - ) - minutes = round(duration_datetime.total_seconds() / 60) - duration = timedelta(minutes=minutes) - moderation_type = "MUTE" + try: + if not await self.bot.cog_disabled_in_guild(self, entry.guild): + if await config.guild(entry.guild).ignore_other_bots() is True: + if entry.user.bot or entry.target.bot: + return else: - moderation_type = "UNMUTE" - else: - return + if entry.user.id == self.bot.user.id: + return - await mysql_log( - entry.guild.id, - entry.user.id, - moderation_type, - "USER", - entry.target.id, - 0, - duration, - reason, - ) + duration = None + + if entry.reason: + reason = entry.reason + " (This action was performed without the bot.)" + + else: + reason = "This action was performed without the bot." + + if entry.action == discord.AuditLogAction.kick: + moderation_type = type_registry["kick"] + + elif entry.action == discord.AuditLogAction.ban: + moderation_type = type_registry["ban"] + + elif entry.action == discord.AuditLogAction.unban: + moderation_type = type_registry["unban"] + + elif entry.action == discord.AuditLogAction.member_update: + if entry.after.timed_out_until is not None: + timed_out_until_aware = entry.after.timed_out_until.replace(tzinfo=timezone.utc) + duration_datetime = timed_out_until_aware - datetime.now(tz=timezone.utc) + minutes = round(duration_datetime.total_seconds() / 60) + duration = timedelta(minutes=minutes) + moderation_type = type_registry["mute"] + else: + moderation_type = type_registry["unmute"] + else: + return + + await Moderation.log( + bot=self.bot, + guild_id=entry.guild.id, + moderator_id=entry.user.id, + moderation_type=moderation_type, + target_type="USER", + target_id=entry.target.id, + role_id=None, + duration=duration, + reason=reason, + ) + except AttributeError: + return ####################################################################################################################### ### COMMANDS @@ -193,7 +225,7 @@ class Aurora(commands.Cog): interaction: discord.Interaction, target: discord.User, reason: str, - silent: bool = None, + silent: bool | None = None, ): """Add a note to a user. @@ -205,54 +237,22 @@ class Aurora(commands.Cog): Why are you noting this user? silent: bool Should the user be messaged?""" - if not await check_moddable(target, interaction, ["moderate_members"]): - return - - await interaction.response.send_message( - content=f"{target.mention} has recieved a note!\n**Reason** - `{reason}`", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["moderate_members"], + moderation_type=type_registry["note"], + reason=reason, ) - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="note", - response=await interaction.original_response(), - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "NOTE", - "USER", - target.id, - 0, - "NULL", - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has received a note! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) - @app_commands.command(name="warn") async def warn( self, interaction: discord.Interaction, target: discord.Member, reason: str, - silent: bool = None, + silent: bool | None = None, ): """Warn a user. @@ -264,47 +264,15 @@ class Aurora(commands.Cog): Why are you warning this user? silent: bool Should the user be messaged?""" - if not await check_moddable(target, interaction, ["moderate_members"]): - return - - await interaction.response.send_message( - content=f"{target.mention} has been warned!\n**Reason** - `{reason}`", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["moderate_members"], + moderation_type=type_registry["warn"], + reason=reason, ) - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="warned", - response=await interaction.original_response(), - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "WARN", - "USER", - target.id, - 0, - "NULL", - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has been warned! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) - @app_commands.command(name="addrole") async def addrole( self, @@ -312,8 +280,8 @@ class Aurora(commands.Cog): target: discord.Member, role: discord.Role, reason: str, - duration: str = None, - silent: bool = None, + duration: str | None = None, + silent: bool | None = None, ): """Add a role to a user. @@ -329,91 +297,7 @@ class Aurora(commands.Cog): How long are you adding this role for? silent: bool Should the user be messaged?""" - addrole_whitelist = await config.guild(interaction.guild).addrole_whitelist() - - if not addrole_whitelist: - await interaction.response.send_message( - content=error("There are no whitelisted roles set for this server!"), - ephemeral=True, - ) - return - - if duration is not None: - parsed_time = parse_timedelta(duration) - if parsed_time is None: - await interaction.response.send_message( - content=error("Please provide a valid duration!"), - ephemeral=True, - ) - return - else: - parsed_time = "NULL" - - if role.id not in addrole_whitelist: - await interaction.response.send_message( - content=error("That role isn't whitelisted!"), - ephemeral=True, - ) - return - - if not await check_moddable( - target, - interaction, - ["moderate_members", "manage_roles"], - ): - return - - if role.id in [user_role.id for user_role in target.roles]: - await interaction.response.send_message( - content=error(f"{target.mention} already has this role!"), - ephemeral=True, - ) - return - - await interaction.response.defer() - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="addrole", - response=await interaction.original_response(), - duration=parsed_time, - role=role, - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - await target.add_roles( - role, - reason=f"Role added by {interaction.user.id}{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time != 'NULL' else ''} for: {reason}", - ) - response: discord.WebhookMessage = await interaction.followup.send( - content=f"{target.mention} has been given the {role.mention} role{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time != 'NULL' else ''}!\n**Reason** - `{reason}`", - ) - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "ADDROLE", - "USER", - target.id, - role.id, - parsed_time, - reason, - ) - await response.edit( - content=f"{target.mention} has been given the {role.mention} role{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time != 'NULL' else ''}! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) + await self.moderate(ctx=interaction, target=target, silent=silent, permissions=["moderate_members", "manage_roles"], moderation_type=type_registry["addrole"], reason=reason, role=role, duration=duration) @app_commands.command(name="removerole") async def removerole( @@ -422,8 +306,8 @@ class Aurora(commands.Cog): target: discord.Member, role: discord.Role, reason: str, - duration: str = None, - silent: bool = None, + duration: str | None = None, + silent: bool | None = None, ): """Remove a role from a user. @@ -439,91 +323,7 @@ class Aurora(commands.Cog): How long are you removing this role for? silent: bool Should the user be messaged?""" - addrole_whitelist = await config.guild(interaction.guild).addrole_whitelist() - - if not addrole_whitelist: - await interaction.response.send_message( - content=error("There are no whitelisted roles set for this server!"), - ephemeral=True, - ) - return - - if duration is not None: - parsed_time = parse_timedelta(duration) - if parsed_time is None: - await interaction.response.send_message( - content=error("Please provide a valid duration!"), - ephemeral=True, - ) - return - else: - parsed_time = "NULL" - - if role.id not in addrole_whitelist: - await interaction.response.send_message( - content=error("That role isn't whitelisted!"), - ephemeral=True, - ) - return - - if not await check_moddable( - target, - interaction, - ["moderate_members", "manage_roles"], - ): - return - - if role.id not in [user_role.id for user_role in target.roles]: - await interaction.response.send_message( - content=error(f"{target.mention} does not have this role!"), - ephemeral=True, - ) - return - - await interaction.response.defer() - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="removerole", - response=await interaction.original_response(), - duration=parsed_time, - role=role, - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - await target.remove_roles( - role, - reason=f"Role removed by {interaction.user.id}{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time != 'NULL' else ''} for: {reason}", - ) - response: discord.WebhookMessage = await interaction.followup.send( - content=f"{target.mention} has had the {role.mention} role removed{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time != 'NULL' else ''}!\n**Reason** - `{reason}`", - ) - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "REMOVEROLE", - "USER", - target.id, - role.id, - parsed_time, - reason, - ) - await response.edit( - content=f"{target.mention} has had the {role.mention} role removed{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time != 'NULL' else ''}! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) + await self.moderate(ctx=interaction, target=target, silent=silent, permissions=["moderate_members", "manage_roles"], moderation_type=type_registry["removerole"], reason=reason, role=role, duration=duration) @app_commands.command(name="mute") async def mute( @@ -532,7 +332,7 @@ class Aurora(commands.Cog): target: discord.Member, duration: str, reason: str, - silent: bool = None, + silent: bool | None = None, ): """Mute a user. @@ -546,83 +346,23 @@ class Aurora(commands.Cog): Why are you unbanning this user? silent: bool Should the user be messaged?""" - if not await check_moddable(target, interaction, ["moderate_members"]): - return - - if target.is_timed_out() is True: - await interaction.response.send_message( - error(f"{target.mention} is already muted!"), - allowed_mentions=discord.AllowedMentions(users=False), - ephemeral=True, - ) - return - - try: - parsed_time = parse_timedelta(duration, maximum=timedelta(days=28)) - if parsed_time is None: - await interaction.response.send_message( - error("Please provide a valid duration!"), - ephemeral=True, - ) - return - except commands.BadArgument: - await interaction.response.send_message( - error("Please provide a duration that is less than 28 days."), - ephemeral=True, - ) - return - - await target.timeout( - parsed_time, - reason=f"Muted by {interaction.user.id} for: {reason}", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["moderate_members"], + moderation_type=type_registry["mute"], + duration=duration, + reason=reason, ) - await interaction.response.send_message( - content=f"{target.mention} has been muted for {humanize_timedelta(timedelta=parsed_time)}!\n**Reason** - `{reason}`", - ) - - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="muted", - response=await interaction.original_response(), - duration=parsed_time, - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "MUTE", - "USER", - target.id, - 0, - parsed_time, - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has been muted for {humanize_timedelta(timedelta=parsed_time)}! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) - @app_commands.command(name="unmute") async def unmute( self, interaction: discord.Interaction, target: discord.Member, - reason: str = None, - silent: bool = None, + reason: str | None = None, + silent: bool | None = None, ): """Unmute a user. @@ -634,71 +374,22 @@ class Aurora(commands.Cog): Why are you unmuting this user? silent: bool Should the user be messaged?""" - if not await check_moddable(target, interaction, ["moderate_members"]): - return - - if target.is_timed_out() is False: - await interaction.response.send_message( - error(f"{target.mention} is not muted!"), - allowed_mentions=discord.AllowedMentions(users=False), - ephemeral=True, - ) - return - - if reason: - await target.timeout( - None, - reason=f"Unmuted by {interaction.user.id} for: {reason}", - ) - else: - await target.timeout(None, reason=f"Unbanned by {interaction.user.id}") - reason = "No reason given." - - await interaction.response.send_message( - content=f"{target.mention} has been unmuted!\n**Reason** - `{reason}`", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["moderate_members"], + moderation_type=type_registry["unmute"], + reason=reason, ) - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="unmuted", - response=await interaction.original_response(), - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "UNMUTE", - "USER", - target.id, - 0, - "NULL", - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has been unmuted! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) - @app_commands.command(name="kick") async def kick( self, interaction: discord.Interaction, target: discord.Member, reason: str, - silent: bool = None, + silent: bool | None = None, ): """Kick a user. @@ -710,49 +401,15 @@ class Aurora(commands.Cog): Why are you kicking this user? silent: bool Should the user be messaged?""" - if not await check_moddable(target, interaction, ["kick_members"]): - return - - await interaction.response.send_message( - content=f"{target.mention} has been kicked!\n**Reason** - `{reason}`", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["kick_members"], + moderation_type=type_registry["kick"], + reason=reason, ) - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="kicked", - response=await interaction.original_response(), - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - await target.kick(reason=f"Kicked by {interaction.user.id} for: {reason}") - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "KICK", - "USER", - target.id, - 0, - "NULL", - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has been kicked! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) - @app_commands.command(name="ban") @app_commands.choices( delete_messages=[ @@ -762,16 +419,16 @@ class Aurora(commands.Cog): Choice(name="1 Day", value=86400), Choice(name="3 Days", value=259200), Choice(name="7 Days", value=604800), - ], + ] ) async def ban( self, interaction: discord.Interaction, target: discord.User, reason: str, - duration: str = None, - delete_messages: Choice[int] = None, - silent: bool = None, + duration: str | None = None, + delete_messages: Choice[int] | None = None, + silent: bool | None = None, ): """Ban a user. @@ -787,134 +444,35 @@ class Aurora(commands.Cog): How many days of messages to delete? silent: bool Should the user be messaged?""" - if not await check_moddable(target, interaction, ["ban_members"]): - return - - if delete_messages is None: - delete_messages_seconds = 0 - else: - delete_messages_seconds = delete_messages.value - - try: - await interaction.guild.fetch_ban(target) - await interaction.response.send_message( - content=error(f"{target.mention} is already banned!"), - ephemeral=True, - ) - return - except discord.errors.NotFound: - pass - if duration: - parsed_time = parse_relativedelta(duration) - if parsed_time is None: - await interaction.response.send_message( - content=error("Please provide a valid duration!"), - ephemeral=True, - ) - return - try: - parsed_time = timedelta_from_relativedelta(parsed_time) - except ValueError: - await interaction.response.send_message( - content=error("Please provide a valid duration!"), - ephemeral=True, - ) - return - - await interaction.response.send_message( - content=f"{target.mention} has been banned for {humanize_timedelta(timedelta=parsed_time)}!\n**Reason** - `{reason}`", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["ban_members"], + moderation_type=type_registry["tempban"], + reason=reason, + duration=duration, + delete_messages=delete_messages, ) - - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="tempbanned", - response=await interaction.original_response(), - duration=parsed_time, - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - await interaction.guild.ban( - target, - reason=f"Tempbanned by {interaction.user.id} for: {reason} (Duration: {parsed_time})", - delete_message_seconds=delete_messages_seconds, - ) - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "TEMPBAN", - "USER", - target.id, - 0, - parsed_time, - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has been banned for {humanize_timedelta(timedelta=parsed_time)}! (Case `#{moderation_id}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) else: - await interaction.response.send_message( - content=f"{target.mention} has been banned!\n**Reason** - `{reason}`", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["ban_members"], + moderation_type=type_registry["ban"], + reason=reason, + delete_messages=delete_messages, ) - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="banned", - response=await interaction.original_response(), - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - await interaction.guild.ban( - target, - reason=f"Banned by {interaction.user.id} for: {reason}", - delete_message_seconds=delete_messages_seconds, - ) - - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "BAN", - "USER", - target.id, - 0, - "NULL", - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has been banned! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) - - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) - @app_commands.command(name="unban") async def unban( self, interaction: discord.Interaction, target: discord.User, - reason: str = None, - silent: bool = None, + reason: str | None = None, + silent: bool | None = None, ): """Unban a user. @@ -926,78 +484,61 @@ class Aurora(commands.Cog): Why are you unbanning this user? silent: bool Should the user be messaged?""" - if not await check_moddable(target, interaction, ["ban_members"]): - return - - try: - await interaction.guild.fetch_ban(target) - except discord.errors.NotFound: - await interaction.response.send_message( - content=error(f"{target.mention} is not banned!"), - ephemeral=True, - ) - return - - if reason: - await interaction.guild.unban( - target, - reason=f"Unbanned by {interaction.user.id} for: {reason}", - ) - else: - await interaction.guild.unban( - target, - reason=f"Unbanned by {interaction.user.id}", - ) - reason = "No reason given." - - await interaction.response.send_message( - content=f"{target.mention} has been unbanned!\n**Reason** - `{reason}`", + await self.moderate( + ctx=interaction, + target=target, + silent=silent, + permissions=["ban_members"], + moderation_type=type_registry["unban"], + reason=reason, ) - if silent is None: - silent = not await config.guild(interaction.guild).dm_users() - if silent is False: - try: - embed = await message_factory( - await self.bot.get_embed_color(interaction.channel), - guild=interaction.guild, - moderator=interaction.user, - reason=reason, - moderation_type="unbanned", - response=await interaction.original_response(), - ) - await target.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass + @app_commands.command(name="slowmode") + async def slowmode( + self, + interaction: discord.Interaction, + interval: int, + channel: discord.TextChannel | None = None, + reason: str | None = None, + ): + """Set the slowmode of a channel. - moderation_id = await mysql_log( - interaction.guild.id, - interaction.user.id, - "UNBAN", - "USER", - target.id, - 0, - "NULL", - reason, - ) - await interaction.edit_original_response( - content=f"{target.mention} has been unbanned! (Case `#{moderation_id:,}`)\n**Reason** - `{reason}`", - ) - await log(interaction, moderation_id) + Parameters + ----------- + interval: int + The slowmode interval in seconds + channel: discord.TextChannel + The channel to set the slowmode in + reason: str + Why are you setting the slowmode?""" + if channel is None: + channel = interaction.channel - case = await fetch_case(moderation_id, interaction.guild.id) - await send_evidenceformat(interaction, case) + await self.moderate( + ctx=interaction, + target=channel, + silent=True, + permissions=["manage_channel"], + moderation_type=type_registry["slowmode"], + interval=interval, + reason=reason, + ) @app_commands.command(name="history") async def history( self, interaction: discord.Interaction, - target: discord.User = None, - moderator: discord.User = None, - pagesize: app_commands.Range[int, 1, 20] = None, + target: discord.User | None = None, + moderator: discord.User | None = None, + pagesize: app_commands.Range[int, 1, 20] | None = None, page: int = 1, - ephemeral: bool = None, - inline: bool = None, + on: str | None = None, + before: str | None = None, + after: str | None = None, + expired: bool | None = None, + types: str | None = None, + ephemeral: bool | None = None, + inline: bool | None = None, export: bool = False, ): """List previous infractions. @@ -1012,12 +553,22 @@ class Aurora(commands.Cog): Amount of infractions to list per page page: int Page to select + on: str + List infractions on a certain date + before: str + List infractions before a certain date + after: str + List infractions after a certain date + expired: bool + List expired or unexpired infractions + types: str + List infractions of specific types, comma separated ephemeral: bool Hide the command response inline: bool Display infractions in a grid arrangement (does not look very good) export: bool - Exports the server's entire moderation history to a JSON file""" + Exports the server's moderation history to a JSON file""" if ephemeral is None: ephemeral = await config.user(interaction.user).history_ephemeral() or await config.guild(interaction.guild).history_ephemeral() or False @@ -1030,182 +581,167 @@ class Aurora(commands.Cog): else: pagesize = await config.user(interaction.user).history_pagesize() or await config.guild(interaction.guild).history_pagesize() or 5 + if before and not on: + try: + before = parse(before) + except (ParserError, OverflowError) as e: + if isinstance(e, ParserError): + await interaction.response.send_message(content=error("Invalid date format for `before` parameter!"), ephemeral=True) + return + if isinstance(e, OverflowError): + await interaction.response.send_message(content=error("Date is too far in the future!"), ephemeral=True) + return + + if after and not on: + try: + after = parse(after) + except (ParserError, OverflowError) as e: + if isinstance(e, ParserError): + await interaction.response.send_message(content=error("Invalid date format for `after` parameter!"), ephemeral=True) + return + if isinstance(e, OverflowError): + await interaction.response.send_message(content=error("Date is too far in the future!"), ephemeral=True) + return + + if on: + try: + on = parse(on) + except (ParserError, OverflowError) as e: + if isinstance(e, ParserError): + await interaction.response.send_message(content=error("Invalid date format for `on` parameter!"), ephemeral=True) + return + if isinstance(e, OverflowError): + await interaction.response.send_message(content=error("Date is too far in the future!"), ephemeral=True) + return + + before = datetime.combine(on, datetime.max.time()) + after = datetime.combine(on, datetime.min.time()) + await interaction.response.defer(ephemeral=ephemeral) - permissions = check_permissions( - interaction.client.user, - ["embed_links"], - interaction, - ) + permissions = check_permissions(interaction.client.user, ["embed_links"], interaction) if permissions: await interaction.followup.send( - error( - f"I do not have the `{permissions}` permission, required for this action.", - ), + error(f"I do not have the `{permissions}` permission, required for this action."), ephemeral=True, ) return - database = connect() + if export and not types: + types = "all" - if export: - database.row_factory = sqlite3.Row - cursor = database.cursor() - - query = f"""SELECT * - FROM moderation_{interaction.guild.id} - ORDER BY moderation_id DESC;""" - cursor.execute(query) - - results = cursor.fetchall() - - cases = [] - for result in results: - case = dict(result) - cases.append(case) - - try: - filename = str(data_manager.cog_data_path(cog_instance=self)) + str(os.sep) + f"moderation_{interaction.guild.id}.json" - - with open(filename, "w", encoding="utf-8") as f: - json.dump(cases, f, indent=2) - - await interaction.followup.send( - file=discord.File( - filename, - f"moderation_{interaction.guild.id}.json", - ), - ephemeral=ephemeral, - ) - - os.remove(filename) - except json.JSONDecodeError as e: - await interaction.followup.send( - content=error( - "An error occured while exporting the moderation history.\nError:\n", - ) - + box(e, "py"), - ephemeral=ephemeral, - ) - cursor.close() - database.close() - return - - cursor = database.cursor() + type_list = [] + registry_values = type_registry.values() + if types: + for t in types.split(","): + stripped = t.strip().lower() + if stripped == "all": + type_list.clear() + type_list.extend((t for t in registry_values)) + break + try: + type_list.append(type_registry[stripped]) + except RegistryKeyError: + continue + else: + for t in registry_values: + if await config.custom("types", interaction.guild.id, t.key).show_in_history() is True: + type_list.append(t) if target: - query = f"""SELECT * - FROM moderation_{interaction.guild.id} - WHERE target_id = ? - ORDER BY moderation_id DESC;""" - cursor.execute(query, (target.id,)) + filename = f"moderation_target_{str(target.id)}_{str(interaction.guild.id)}.json" + moderations = await Moderation.find_by_target(bot=interaction.client, guild_id=interaction.guild.id, target=target.id, before=before, after=after, types=type_list, expired=expired) elif moderator: - query = f"""SELECT * - FROM moderation_{interaction.guild.id} - WHERE moderator_id = ? - ORDER BY moderation_id DESC;""" - cursor.execute(query, (moderator.id,)) + filename = f"moderation_moderator_{str(moderator.id)}_{str(interaction.guild.id)}.json" + moderations = await Moderation.find_by_moderator(bot=interaction.client, guild_id=interaction.guild.id, moderator=moderator.id, before=before, after=after, types=type_list, expired=expired) else: - query = f"""SELECT * - FROM moderation_{interaction.guild.id} - ORDER BY moderation_id DESC;""" - cursor.execute(query) + filename = f"moderation_{str(interaction.guild.id)}.json" + moderations = await Moderation.get_latest(bot=interaction.client, guild_id=interaction.guild.id, before=before, after=after, types=type_list, expired=expired) - results = cursor.fetchall() - result_dict_list = [] + if export: + try: + filepath = str(data_manager.cog_data_path(cog_instance=self)) + str(os.sep) + filename - for result in results: - case_dict = generate_dict(result) - if case_dict["moderation_id"] == 0: - continue - result_dict_list.append(case_dict) + with open(filepath, "w", encoding="utf-8") as f: + dump(obj=moderations, fp=f) - case_quantity = len(result_dict_list) + await interaction.followup.send( + file=discord.File(fp=filepath, filename=filename), + ephemeral=ephemeral, + ) + + os.remove(filepath) + except json.JSONDecodeError as e: + await interaction.followup.send( + content=error("An error occurred while exporting the moderation history.\nError:\n") + box(text=e, lang="py"), + ephemeral=ephemeral, + ) + return + + case_quantity = len(moderations) page_quantity = ceil(case_quantity / pagesize) start_index = (page - 1) * pagesize end_index = page * pagesize embed = discord.Embed(color=await self.bot.get_embed_color(interaction.channel)) embed.set_author(icon_url=interaction.guild.icon.url, name="Infraction History") - embed.set_footer( - text=f"Page {page:,}/{page_quantity:,} | {case_quantity:,} Results", - ) + embed.set_footer(text=f"Page {page:,}/{page_quantity:,} | {case_quantity:,} Results") memory_dict = {} - for case in result_dict_list[start_index:end_index]: - if case["target_id"] not in memory_dict: - if case["target_type"] == "USER": - memory_dict[str(case["target_id"])] = await fetch_user_dict( - interaction.client, - case["target_id"], - ) - elif case["target_type"] == "CHANNEL": - memory_dict[str(case["target_id"])] = await fetch_channel_dict( - interaction.guild, - case["target_id"], - ) - target_user = memory_dict[str(case["target_id"])] + for mod in moderations[start_index:end_index]: + if mod.target_id not in memory_dict: + memory_dict.update({str(mod.target_id): await mod.get_target()}) + target = memory_dict[str(mod.target_id)] - if case["target_type"] == "USER": - target_name = f"`{target_user['name']}`" if target_user["discriminator"] == "0" else f"`{target_user['name']}#{target_user['discriminator']}`" - elif case["target_type"] == "CHANNEL": - target_name = f"`{target_user['mention']}`" + if mod.moderator_id not in memory_dict: + memory_dict.update({str(mod.moderator_id): await mod.get_moderator()}) + moderator = memory_dict[str(mod.moderator_id)] + + field_name = f"Case #{mod.id:,} ({mod.type.string.title()})" + field_value = f"**Target:** `{target.name}` ({target.id})\n**Moderator:** `{moderator.name}` ({moderator.id})" + + if len(str(mod.reason)) > 125: + field_value += f"\n**Reason:** `{str(mod.reason)[:125]}...`" else: - target_name = "" + field_value += f"\n**Reason:** `{str(mod.reason)}`" - if case["moderator_id"] not in memory_dict: - memory_dict[str(case["moderator_id"])] = await fetch_user_dict( - interaction.client, - case["moderator_id"], - ) - moderator_user = memory_dict[str(case["moderator_id"])] - moderator_name = f"`{moderator_user['name']}`" if moderator_user["discriminator"] == "0" else f"`{moderator_user['name']}#{moderator_user['discriminator']}`" - - field_name = f"Case #{case['moderation_id']:,} ({str.title(case['moderation_type'])})" - field_value = f"**Target:** {target_name} ({target_user['id']})\n**Moderator:** {moderator_name} ({moderator_user['id']})" - - if len(case["reason"]) > 125: - field_value += f"\n**Reason:** `{str(case['reason'])[:125]}...`" - else: - field_value += f"\n**Reason:** `{str(case['reason'])}`" - - if case["duration"] != "NULL": - td = timedelta( - **{ - unit: int(val) - for unit, val in zip( - ["hours", "minutes", "seconds"], - case["duration"].split(":"), - ) - }, - ) - duration_embed = f"{humanize_timedelta(timedelta=td)} | " if bool(case["expired"]) is False else f"{humanize_timedelta(timedelta=td)} | Expired" + if mod.duration: + duration_embed = f"{humanize_timedelta(timedelta=mod.duration)} | " if mod.expired is False else f"{humanize_timedelta(timedelta=mod.duration)} | Expired" field_value += f"\n**Duration:** {duration_embed}" - field_value += f"\n**Timestamp:** | " + field_value += f"\n**Timestamp:** | " - if case["role_id"] != "0": - role = interaction.guild.get_role(int(case["role_id"])) - if role is not None: - field_value += f"\n**Role:** {role.mention}" - else: - field_value += f"\n**Role:** Deleted Role ({case['role_id']})" + if mod.role_id: + role = await mod.get_role() + field_value += f"\n**Role:** {role.mention} ({role.id})" - if bool(case["resolved"]): + if mod.resolved: field_value += "\n**Resolved:** True" embed.add_field(name=field_name, value=field_value, inline=inline) await interaction.followup.send(embed=embed, ephemeral=ephemeral) + @history.autocomplete("types") + async def _history_types(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]: # pylint: disable=unused-argument + types: List[str] = sorted(self.type_registry.keys()) + choices = [] + if current.endswith(","): + for c in current.split(","): + if c in types: + types.remove(c) + for t in types: + choices.append(app_commands.Choice(name=current + t, value=current + t)) + else: + choices.append(app_commands.Choice(name="all", value="all")) + for t in types: + if t.startswith(current): + choices.append(app_commands.Choice(name=t, value=t)) + return choices[:25] + @app_commands.command(name="resolve") - async def resolve( - self, - interaction: discord.Interaction, - case: int, - reason: str = None, - ): + async def resolve(self, interaction: discord.Interaction, case: int, reason: str = "No reason provided."): """Resolve a specific case. Parameters @@ -1216,149 +752,59 @@ class Aurora(commands.Cog): Reason for resolving case""" permissions = check_permissions( interaction.client.user, - ["embed_links", "moderate_members", "ban_members"], + ("embed_links", "moderate_members", "ban_members"), interaction, ) if permissions: await interaction.response.send_message( - error( - f"I do not have the `{permissions}` permission, required for this action.", - ), + error(f"I do not have the `{permissions}` permission, required for this action."), ephemeral=True, ) return - database = connect() - cursor = database.cursor() - - query_1 = f"SELECT * FROM moderation_{interaction.guild.id} WHERE moderation_id = ?;" - cursor.execute(query_1, (case,)) - result_1 = cursor.fetchone() - if result_1 is None or case == 0: + try: + moderation = await Moderation.find_by_id(interaction.client, case, interaction.guild.id) + except ValueError: + await interaction.response.send_message(content=error(f"Case #{case:,} does not exist!"), ephemeral=True) + return + if len(moderation.changes) > 25: await interaction.response.send_message( - content=error(f"There is no moderation with a case number of {case}."), + content=error("Due to limitations with Discord's embed system, you cannot edit a case more than 25 times."), ephemeral=True, ) return - query_2 = f"SELECT * FROM moderation_{interaction.guild.id} WHERE moderation_id = ? AND resolved = 0;" - cursor.execute(query_2, (case,)) - result_2 = cursor.fetchone() - if result_2 is None: - await interaction.response.send_message( - content=error( - f"This moderation has already been resolved!\nUse `/case {case}` for more information.", - ), - ephemeral=True, - ) - return - - case_dict = generate_dict(result_2) - if reason is None: - reason = "No reason given." - - changes: list = case_dict["changes"] - if len(changes) > 25: - await interaction.response.send_message( - content=error( - "Due to limitations with Discord's embed system, you cannot edit a case more than 25 times.", - ), - ephemeral=True, - ) - return - if not changes: - changes.append( - { - "type": "ORIGINAL", - "timestamp": case_dict["timestamp"], - "reason": case_dict["reason"], - "user_id": case_dict["moderator_id"], - }, - ) - changes.append( - { - "type": "RESOLVE", - "timestamp": int(time.time()), - "reason": reason, - "user_id": interaction.user.id, - }, - ) - - if case_dict["moderation_type"] in ["UNMUTE", "UNBAN"]: - await interaction.response.send_message( - content=error("You cannot resolve this type of moderation!"), - ephemeral=True, - ) - return - - if case_dict["moderation_type"] in ["MUTE", "TEMPBAN", "BAN"]: - if case_dict["moderation_type"] == "MUTE": - try: - member = await interaction.guild.fetch_member( - case_dict["target_id"], - ) - - await member.timeout( - None, - reason=f"Case #{case:,} resolved by {interaction.user.id}", - ) - except discord.NotFound: - pass - - if case_dict["moderation_type"] in ["TEMPBAN", "BAN"]: - try: - user = await interaction.client.fetch_user(case_dict["target_id"]) - - await interaction.guild.unban( - user, - reason=f"Case #{case} resolved by {interaction.user.id}", - ) - except discord.NotFound: - pass - - resolve_query = f"UPDATE `moderation_{interaction.guild.id}` SET resolved = 1, changes = ?, resolved_by = ?, resolve_reason = ? WHERE moderation_id = ?" - else: - resolve_query = f"UPDATE `moderation_{interaction.guild.id}` SET resolved = 1, changes = ?, resolved_by = ?, resolve_reason = ? WHERE moderation_id = ?" - - cursor.execute( - resolve_query, - ( - json.dumps(changes), - interaction.user.id, - reason, - case_dict["moderation_id"], - ), - ) - database.commit() + try: + success, msg = await moderation.resolve(interaction.user.id, reason) + except (ValueError, TypeError) as e: + if isinstance(e, ValueError): + await interaction.response.send_message(content=error("This case has already been resolved!"), ephemeral=True) + elif isinstance(e, TypeError): + await interaction.response.send_message(content=error("This case type cannot be resolved!"), ephemeral=True) embed = await case_factory( interaction=interaction, - case_dict=await fetch_case(case, interaction.guild.id), + moderation=moderation, ) - await interaction.response.send_message( - content=f"✅ Moderation #{case:,} resolved!", - embed=embed, - ) - await log(interaction, case, resolved=True) - - cursor.close() - database.close() + await interaction.response.send_message(content=f"✅ Moderation #{case:,} resolved!\n" + error(f"Resolve handler returned an error message: `{msg}`") if success is False else "", embed=embed) + ctx = await self.bot.get_context(interaction, cls=commands.Context) + await log(ctx=ctx, moderation_id=case, resolved=True) @app_commands.command(name="case") @app_commands.choices( - export=[ - Choice(name="Export as File", value="file"), + raw=[ Choice(name="Export as Codeblock", value="codeblock"), - ], + Choice(name="Export as File", value="file"), + ] ) async def case( self, interaction: discord.Interaction, case: int, - ephemeral: bool = None, + ephemeral: bool | None = None, evidenceformat: bool = False, changes: bool = False, - export: Choice[str] = None, + raw: Choice[str] | None = None, ): """Check the details of a specific case. @@ -1368,20 +814,16 @@ class Aurora(commands.Cog): What case are you looking up? ephemeral: bool Hide the command response + evidenceformat: bool + Display the evidence format of the case changes: bool List the changes made to the case - export: bool + raw: bool Export the case to a JSON file or codeblock""" - permissions = check_permissions( - interaction.client.user, - ["embed_links"], - interaction, - ) + permissions = check_permissions(interaction.client.user, ["embed_links"], interaction) if permissions: await interaction.response.send_message( - error( - f"I do not have the `{permissions}` permission, required for this action.", - ), + error(f"I do not have the `{permissions}` permission, required for this action."), ephemeral=True, ) return @@ -1389,79 +831,57 @@ class Aurora(commands.Cog): if ephemeral is None: ephemeral = await config.user(interaction.user).history_ephemeral() or await config.guild(interaction.guild).history_ephemeral() or False - if case != 0: - case_dict = await fetch_case(case, interaction.guild.id) - if case_dict: - if export: - if export.value == "file" or len(str(case_dict)) > 1800: - filename = str(data_manager.cog_data_path(cog_instance=self)) + str(os.sep) + f"moderation_{interaction.guild.id}_case_{case}.json" + try: + mod = await Moderation.find_by_id(interaction.client, case, interaction.guild.id) + except ValueError: + await interaction.response.send_message(content=error(f"Case #{case:,} does not exist!"), ephemeral=True) + return - with open(filename, "w", encoding="utf-8") as f: - json.dump(case_dict, f, indent=2) + if raw: + if raw.value == "file" or len(mod.to_json(2)) > 1800: + filename = str(data_manager.cog_data_path(cog_instance=self)) + str(os.sep) + f"moderation_{interaction.guild.id}_case_{case}.json" - if export.value == "codeblock": - content = f"Case #{case:,} exported.\n" + warning( - "Case was too large to export as codeblock, so it has been uploaded as a `.json` file.", - ) - else: - content = f"Case #{case:,} exported." - - await interaction.response.send_message( - content=content, - file=discord.File( - filename, - f"moderation_{interaction.guild.id}_case_{case}.json", - ), - ephemeral=ephemeral, - ) - - os.remove(filename) - return - await interaction.response.send_message( - content=box(json.dumps(case_dict, indent=2), "json"), - ephemeral=ephemeral, - ) - return - if changes: - embed = await changes_factory( - interaction=interaction, - case_dict=case_dict, - ) - await interaction.response.send_message( - embed=embed, - ephemeral=ephemeral, - ) - elif evidenceformat: - content = await evidenceformat_factory( - interaction=interaction, - case_dict=case_dict, - ) - await interaction.response.send_message( - content=content, - ephemeral=ephemeral, - ) + with open(filename, "w", encoding="utf-8") as f: + mod.to_json(2, f) + if raw.value == "codeblock": + content = f"Case #{case:,} exported.\n" + warning("Case was too large to export as codeblock, so it has been uploaded as a `.json` file.") else: - embed = await case_factory( - interaction=interaction, - case_dict=case_dict, - ) - await interaction.response.send_message( - embed=embed, - ephemeral=ephemeral, - ) + content = f"Case #{case:,} exported." + + await interaction.response.send_message( + content=content, + file=discord.File( + filename, + f"moderation_{interaction.guild.id}_case_{case}.json", + ), + ephemeral=ephemeral, + ) + + os.remove(filename) return - await interaction.response.send_message( - content=f"No case with case number `{case}` found.", - ephemeral=True, - ) + await interaction.response.send_message( + content=box(mod.to_json(2), "json"), + ephemeral=ephemeral, + ) + return + if changes: + embed = await changes_factory(interaction=interaction, moderation=mod) + await interaction.response.send_message(embed=embed, ephemeral=ephemeral) + elif evidenceformat: + content = await evidenceformat_factory(moderation=mod) + await interaction.response.send_message(content=content, ephemeral=ephemeral) + else: + embed = await case_factory(interaction=interaction, moderation=mod) + await interaction.response.send_message(embed=embed, ephemeral=ephemeral) + return @app_commands.command(name="edit") async def edit( self, interaction: discord.Interaction, case: int, - reason: str, - duration: str = None, + reason: str | None = None, + duration: str | None = None, ): """Edit the reason of a specific case. @@ -1474,309 +894,147 @@ class Aurora(commands.Cog): duration: str What is the new duration? Does not reapply the moderation if it has already expired. """ - end_timestamp = None - permissions = check_permissions( - interaction.client.user, - ["embed_links"], - interaction, - ) + permissions = check_permissions(interaction.client.user, ["embed_links"], interaction) if permissions: await interaction.response.send_message( - error( - f"I do not have the `{permissions}` permission, required for this action.", - ), + error(f"I do not have the `{permissions}` permission, required for this action."), ephemeral=True, ) return - if case != 0: - parsed_time = None - case_dict = await fetch_case(case, interaction.guild.id) - if case_dict: - if duration: - parsed_time = parse_timedelta(duration) - if parsed_time is None: - await interaction.response.send_message( - error("Please provide a valid duration!"), - ephemeral=True, - ) - return + try: + moderation = await Moderation.find_by_id(interaction.client, case, interaction.guild.id) + old_moderation = moderation.model_copy() + except ValueError: + await interaction.response.send_message(content=error(f"Case #{case:,} does not exist!"), ephemeral=True) + return - end_timestamp = case_dict["timestamp"] + parsed_time.total_seconds() + if len(moderation.changes) > 25: + return await interaction.response.send_message( + content=error("Due to limitations with Discord's embed system, you cannot edit a case more than 25 times."), + ephemeral=True, + ) - if case_dict["moderation_type"] == "MUTE": - if (time.time() - case_dict["timestamp"]) + parsed_time.total_seconds() > 2419200: - await interaction.response.send_message( - error( - "Please provide a duration that is less than 28 days from the initial moderation.", - ), - ) - return + if duration: + try: + parsed_time = parse_relativedelta(argument=duration) + if parsed_time is None: + raise commands.BadArgument() + moderation.duration = timedelta_from_relativedelta(relativedelta=parsed_time) + except (commands.BadArgument, ValueError): + return await interaction.response.send_message(error("Please provide a valid duration!"), ephemeral=True) - try: - member = await interaction.guild.fetch_member( - case_dict["target_id"], - ) + moderation.end_timestamp = moderation.timestamp + timedelta(seconds=moderation.duration.total_seconds()) - await member.timeout( - parsed_time, - reason=f"Case #{case:,} edited by {interaction.user.id}", - ) - except discord.NotFound: - pass - - changes: list = case_dict["changes"] - if len(changes) > 25: - await interaction.response.send_message( - content=error( - "Due to limitations with Discord's embed system, you cannot edit a case more than 25 times.", - ), - ephemeral=True, - ) - return - if not changes: - changes.append( - { - "type": "ORIGINAL", - "timestamp": case_dict["timestamp"], - "reason": case_dict["reason"], - "user_id": case_dict["moderator_id"], - "duration": case_dict["duration"], - "end_timestamp": case_dict["end_timestamp"], - }, - ) - if parsed_time: - assert end_timestamp is not None - changes.append( - { - "type": "EDIT", - "timestamp": int(time.time()), - "reason": reason, - "user_id": interaction.user.id, - "duration": convert_timedelta_to_str(parsed_time), - "end_timestamp": end_timestamp, - }, - ) - else: - changes.append( - { - "type": "EDIT", - "timestamp": int(time.time()), - "reason": reason, - "user_id": interaction.user.id, - "duration": case_dict["duration"], - "end_timestamp": case_dict["end_timestamp"], - }, - ) - - database = connect() - cursor = database.cursor() - - if parsed_time: - update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = ?, reason = ?, duration = ?, end_timestamp = ? WHERE moderation_id = ?" - cursor.execute( - update_query, - ( - json.dumps(changes), - reason, - convert_timedelta_to_str(parsed_time), - end_timestamp, - case, - ), - ) - else: - update_query = f"UPDATE `moderation_{interaction.guild.id}` SET changes = ?, reason = ? WHERE moderation_id = ?" - cursor.execute(update_query, (json.dumps(changes), reason, case)) - database.commit() - - new_case = await fetch_case(case, interaction.guild.id) - embed = await case_factory(interaction=interaction, case_dict=new_case) - - await interaction.response.send_message( - content=f"✅ Moderation #{case:,} edited!", - embed=embed, - ephemeral=True, - ) - await log(interaction, case) - - cursor.close() - database.close() + try: + success = await moderation.type.duration_edit_handler(interaction=interaction, old_moderation=old_moderation, new_moderation=moderation) + except NotImplementedError: + return await interaction.response.send_message(error("This case type does not support duration editing!"), ephemeral=True) + if not success: return + + if reason: + moderation.reason = reason + + if not reason and not duration: + return await interaction.response.send_message(error("Please provide a new reason or duration to edit this case!"), ephemeral=True) + + if not moderation.changes: + moderation.changes.append( + Change.from_dict( + interaction.client, + { + "type": "ORIGINAL", + "timestamp": old_moderation.timestamp, + "reason": old_moderation.reason, + "user_id": old_moderation.moderator_id, + "duration": timedelta_to_string(old_moderation.duration) if old_moderation.duration else None, + "end_timestamp": old_moderation.end_timestamp, + }, + ) + ) + moderation.changes.append( + Change.from_dict( + interaction.client, + { + "type": "EDIT", + "timestamp": int(time.time()), + "reason": reason if reason else None, + "user_id": interaction.user.id, + "duration": timedelta_to_string(moderation.duration) if duration else None, + "end_timestamp": moderation.end_timestamp if duration else None, + }, + ) + ) + + await moderation.update() + embed = await case_factory(interaction=interaction, moderation=moderation) + await interaction.response.send_message( - content=error(f"No case with case number `{case}` found."), + content=f"✅ Moderation #{case:,} edited!", + embed=embed, ephemeral=True, ) + await log(await self.bot.get_context(interaction), case) + + return @tasks.loop(minutes=1) async def handle_expiry(self): await self.bot.wait_until_red_ready() current_time = time.time() - database = connect() - cursor = database.cursor() global_unban_num = 0 global_addrole_num = 0 global_removerole_num = 0 + global_other_num = 0 + global_err_num = 0 guilds: list[discord.Guild] = self.bot.guilds for guild in guilds: if not await self.bot.cog_disabled_in_guild(self, guild): time_per_guild = time.time() - tempban_query = f"SELECT target_id, moderation_id FROM moderation_{guild.id} WHERE end_timestamp != 0 AND end_timestamp <= ? AND moderation_type = 'TEMPBAN' AND expired = 0" - - try: - cursor.execute(tempban_query, (time.time(),)) - result = cursor.fetchall() - except sqlite3.OperationalError: - continue - - target_ids = [row[0] for row in result] - moderation_ids = [row[1] for row in result] + query = f"SELECT * FROM moderation_{guild.id} WHERE end_timestamp IS NOT NULL AND end_timestamp <= ? AND expired = 0" + moderations = await Moderation.execute(bot=self.bot, guild_id=guild.id, query=query, parameters=(time.time(),)) unban_num = 0 - for target_id, moderation_id in zip(target_ids, moderation_ids): - user: discord.User = await self.bot.fetch_user(target_id) - name = f"{user.name}#{user.discriminator}" if user.discriminator != "0" else user.name - try: - await guild.unban( - user, - reason=f"Automatic unban from case #{moderation_id}", - ) - - embed = await message_factory( - await self.bot.get_embed_color(guild.channels[0]), - guild=guild, - reason=f"Automatic unban from case #{moderation_id}", - moderation_type="unbanned", - ) - - try: - await user.send(embed=embed, file=get_footer_image(self)) - except discord.errors.HTTPException: - pass - - logger.debug( - "Unbanned %s (%s) from %s (%s)", - name, - user.id, - guild.name, - guild.id, - ) - unban_num = unban_num + 1 - except ( - discord.errors.NotFound, - discord.errors.Forbidden, - discord.errors.HTTPException, - ) as e: - logger.error( - "Failed to unban %s (%s) from %s (%s)\n%s", - name, - user.id, - guild.name, - guild.id, - e, - ) - removerole_num = 0 - addrole_query = f"SELECT target_id, moderation_id, role_id FROM moderation_{guild.id} WHERE end_timestamp != 0 AND end_timestamp <= ? AND moderation_type = 'ADDROLE' AND expired = 0" - try: - cursor.execute(addrole_query, (time.time(),)) - result = cursor.fetchall() - except sqlite3.OperationalError: - continue - target_ids = [row[0] for row in result] - moderation_ids = [row[1] for row in result] - role_ids = [row[2] for row in result] - - for target_id, moderation_id, role_id in zip( - target_ids, - moderation_ids, - role_ids, - ): - try: - member = await guild.fetch_member(target_id) - - await member.remove_roles( - Object(role_id), - reason=f"Automatic role removal from case #{moderation_id}", - ) - - removerole_num = removerole_num + 1 - except ( - discord.errors.NotFound, - discord.errors.Forbidden, - discord.errors.HTTPException, - ) as e: - logger.error( - "Removing the role %s from user %s failed due to: \n%s", - role_id, - target_id, - e, - ) - continue - addrole_num = 0 - removerole_query = f"SELECT target_id, moderation_id, role_id FROM moderation_{guild.id} WHERE end_timestamp != 0 AND end_timestamp <= ? AND moderation_type = 'REMOVEROLE' AND expired = 0" - try: - cursor.execute(removerole_query, (time.time(),)) - result = cursor.fetchall() - except sqlite3.OperationalError: - continue - target_ids = [row[0] for row in result] - moderation_ids = [row[1] for row in result] - role_ids = [row[2] for row in result] - - for target_id, moderation_id, role_id in zip( - target_ids, - moderation_ids, - role_ids, - ): + other_num = 0 + error_num = 0 + for moderation in moderations: try: - member = await guild.fetch_member(target_id) - - await member.add_roles( - Object(role_id), - reason=f"Automatic role addition from case #{moderation_id}", - ) - - addrole_num = addrole_num + 1 - except ( - discord.errors.NotFound, - discord.errors.Forbidden, - discord.errors.HTTPException, - ) as e: - logger.error("Adding the role %s to user %s failed due to: \n%s", role_id, target_id, e) + num = await moderation.type.expiry_handler(moderation) + except NotImplementedError: + logger.warning("Expiry handler not implemented for expirable moderation type %s", moderation.type.key) continue + except Exception as e: # pylint: disable=broad-except + logger.exception("Expiry handler failed for moderation %s with the type %s", moderation.id, moderation.type.key, exc_info=e) + error_num += 1 + continue + match moderation.type.key: + case "tempban": + unban_num += num + case "addrole": + removerole_num += num + case "removerole": + addrole_num += num + case _: + other_num += num if isinstance(num, int) else 0 - expiry_query = f"UPDATE `moderation_{guild.id}` SET expired = 1 WHERE (end_timestamp != 0 AND end_timestamp <= ? AND expired = 0) OR (expired = 0 AND resolved = 1);" - cursor.execute(expiry_query, (time.time(),)) + expiry_query = f"UPDATE `moderation_{guild.id}` SET expired = 1 WHERE (end_timestamp IS NOT NULL AND end_timestamp <= ? AND expired = 0) OR (expired = 0 AND resolved = 1);" + await Moderation.execute(bot=self.bot, guild_id=guild.id, query=expiry_query, parameters=(time.time(),), return_obj=False) per_guild_completion_time = (time.time() - time_per_guild) * 1000 - logger.debug( - "Completed expiry loop for %s (%s) in %sms with %s users unbanned, %s roles added, and %s roles removed", - guild.name, - guild.id, - f"{per_guild_completion_time:.6f}", - unban_num, - addrole_num, - removerole_num, - ) + logger.debug("Completed expiry loop for %s (%s) in %sms with %s errors, %s users unbanned, %s roles added, and %s roles removed (%s other cases expired)", guild.name, guild.id, f"{per_guild_completion_time:.6f}", error_num, unban_num, addrole_num, removerole_num, other_num) global_unban_num = global_unban_num + unban_num global_addrole_num = global_addrole_num + addrole_num global_removerole_num = global_removerole_num + removerole_num - - database.commit() - cursor.close() - database.close() + global_other_num = global_other_num + other_num + global_err_num = global_err_num + error_num completion_time = (time.time() - current_time) * 1000 - logger.debug( - "Completed expiry loop in %sms with %s users unbanned, %s roles added, and %s roles removed", - f"{completion_time:.6f}", - global_unban_num, - global_addrole_num, - global_removerole_num, - ) + logger.debug("Completed expiry loop in %sms with %s errors, %s users unbanned, %s roles added, and %s roles removed (%s other cases expired)", f"{completion_time:.6f}", global_err_num, global_unban_num, global_addrole_num, global_removerole_num, global_other_num) ######################################################################################################################## ### Configuration Commands # @@ -1792,7 +1050,7 @@ class Aurora(commands.Cog): @aurora_settings.command(name="overrides", aliases=["override", "user"]) async def aurora_settings_overrides(self, ctx: commands.Context): - """Manage Aurora's user overriddable settings.""" + """Manage Aurora's user overridable settings.""" msg = await ctx.send(embed=await overrides_embed(ctx)) await msg.edit(view=Overrides(ctx, msg, 60)) @@ -1804,6 +1062,22 @@ class Aurora(commands.Cog): msg = await ctx.send(embed=await guild_embed(ctx)) await msg.edit(view=Guild(ctx, msg, 60)) + @aurora_settings.command(name="type") + @commands.admin_or_permissions(manage_guild=True) + @commands.guild_only() + async def aurora_settings_type(self, ctx: commands.Context, moderation_type: str): + """Manage configuration options for specific moderation types. + + See [the documentation](https://seacogs.coastalcommits.com/Aurora/Types) for a list of built-in moderation types, or run this command with a junk argument (`awasd` or something) to see a list of valid types.""" + try: + registered_type = type_registry.get(moderation_type) + except RegistryKeyError: + types = "`, `".join(type_registry.keys()) + await ctx.send(error(f"`{moderation_type}` is not a valid moderation type.\nValid types are:\n`{types}`")) + return + msg = await ctx.send(embed=await type_embed(ctx, registered_type)) + await msg.edit(view=Types(ctx, msg, registered_type)) + @aurora_settings.command(name="addrole", aliases=["removerole"]) @commands.admin_or_permissions(manage_guild=True) @commands.guild_only() @@ -1833,12 +1107,10 @@ class Aurora(commands.Cog): async def aurora_import_aurora(self, ctx: commands.Context): """Import moderation history from another bot using Aurora.""" if ctx.message.attachments and ctx.message.attachments[0].content_type == "application/json; charset=utf-8": - message = await ctx.send( - warning( - "Are you sure you want to import moderations from another bot?\n**This will overwrite any moderations that already exist in this guild's moderation table.**\n*The import process will block the rest of your bot until it is complete.*", - ), - ) - await message.edit(view=ImportAuroraView(60, ctx, message)) + file = await ctx.message.attachments[0].read() + data: list[dict] = sorted(json.loads(file), key=lambda x: x["moderation_id"]) + message = await ctx.send(warning("Are you sure you want to import moderations from another bot?\n**This will overwrite any moderations that already exist in this guild's moderation table.**\n*The import process will block the rest of your bot until it is complete.*")) + await message.edit(view=ImportAuroraView(60, ctx, message, data)) else: await ctx.send(error("Please provide a valid Aurora export file.")) @@ -1847,18 +1119,35 @@ class Aurora(commands.Cog): async def aurora_import_galacticbot(self, ctx: commands.Context): """Import moderation history from GalacticBot.""" if ctx.message.attachments and ctx.message.attachments[0].content_type == "application/json; charset=utf-8": - message = await ctx.send( - warning( - "Are you sure you want to import GalacticBot moderations?\n**This will overwrite any moderations that already exist in this guild's moderation table.**\n*The import process will block the rest of your bot until it is complete.*", - ), - ) + message = await ctx.send(warning("Are you sure you want to import GalacticBot moderations?\n**This will overwrite any moderations that already exist in this guild's moderation table.**\n*The import process will block the rest of your bot until it is complete.*")) await message.edit(view=ImportGalacticBotView(60, ctx, message)) else: - await ctx.send( - error("Please provide a valid GalacticBot moderation export file."), - ) + await ctx.send(error("Please provide a valid GalacticBot moderation export file.")) - @aurora.command(aliases=["tdc", "td", "timedeltaconvert"]) + @aurora.group(autohelp=True, name="convert") + async def aurora_convert(self, ctx: commands.Context): + """Convert strings to various Python objects.""" + + @aurora_convert.command(aliases=["dt"]) + async def datetime(self, ctx: commands.Context, *, date: str) -> None: + """Convert a string to a datetime object. + + This command converts a date to a [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime) Python object. + + **Example usage** + `[p]aurora datetime 08/20/2024` + **Output** + `2024-08-20 12:00:00`""" + try: + parsed_date = parse(date) + await ctx.send(f"`{parsed_date}`") + except (ParserError, OverflowError) as e: + if isinstance(e, ParserError): + await ctx.send(error("Invalid date format!")) + if isinstance(e, OverflowError): + await ctx.send(error("Date is too far in the future!")) + + @aurora_convert.command(aliases=["td"]) async def timedelta(self, ctx: commands.Context, *, duration: str) -> None: """Convert a string to a timedelta. @@ -1875,7 +1164,7 @@ class Aurora(commands.Cog): return await ctx.send(f"`{parsed_time}`") - @aurora.command(aliases=["rdc", "rd", "relativedeltaconvert"]) + @aurora_convert.command(aliases=["rd"]) async def relativedelta(self, ctx: commands.Context, *, duration: str) -> None: """Convert a string to a relativedelta. @@ -1890,3 +1179,34 @@ class Aurora(commands.Cog): await ctx.send(error("Please provide a convertible value!")) return await ctx.send(f"`{parsed_time}`") + + @aurora.command(name="info") + async def aurora_info(self, ctx: commands.Context): + """Get information about Aurora.""" + embed = discord.Embed( + title="Aurora Information", + color=await self.bot.get_embed_color(ctx.channel), + timestamp=datetime.now(), + ) + embed.set_thumbnail(url=self.bot.user.avatar.url) + embed.add_field(name="Version", value=f"[{self.__version__}]({self.__git__})") + embed.add_field(name="Author", value=", ".join(self.__author__)) + if ctx.author.id in self.bot.owner_ids: + results = await Moderation.execute(query="SELECT name FROM sqlite_master WHERE type='table';", return_obj=False) + tables = [table[0] for table in results] + table_count = len(tables) + row_count = 0 + + for table in tables: + count_query = f"SELECT COUNT() FROM {table}" + result = await Moderation.execute(query=count_query, return_obj=False) + row_count += result[0][0] + + filesize = os.path.getsize(str(data_manager.cog_data_path(cog_instance=self) / "aurora.db")) / 1024 + + embed.add_field( + name="Database Stats", + value=f"{bold('Table Count:')} {table_count:,}\n{bold('Row Count:')} {row_count:,}\n{bold('File Size:')} {filesize:,.0f} KB", + ) + embed.add_field(name="Moderation Types", value=f"{len(type_registry)} registered types\n{box(', '.join(type_registry.keys()))}", inline=False) + await ctx.send(embed=embed) diff --git a/aurora/importers/aurora.py b/aurora/importers/aurora.py index af0b639..621d76f 100644 --- a/aurora/importers/aurora.py +++ b/aurora/importers/aurora.py @@ -1,34 +1,37 @@ # pylint: disable=duplicate-code import json -from datetime import timedelta -from typing import Dict +import os +from time import time +from typing import Dict, List -from discord import ButtonStyle, Interaction, Message, ui -from redbot.core import commands -from redbot.core.utils.chat_formatting import box, warning +from discord import ButtonStyle, File, Interaction, Message, ui +from redbot.core import commands, data_manager +from redbot.core.utils.chat_formatting import warning -from ..utilities.database import connect, create_guild_table, mysql_log +from ..models.moderation import Moderation +from ..models.type import Type, type_registry +from ..utilities.json import dump +from ..utilities.utils import create_guild_table, timedelta_from_string class ImportAuroraView(ui.View): - def __init__(self, timeout, ctx, message): + def __init__(self, timeout, ctx, message, data: List[Dict[str, any]]): super().__init__() self.ctx: commands.Context = ctx self.message: Message = message + self.data: List[Dict[str, any]] = data @ui.button(label="Yes", style=ButtonStyle.success) - async def import_button_y(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def import_button_y( + self, interaction: Interaction, button: ui.Button + ): # pylint: disable=unused-argument await self.message.delete() - await interaction.response.send_message("Deleting original table...", ephemeral=True) - - database = connect() - cursor = database.cursor() + await interaction.response.send_message( + "Deleting original table...", ephemeral=True + ) query = f"DROP TABLE IF EXISTS moderation_{self.ctx.guild.id};" - cursor.execute(query) - - cursor.close() - database.commit() + await Moderation.execute(query=query, return_obj=False) await interaction.edit_original_response(content="Creating new table...") @@ -36,71 +39,106 @@ class ImportAuroraView(ui.View): await interaction.edit_original_response(content="Importing moderations...") - file = await self.ctx.message.attachments[0].read() - data: list[dict] = sorted(json.loads(file), key=lambda x: x["moderation_id"]) - - user_mod_types = ["NOTE", "WARN", "ADDROLE", "REMOVEROLE", "MUTE", "UNMUTE", "KICK", "TEMPBAN", "BAN", "UNBAN"] - - channel_mod_types = ["SLOWMODE", "LOCKDOWN"] - failed_cases = [] - for case in data: + for case in self.data: if case["moderation_id"] == 0: continue + moderation_type: Type = type_registry[case["moderation_type"].lower()] if "target_type" not in case or not case["target_type"]: - if case["moderation_type"] in user_mod_types: - case["target_type"] = "USER" - elif case["moderation_type"] in channel_mod_types: - case["target_type"] = "CHANNEL" + if moderation_type.channel: + case["target_type"] = "channel" else: - case["target_type"] = "USER" + case["target_type"] = "user" if "role_id" not in case or not case["role_id"]: - case["role_id"] = 0 + case["role_id"] = None + else: + case["role_id"] = int(case["role_id"]) - if "changes" not in case or not case["changes"]: - case["changes"] = [] + case["target_id"] = int(case["target_id"]) + case["moderator_id"] = int(case["moderator_id"]) + + changes = case.get("changes", None) + if not changes: + changes = [] + else: + if not isinstance(changes, list): + changes = json.loads(changes) + if isinstance(changes, str): + changes: list[dict] = json.loads(changes) + + for change in changes: + if "bot" in change: + del change["bot"] if "metadata" not in case: metadata = {} else: - metadata: Dict[str, any] = json.loads(case["metadata"]) + if isinstance(case["metadata"], str): + metadata: Dict[str, any] = json.loads(case["metadata"]) + else: + metadata = case["metadata"] if not metadata.get("imported_from"): metadata.update({"imported_from": "Aurora"}) + metadata.update({"imported_timestamp": int(time())}) - if case["duration"] != "NULL": - hours, minutes, seconds = map(int, case["duration"].split(":")) - duration = timedelta(hours=hours, minutes=minutes, seconds=seconds) + if case["duration"] != "NULL" and case["duration"] is not None: + duration = timedelta_from_string(case["duration"]) + if moderation_type.key == "ban": + moderation_type = type_registry["tempban"] else: - duration = "NULL" + duration = None - await mysql_log( - self.ctx.guild.id, - case["moderator_id"], - case["moderation_type"], - case["target_type"], - case["target_id"], - case["role_id"], - duration, - case["reason"], - timestamp=case["timestamp"], - resolved=case["resolved"], - resolved_by=case["resolved_by"], - resolved_reason=case["resolve_reason"], - expired=case["expired"], - changes=case["changes"], - metadata=metadata, - database=database, - ) + try: + await Moderation.log( + bot=interaction.client, + guild_id=self.ctx.guild.id, + moderator_id=case["moderator_id"], + moderation_type=moderation_type, + target_type=case["target_type"].lower(), + target_id=case["target_id"], + role_id=case["role_id"], + duration=duration, + reason=case["reason"], + timestamp=case["timestamp"], + resolved=case["resolved"], + resolved_by=case["resolved_by"], + resolved_reason=case["resolve_reason"], + expired=case["expired"], + changes=changes, + metadata=metadata, + return_obj=False + ) + except Exception as e: # pylint: disable=broad-exception-caught + failed_cases.append(str(case["moderation_id"]) + f": {e}") await interaction.edit_original_response(content="Import complete.") if failed_cases: - await interaction.edit_original_response(content="Import complete.\n" + warning("Failed to import the following cases:\n") + box(failed_cases)) + filename = ( + str(data_manager.cog_data_path(cog_instance=self)) + + str(os.sep) + + f"failed_cases_{interaction.guild.id}.json" + ) + + with open(filename, "w", encoding="utf-8") as f: + dump(obj=failed_cases, fp=f, indent=2) + + await interaction.channel.send( + content="Import complete.\n" + + warning("Failed to import the following cases:\n"), + file=File( + filename, f"failed_cases_{interaction.guild.id}.json" + ) + ) + + os.remove(filename) @ui.button(label="No", style=ButtonStyle.danger) - async def import_button_n(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def import_button_n( + self, interaction: Interaction, button: ui.Button + ): # pylint: disable=unused-argument await self.message.edit(content="Import cancelled.", view=None) await self.message.delete(10) await self.ctx.message.delete(10) diff --git a/aurora/importers/galacticbot.py b/aurora/importers/galacticbot.py index 39c2c2d..0fd1cfc 100644 --- a/aurora/importers/galacticbot.py +++ b/aurora/importers/galacticbot.py @@ -1,33 +1,40 @@ # pylint: disable=duplicate-code import json from datetime import timedelta +from time import time from discord import ButtonStyle, Interaction, Message, ui from redbot.core import commands from redbot.core.utils.chat_formatting import box, warning -from ..utilities.database import connect, create_guild_table, mysql_log +from ..models.moderation import Change, Moderation +from ..utilities.utils import create_guild_table class ImportGalacticBotView(ui.View): def __init__(self, timeout, ctx, message): super().__init__() self.ctx: commands.Context = ctx + self.timeout = timeout self.message: Message = message @ui.button(label="Yes", style=ButtonStyle.success) - async def import_button_y(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def import_button_y( + self, interaction: Interaction, button: ui.Button + ): # pylint: disable=unused-argument await self.message.delete() - await interaction.response.send_message("Deleting original table...", ephemeral=True) + await interaction.response.send_message( + "Deleting original table...", ephemeral=True + ) - database = connect() - cursor = database.cursor() + database = await Moderation.connect() + cursor = await database.cursor() query = f"DROP TABLE IF EXISTS moderation_{self.ctx.guild.id};" - cursor.execute(query) + await cursor.execute(query) - cursor.close() - database.commit() + await cursor.close() + await database.commit() await interaction.edit_original_response(content="Creating new table...") @@ -63,12 +70,12 @@ class ImportGalacticBotView(ui.View): if case["duration"] is not None and float(case["duration"]) != 0: duration = timedelta(seconds=round(float(case["duration"]) / 1000)) else: - duration = "NULL" + duration = None except OverflowError: failed_cases.append(case["case"]) continue - metadata = {"imported_from": "GalacticBot"} + metadata = {"imported_from": "GalacticBot", "imported_timestamp": int(time())} if case["type"] == "SLOWMODE": metadata["seconds"] = case["data"]["seconds"] @@ -88,41 +95,43 @@ class ImportGalacticBotView(ui.View): if resolved_by is None: resolved_by = "?" if resolved_reason is None: - resolved_reason = "Could not get resolve reason during moderation import." + resolved_reason = ( + "Could not get resolve reason during moderation import." + ) if resolved_timestamp is None: resolved_timestamp = timestamp changes = [ - { + Change.from_dict(interaction.client, { "type": "ORIGINAL", "reason": case["reason"], "user_id": case["executor"], "timestamp": timestamp, - }, - { + }), + Change.from_dict(interaction.client, { "type": "RESOLVE", "reason": resolved_reason, "user_id": resolved_by, "timestamp": resolved_timestamp, - }, + }), ] else: - resolved = 0 - resolved_by = "NULL" - resolved_reason = "NULL" - changes = [] + resolved = None + resolved_by = None + resolved_reason = None + changes = None if case["reason"] and case["reason"] != "N/A": reason = case["reason"] else: - reason = "NULL" + reason = None - await mysql_log( + await Moderation.log( self.ctx.guild.id, case["executor"], case["type"], case["targetType"], case["target"], - 0, + None, duration, reason, timestamp=timestamp, @@ -136,10 +145,16 @@ class ImportGalacticBotView(ui.View): await interaction.edit_original_response(content="Import complete.") if failed_cases: - await interaction.edit_original_response(content="Import complete.\n" + warning("Failed to import the following cases:\n") + box(failed_cases)) + await interaction.edit_original_response( + content="Import complete.\n" + + warning("Failed to import the following cases:\n") + + box(failed_cases) + ) @ui.button(label="No", style=ButtonStyle.danger) - async def import_button_n(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def import_button_n( + self, interaction: Interaction, button: ui.Button + ): # pylint: disable=unused-argument await self.message.edit(content="Import cancelled.", view=None) await self.message.delete(10) await self.ctx.message.delete(10) diff --git a/aurora/info.json b/aurora/info.json index de475f2..8229183 100644 --- a/aurora/info.json +++ b/aurora/info.json @@ -9,6 +9,7 @@ "disabled": false, "min_bot_version": "3.5.0", "min_python_version": [3, 10, 0], + "requirements": ["pydantic", "aiosqlite", "phx-class-registry==5.0.0"], "tags": [ "mod", "moderate", diff --git a/aurora/menus/addrole.py b/aurora/menus/addrole.py index fa45b87..ecf2941 100644 --- a/aurora/menus/addrole.py +++ b/aurora/menus/addrole.py @@ -1,20 +1,24 @@ from discord import ButtonStyle, Interaction, Message, ui +from discord.errors import NotFound from redbot.core import commands from redbot.core.utils.chat_formatting import error -from aurora.utilities.config import config -from aurora.utilities.factory import addrole_embed +from ..utilities.config import config +from ..utilities.factory import addrole_embed class Addrole(ui.View): - def __init__(self, ctx: commands.Context, message: Message, timeout: int = None): + def __init__(self, ctx: commands.Context, message: Message, timeout: int | None = None): super().__init__() self.ctx = ctx self.message = message self.timeout = timeout async def on_timeout(self): - await self.message.edit(view=None) + try: + await self.message.edit(view=None) + except NotFound: + pass @ui.select(cls=ui.RoleSelect, placeholder="Select a role", min_values=0, max_values=25) async def addrole_select(self, interaction: Interaction, select: ui.RoleSelect): @@ -23,7 +27,7 @@ class Addrole(ui.View): return await interaction.response.defer() async with config.guild(self.ctx.guild).addrole_whitelist() as addrole_whitelist: - addrole_whitelist: list # type hint + addrole_whitelist: list # type hint for value in select.values: if value.id in addrole_whitelist: addrole_whitelist.remove(value.id) @@ -32,7 +36,7 @@ class Addrole(ui.View): await interaction.message.edit(embed=await addrole_embed(self.ctx)) @ui.button(label="Clear", style=ButtonStyle.red, row=1) - async def clear(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def clear(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message(error("You must have the manage guild permission to clear the guild's addrole whitelist."), ephemeral=True) return @@ -41,7 +45,7 @@ class Addrole(ui.View): await interaction.message.edit(embed=await addrole_embed(self.ctx)) @ui.button(label="Close", style=ButtonStyle.gray) - async def close(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def close(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message(error("You can't do that!"), ephemeral=True) return diff --git a/aurora/menus/guild.py b/aurora/menus/guild.py index dbc26e0..5f54e6a 100644 --- a/aurora/menus/guild.py +++ b/aurora/menus/guild.py @@ -1,23 +1,27 @@ from discord import ButtonStyle, Interaction, Message, ui +from discord.errors import NotFound from redbot.core import commands -from aurora.utilities.config import config -from aurora.utilities.factory import guild_embed -from aurora.utilities.utils import create_pagesize_options +from ..utilities.config import config +from ..utilities.factory import guild_embed +from ..utilities.utils import create_pagesize_options class Guild(ui.View): - def __init__(self, ctx: commands.Context, message: Message, timeout: int = None): + def __init__(self, ctx: commands.Context, message: Message, timeout: int | None = None): super().__init__() self.ctx = ctx self.message = message self.timeout = timeout async def on_timeout(self): - await self.message.edit(view=None) + try: + await self.message.edit(view=None) + except NotFound: + pass @ui.button(label="Show Moderator", style=ButtonStyle.green, row=0) - async def show_moderator(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def show_moderator(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -27,7 +31,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="Use Discord Permissions", style=ButtonStyle.green, row=0) - async def use_discord_permissions(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def use_discord_permissions(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -37,7 +41,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="Respect Hierarchy", style=ButtonStyle.green, row=0) - async def respect_heirarchy(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def respect_heirarchy(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -47,7 +51,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="Ignore Modlog", style=ButtonStyle.green, row=0) - async def ignore_modlog(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def ignore_modlog(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -57,7 +61,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="Ignore Other Bots", style=ButtonStyle.green, row=0) - async def ignore_other_bots(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def ignore_other_bots(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -67,7 +71,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="DM Users", style=ButtonStyle.green, row=1) - async def dm_users(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def dm_users(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -77,7 +81,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="Auto Evidence Format", style=ButtonStyle.green, row=1) - async def auto_evidenceformat(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def auto_evidenceformat(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -87,7 +91,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="Ephemeral", style=ButtonStyle.green, row=1) - async def ephemeral(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def ephemeral(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -97,7 +101,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.button(label="History Inline", style=ButtonStyle.green, row=1) - async def inline(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def inline(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -107,11 +111,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.select(placeholder="History Pagesize", options=create_pagesize_options(), row=2) - async def pagesize( - self, - interaction: Interaction, - select: ui.Select, - ): + async def pagesize(self, interaction: Interaction, select: ui.Select,): if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return @@ -123,11 +123,7 @@ class Guild(ui.View): await interaction.message.edit(embed=await guild_embed(self.ctx)) @ui.select(placeholder="History Inline Pagesize", options=create_pagesize_options(), row=3) - async def inline_pagesize( - self, - interaction: Interaction, - select: ui.Select, - ): + async def inline_pagesize(self, interaction: Interaction, select: ui.Select,): if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) return diff --git a/aurora/menus/immune.py b/aurora/menus/immune.py index 891b1b5..d6acc45 100644 --- a/aurora/menus/immune.py +++ b/aurora/menus/immune.py @@ -1,20 +1,24 @@ from discord import ButtonStyle, Interaction, Message, ui +from discord.errors import NotFound from redbot.core import commands from redbot.core.utils.chat_formatting import error -from aurora.utilities.config import config -from aurora.utilities.factory import immune_embed +from ..utilities.config import config +from ..utilities.factory import immune_embed class Immune(ui.View): - def __init__(self, ctx: commands.Context, message: Message, timeout: int = None): + def __init__(self, ctx: commands.Context, message: Message, timeout: int | None = None): super().__init__() self.ctx = ctx self.message = message self.timeout = timeout async def on_timeout(self): - await self.message.edit(view=None) + try: + await self.message.edit(view=None) + except NotFound: + pass @ui.select(cls=ui.RoleSelect, placeholder="Select a role", min_values=0, max_values=25) async def immune_select(self, interaction: Interaction, select: ui.RoleSelect): @@ -23,7 +27,7 @@ class Immune(ui.View): return await interaction.response.defer() async with config.guild(self.ctx.guild).immune_roles() as immune_roles: - immune_roles: list # type hint + immune_roles: list # type hint for value in select.values: if value.id in immune_roles: immune_roles.remove(value.id) @@ -32,7 +36,7 @@ class Immune(ui.View): await interaction.message.edit(embed=await immune_embed(self.ctx)) @ui.button(label="Clear", style=ButtonStyle.red, row=1) - async def clear(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def clear(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message(error("You must have the manage guild permission to clear the guild's immune roles."), ephemeral=True) return @@ -41,7 +45,7 @@ class Immune(ui.View): await interaction.message.edit(embed=await immune_embed(self.ctx)) @ui.button(label="Close", style=ButtonStyle.gray) - async def close(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def close(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: await interaction.response.send_message(error("You can't do that!"), ephemeral=True) return diff --git a/aurora/menus/overrides.py b/aurora/menus/overrides.py index 1c270f5..af2df00 100644 --- a/aurora/menus/overrides.py +++ b/aurora/menus/overrides.py @@ -1,23 +1,27 @@ from discord import ButtonStyle, Interaction, Message, ui +from discord.errors import NotFound from redbot.core import commands -from aurora.utilities.config import config -from aurora.utilities.factory import overrides_embed -from aurora.utilities.utils import create_pagesize_options +from ..utilities.config import config +from ..utilities.factory import overrides_embed +from ..utilities.utils import create_pagesize_options class Overrides(ui.View): - def __init__(self, ctx: commands.Context, message: Message, timeout: int = None): + def __init__(self, ctx: commands.Context, message: Message, timeout: int | None = None): super().__init__() self.ctx = ctx self.message = message self.timeout = timeout async def on_timeout(self): - await self.message.edit(view=None) + try: + await self.message.edit(view=None) + except NotFound: + pass @ui.button(label="Auto Evidence Format", style=ButtonStyle.green, row=0) - async def auto_evidenceformat(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def auto_evidenceformat(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if self.ctx.author != interaction.user: await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True) return @@ -32,7 +36,7 @@ class Overrides(ui.View): await interaction.message.edit(embed=await overrides_embed(self.ctx)) @ui.button(label="Ephemeral", style=ButtonStyle.green, row=0) - async def ephemeral(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def ephemeral(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if self.ctx.author != interaction.user: await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True) return @@ -47,7 +51,7 @@ class Overrides(ui.View): await interaction.message.edit(embed=await overrides_embed(self.ctx)) @ui.button(label="Inline", style=ButtonStyle.green, row=0) - async def inline(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + async def inline(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument if self.ctx.author != interaction.user: await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True) return @@ -62,11 +66,7 @@ class Overrides(ui.View): await interaction.message.edit(embed=await overrides_embed(self.ctx)) @ui.select(placeholder="Inline Pagesize", options=create_pagesize_options(), row=1) - async def inline_pagesize( - self, - interaction: Interaction, - select: ui.Select, - ): + async def inline_pagesize(self, interaction: Interaction, select: ui.Select,): if self.ctx.author != interaction.user: await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True) return @@ -78,11 +78,7 @@ class Overrides(ui.View): await interaction.message.edit(embed=await overrides_embed(self.ctx)) @ui.select(placeholder="Pagesize", options=create_pagesize_options(), row=2) - async def pagesize( - self, - interaction: Interaction, - select: ui.Select, - ): + async def pagesize(self, interaction: Interaction, select: ui.Select,): if self.ctx.author != interaction.user: await interaction.response.send_message("You cannot change this setting for other users.", ephemeral=True) return diff --git a/aurora/menus/types.py b/aurora/menus/types.py new file mode 100644 index 0000000..52fc7e3 --- /dev/null +++ b/aurora/menus/types.py @@ -0,0 +1,71 @@ +from discord import ButtonStyle, Interaction, Message, ui +from discord.errors import NotFound +from redbot.core import commands + +from ..models.type import Type +from ..utilities.config import config +from ..utilities.factory import type_embed + + +class Types(ui.View): + def __init__(self, ctx: commands.Context, message: Message, moderation_type: Type, timeout: int | None = None): + super().__init__() + self.ctx = ctx + self.message = message + self.type = moderation_type + self.timeout = timeout + + async def on_timeout(self): + try: + await self.message.edit(view=None) + except NotFound: + pass + + @ui.button(label="Show in History", style=ButtonStyle.green, row=0) + async def show_in_history(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: + await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) + return + await interaction.response.defer() + current_setting = await config.custom("types", interaction.guild.id, self.type.key).show_in_history() + await config.custom("types", interaction.guild.id, self.type.key).show_in_history.set(not current_setting) + await interaction.message.edit(embed=await type_embed(self.ctx, self.type)) + + @ui.button(label="Show Moderator", style=ButtonStyle.green, row=0) + async def show_moderator(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: + await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) + return + await interaction.response.defer() + current_setting = await config.custom("types", interaction.guild.id, self.type.key).show_moderator() + await config.custom("types", interaction.guild.id, self.type.key).show_moderator.set(not current_setting) + await interaction.message.edit(embed=await type_embed(self.ctx, self.type)) + + @ui.button(label="Use Discord Permissions", style=ButtonStyle.green, row=0) + async def use_discord_permissions(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: + await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) + return + await interaction.response.defer() + current_setting = await config.custom("types", interaction.guild.id, self.type.key).use_discord_permissions() + await config.custom("types", interaction.guild.id, self.type.key).use_discord_permissions.set(not current_setting) + await interaction.message.edit(embed=await type_embed(self.ctx, self.type)) + + @ui.button(label="DM Users", style=ButtonStyle.green, row=0) + async def dm_users(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: + await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) + return + await interaction.response.defer() + current_setting = await config.custom("types", interaction.guild.id, self.type.key).dm_users() + await config.custom("types", interaction.guild.id, self.type.key).dm_users.set(not current_setting) + await interaction.message.edit(embed=await type_embed(self.ctx, self.type)) + + @ui.button(label="Reset", style=ButtonStyle.red, row=1) + async def reset(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument + if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator: + await interaction.response.send_message("You must have the manage guild permission to change this setting.", ephemeral=True) + return + await interaction.response.defer() + await config.custom("types", interaction.guild.id, self.type.key).clear() + await interaction.message.edit(embed=await type_embed(self.ctx, self.type)) diff --git a/aurora/models/__init__.py b/aurora/models/__init__.py new file mode 100644 index 0000000..f15d56d --- /dev/null +++ b/aurora/models/__init__.py @@ -0,0 +1,2 @@ +from .moderation_types import * # noqa: F403 +# This just imports all the built-in moderation types so they can be registered, as they aren't imported anywhere else. diff --git a/aurora/models/base.py b/aurora/models/base.py new file mode 100644 index 0000000..d94b635 --- /dev/null +++ b/aurora/models/base.py @@ -0,0 +1,30 @@ +from typing import Any, Optional + +from discord import Guild +from pydantic import BaseModel, ConfigDict +from redbot.core.bot import Red + + +class AuroraBaseModel(BaseModel): + """Base class for all models in Aurora.""" + model_config = ConfigDict(ignored_types=(Red,), arbitrary_types_allowed=True) + bot: Red + + def dump(self) -> dict: + return self.model_dump(exclude={"bot"}) + + def to_json(self, indent: int | None = None, file: Any | None = None, **kwargs) -> str: + from ..utilities.json import dump, dumps # pylint: disable=cyclic-import + return dump(self.dump(), file, indent=indent, **kwargs) if file else dumps(self.dump(), indent=indent, **kwargs) + +class AuroraGuildModel(AuroraBaseModel): + """Subclass of AuroraBaseModel that includes a guild_id attribute and a guild attribute.""" + model_config = ConfigDict(ignored_types=(Red, Guild), arbitrary_types_allowed=True) + guild_id: int + guild: Optional[Guild] = None + + def dump(self) -> dict: + return self.model_dump(exclude={"bot", "guild_id", "guild"}) + + def __repr__(self) -> str: + return f"<{self.__class__.__name__} guild_id={self.guild_id}>" diff --git a/aurora/models/change.py b/aurora/models/change.py new file mode 100644 index 0000000..00358f9 --- /dev/null +++ b/aurora/models/change.py @@ -0,0 +1,83 @@ +import json +from datetime import datetime, timedelta +from typing import Literal, Optional + +from redbot.core.bot import Red + +from ..utilities.utils import timedelta_from_string +from .base import AuroraBaseModel +from .partials import PartialUser + + +class Change(AuroraBaseModel): + type: Literal["ORIGINAL", "RESOLVE", "EDIT"] + timestamp: datetime + user_id: int + reason: Optional[str] = None + duration: Optional[timedelta] = None + end_timestamp: Optional[datetime] = None + + @property + def unix_timestamp(self) -> int: + return int(self.timestamp.timestamp()) + + @property + def unix_end_timestamp(self) -> Optional[int]: + if self.end_timestamp: + return int(self.end_timestamp.timestamp()) + return None + + def __str__(self): + return f"{self.type} {self.user_id} {self.reason}" + + def __repr__(self) -> str: + attrs = [ + ('type', self.type), + ('timestamp', self.timestamp), + ('user_id', self.user_id), + ('reason', self.reason), + ('duration', self.duration), + ('end_timestamp', self.end_timestamp), + ] + joined = ' '.join(f'{key}={value!r}' for key, value in attrs) + return f"<{self.__class__.__name__} {joined}>" + + async def get_user(self) -> "PartialUser": + return await PartialUser.from_id(self.bot, self.user_id) + + @classmethod + def from_dict(cls, bot: Red, data: dict) -> "Change": + if isinstance(data, str): + data = json.loads(data) + if data.get('duration') and not isinstance(data["duration"], timedelta) and not data["duration"] == "NULL": + duration = timedelta_from_string(data["duration"]) + elif data.get('duration') and isinstance(data["duration"], timedelta): + duration = data["duration"] + else: + duration = None + + if data.get('end_timestamp') and not isinstance(data["end_timestamp"], datetime): + end_timestamp = datetime.fromtimestamp(data["end_timestamp"]) + elif data.get('end_timestamp') and isinstance(data["end_timestamp"], datetime): + end_timestamp = data["end_timestamp"] + else: + end_timestamp = None + + if not isinstance(data["timestamp"], datetime): + timestamp = datetime.fromtimestamp(data["timestamp"]) + else: + timestamp = data["timestamp"] + + try: + data["user_id"] = int(data["user_id"]) + except ValueError: + data["user_id"] = 0 + + data.update({ + "timestamp": timestamp, + "end_timestamp": end_timestamp, + "duration": duration + }) + if "bot" in data: + del data["bot"] + return cls(bot=bot, **data) diff --git a/aurora/models/moderation.py b/aurora/models/moderation.py new file mode 100644 index 0000000..9153e24 --- /dev/null +++ b/aurora/models/moderation.py @@ -0,0 +1,565 @@ +import json +import sqlite3 +from datetime import datetime, timedelta +from time import time +from typing import Dict, Iterable, List, Optional, Tuple, Union + +import discord +from aiosqlite import Connection, Cursor, OperationalError, Row +from aiosqlite import connect as aiosqlite_connect +from redbot.core import data_manager +from redbot.core.bot import Red + +from ..utilities.logger import logger +from ..utilities.utils import timedelta_to_string +from .base import AuroraGuildModel +from .change import Change +from .partials import PartialChannel, PartialRole, PartialUser +from .type import Type, type_registry + + +class Moderation(AuroraGuildModel): + """This class represents a moderation case in the database. + + Attributes: + bot (Red): The bot instance. + guild (discord.Guild): The guild the case belongs to. + moderation_id (int): The ID of the moderation case. + timestamp (datetime): The timestamp of the case. + moderation_type (Type): The type of moderation case. + target_type (str): The type of target. Should be either `user` or `channel`. + target_id (int): The ID of the target. + moderator_id (int): The ID of the moderator who issued the case. + role_id (int): The ID of the role, if applicable. + duration (timedelta): The duration of the case, if applicable. + end_timestamp (datetime): The end timestamp of the case, if applicable. + reason (str): The reason for the case. + resolved (bool): Whether the case is resolved. + resolved_by (int): The ID of the user who resolved the case. + resolve_reason (str): The reason the case was resolved. + expired (bool): Whether the case is expired. + changes (List[Change]): A list of changes to the case. + metadata (Dict): A dictionary of metadata stored with the case. + + Properties: + id (int): The ID of the case. + type (Type): The type of the case. + unix_timestamp (int): The timestamp of the case as a Unix timestamp. + + Methods: + get_moderator: Gets the moderator who issued the case. + get_target: Gets the target of the case. + get_resolved_by: Gets the user who resolved the case. + get_role: Gets the role, if applicable. + resolve: Resolves the case. + update: Updates the case in the database. + + Class Methods: + from_dict: Creates a `Moderation` object from a dictionary. + from_result: Creates a `Moderation` object from a database result. + execute: Executes a query on the database. + get_latest: Gets the latest cases from the database. + get_next_case_number: Gets the next case number to use. + find_by_id: Finds a case by its ID. + find_by_target: Finds cases by the target. + find_by_moderator: Finds cases by the moderator. + log: Logs a moderation case in the database. + + Static Methods: + connect: Connects to the SQLite database. + """ + + moderation_id: int + timestamp: datetime + moderation_type: Type + target_type: str + target_id: int + moderator_id: int + role_id: Optional[int] = None + duration: Optional[timedelta] = None + end_timestamp: Optional[datetime] = None + reason: Optional[str] = None + resolved: bool + resolved_by: Optional[int] = None + resolve_reason: Optional[str] = None + expired: bool + changes: List["Change"] + metadata: Dict + + @property + def id(self) -> int: + return self.moderation_id + + @property + def type(self) -> Type: + return self.moderation_type + + @property + def unix_timestamp(self) -> int: + return int(self.timestamp.timestamp()) + + async def get_moderator(self) -> "PartialUser": + return await PartialUser.from_id(self.bot, self.moderator_id) + + async def get_target(self) -> Union["PartialUser", "PartialChannel"]: + if self.target_type.lower() == "user": + return await PartialUser.from_id(self.bot, self.target_id) + return await PartialChannel.from_id(self.bot, self.target_id, self.guild) + + async def get_resolved_by(self) -> Optional["PartialUser"]: + if self.resolved_by: + return await PartialUser.from_id(self.bot, self.resolved_by) + return None + + async def get_role(self) -> Optional["PartialRole"]: + if self.role_id: + return await PartialRole.from_id(self.bot, self.guild, self.role_id) + return None + + def __str__(self) -> str: + return f"{self.moderation_type} {self.target_type} {self.target_id} {self.reason}" + + def __int__(self) -> int: + return self.moderation_id + + def __repr__(self) -> str: + attrs = [ + ('guild_id', self.guild_id), + ('moderation_id', self.moderation_id), + ('timestamp', self.timestamp), + ('type', self.type), + ('target_type', self.target_type), + ('target_id', self.target_id), + ('moderator_id', self.moderator_id), + ('role_id', self.role_id), + ('duration', self.duration), + ('end_timestamp', self.end_timestamp), + ('reason', self.reason), + ('resolved', self.resolved), + ('resolved_by', self.resolved_by), + ('resolve_reason', self.resolve_reason), + ('expired', self.expired), + ('changes', self.changes), + ('metadata', self.metadata), + ] + joined = ' '.join(f'{key}={value!r}' for key, value in attrs) + return f"<{self.__class__.__name__} {joined}>" + + async def resolve(self, resolved_by: int, reason: str) -> Tuple[bool, str]: + if self.resolved: + raise ValueError("Case is already resolved!") + + self.resolved = True + self.resolved_by = resolved_by + self.resolve_reason = reason + + success, msg = await self.type.resolve_handler(moderation=self, reason=reason) + + if not self.changes: + self.changes.append(Change.from_dict(self.bot, { + "type": "ORIGINAL", + "timestamp": self.timestamp, + "reason": self.reason, + "user_id": self.moderator_id, + "duration": self.duration, + "end_timestamp": self.end_timestamp, + })) + self.changes.append(Change.from_dict(self.bot, { + "type": "RESOLVE", + "timestamp": datetime.now(), + "reason": reason, + "user_id": resolved_by, + })) + + await self.update() + return success, msg + + async def update(self) -> None: + from ..utilities.json import dumps + query = f"UPDATE moderation_{self.guild_id} SET timestamp = ?, moderation_type = ?, target_type = ?, moderator_id = ?, role_id = ?, duration = ?, end_timestamp = ?, reason = ?, resolved = ?, resolved_by = ?, resolve_reason = ?, expired = ?, changes = ?, metadata = ? WHERE moderation_id = ?;" + + await self.execute(query, ( + self.timestamp.timestamp(), + self.moderation_type.key, + self.target_type, + self.moderator_id, + self.role_id, + timedelta_to_string(self.duration) if self.duration else None, + self.end_timestamp.timestamp() if self.end_timestamp else None, + self.reason, + self.resolved, + self.resolved_by, + self.resolve_reason, + self.expired, + dumps(self.changes), + dumps(self.metadata), + self.moderation_id, + )) + + logger.verbose("Row updated in moderation_%s!\n%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", + self.moderation_id, + self.guild_id, + self.timestamp.timestamp(), + self.moderation_type.key, + self.target_type, + self.moderator_id, + self.role_id, + timedelta_to_string(self.duration) if self.duration else None, + self.end_timestamp.timestamp() if self.end_timestamp else None, + self.reason, + self.resolved, + self.resolved_by, + self.resolve_reason, + self.expired, + dumps(self.changes), + dumps(self.metadata), + ) + + @classmethod + async def from_dict(cls, bot: Red, data: dict) -> "Moderation": + if data.get("guild_id"): + try: + guild = bot.get_guild(data["guild_id"]) + if not guild: + guild = await bot.fetch_guild(data["guild_id"]) + except (discord.Forbidden, discord.HTTPException): + guild = None + data.update({"guild": guild}) + return cls(bot=bot, **data) + + @classmethod + async def from_result(cls, bot: Red, result: Iterable, guild_id: int) -> "Moderation": + if result[7] is not None and result[7] != "NULL": + try: + hours, minutes, seconds = map(int, result[7].split(':')) + duration = timedelta(hours=hours, minutes=minutes, seconds=seconds) + except ValueError as e: + logger.error("Error parsing duration for case %s: %s", result[0], result[7]) + raise e + else: + duration = None + + if result[14] is not None: + changes = json.loads(result[14]) + change_obj_list = [] + if changes: + for change in changes: + change_obj_list.append(Change.from_dict(bot=bot, data=change)) + + if result[15] is not None: + metadata = json.loads(result[15]) + else: + metadata = {} + + moderation_type = str.lower(result[2]) + if moderation_type in type_registry: + moderation_type = type_registry[moderation_type] + else: + logger.error("Unknown moderation type in case %s: %s", result[0], result[2]) + + case = { + "moderation_id": int(result[0]), + "guild_id": int(guild_id), + "timestamp": datetime.fromtimestamp(result[1]), + "moderation_type": moderation_type, + "target_type": str(result[3]), + "target_id": int(result[4]), + "moderator_id": int(result[5]), + "role_id": int(result[6]) if result[6] is not None else None, + "duration": duration, + "end_timestamp": datetime.fromtimestamp(result[8]) if result[8] is not None else None, + "reason": result[9], + "resolved": bool(result[10]), + "resolved_by": result[11], + "resolve_reason": result[12], + "expired": bool(result[13]), + "changes": change_obj_list, + "metadata": metadata if metadata else {}, + } + return await cls.from_dict(bot=bot, data=case) + + @staticmethod + async def connect() -> Connection: + """Connects to the SQLite database, and returns a connection object.""" + try: + connection = await aiosqlite_connect( + database=data_manager.cog_data_path(raw_name="Aurora") / "aurora.db" + ) + return connection + + except OperationalError as e: + logger.error("Unable to access the SQLite database!\nError:\n%s", e.msg) + raise ConnectionRefusedError( + f"Unable to access the SQLite Database!\n{e.msg}" + ) from e + + @classmethod + async def execute(cls, query: str, parameters: tuple | None = None, bot: Red | None = None, guild_id: int | None = None, cursor: Cursor | None = None, return_obj: bool = True) -> Union[Tuple["Moderation"], Iterable[Row]]: + """Executes a query on the database. + + Arguments: + query (str): The query to execute. + parameters (tuple): The parameters to pass to the query. + bot (Red): The bot instance. + guild_id (int): The ID of the guild to execute the query on. + cursor (Cursor): The cursor to use for the query. + return_obj (bool): Whether to return the case object(s). Defaults to `True`. If `False`, returns a `Iterable` of `aiosqlite.Row` objects. + Returns: The result of the query, either as a `Tuple` of `Moderation` objects or an `Iterable` of `aiosqlite.Row` objects. + """ + logger.trace("Executing query: \"%s\" with parameters \"%s\"", query, parameters) + if not parameters: + parameters = () + if not cursor: + no_cursor = True + database = await cls.connect() + cursor = await database.cursor() + else: + no_cursor = False + + try: + await cursor.execute(query, parameters) + except OperationalError as e: + logger.error("Error executing query: \"%s\" with parameters \"%s\"\nError:\n%s", + query, parameters, e) + raise OperationalError(f"Error executing query: \"{query}\" with parameters \"{parameters}\"") from e + results = await cursor.fetchall() + await database.commit() + if no_cursor: + await cursor.close() + await database.close() + + if results and return_obj and bot and guild_id: + cases = [] + for result in results: + if result[0] == 0: + continue + case = await cls.from_result(bot=bot, result=result, guild_id=guild_id) + cases.append(case) + return tuple(cases) + return results + + @classmethod + async def get_latest(cls, bot: Red, guild_id: int, before: datetime | None = None, after: datetime | None = None, limit: int | None = None, offset: int = 0, types: Iterable[Type] | None = None, expired: bool | None = None, cursor: Cursor | None = None) -> Tuple["Moderation"]: + params = [] + query = f"SELECT * FROM moderation_{guild_id}" + conditions = [] + + if types: + conditions.append(f"moderation_type IN ({', '.join(['?' for _ in types])})") + params.extend([t.key for t in types]) + if before: + conditions.append("timestamp < ?") + params.append(int(before.timestamp())) + if after: + conditions.append("timestamp > ?") + params.append(int(after.timestamp())) + if expired is not None: + conditions.append("expired = ?") + params.append(int(expired)) + + if conditions: + query += " WHERE " + " AND ".join(conditions) + + query += " ORDER BY moderation_id DESC" + + if limit: + query += " LIMIT ? OFFSET ?" + params.extend((limit, offset)) + query += ";" + return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=tuple(params) if params else (), cursor=cursor) + + @classmethod + async def get_next_case_number(cls, bot: Red, guild_id: int, cursor: Cursor | None = None) -> int: + result = await cls.get_latest(bot=bot, guild_id=guild_id, cursor=cursor, limit=1) + return (result[0].moderation_id + 1) if result else 1 + + @classmethod + async def find_by_id(cls, bot: Red, moderation_id: int, guild_id: int, cursor: Cursor | None = None) -> "Moderation": + query = f"SELECT * FROM moderation_{guild_id} WHERE moderation_id = ?;" + case = await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=(moderation_id,), cursor=cursor) + if case: + return case[0] + raise ValueError(f"Case {moderation_id} not found in moderation_{guild_id}!") + + @classmethod + async def find_by_target(cls, bot: Red, guild_id: int, target: int, before: datetime = None, after: datetime = None, types: Iterable[Type] | None = None, expired: bool | None = None, cursor: Cursor | None = None) -> Tuple["Moderation"]: + query = f"SELECT * FROM moderation_{guild_id} WHERE target_id = ?" + params = [target] + if types: + query += f" AND moderation_type IN ({', '.join(['?' for _ in types])})" + for t in types: + params.append(t.key) + if before: + query += " AND timestamp < ?" + params.append(int(before.timestamp())) + if after: + query += " AND timestamp > ?" + params.append(int(after.timestamp())) + if expired is not None: + query += " AND expired = ?" + params.append(int(expired)) + + query += " ORDER BY moderation_id DESC;" + + return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor) + + @classmethod + async def find_by_moderator(cls, bot: Red, guild_id: int, moderator: int, before: datetime = None, after: datetime = None, types: Iterable[Type] | None = None, expired: bool | None = None, cursor: Cursor | None = None) -> Tuple["Moderation"]: + query = f"SELECT * FROM moderation_{guild_id} WHERE moderator_id = ?" + params = [moderator] + if types: + query += f" AND moderation_type IN ({', '.join(['?' for _ in types])})" + for t in types: + params.append(t.key) + if before: + query += " AND timestamp < ?" + params.append(int(before.timestamp())) + if after: + query += " AND timestamp > ?" + params.append(int(after.timestamp())) + if expired is not None: + query += " AND expired = ?" + params.append(int(expired)) + + query += " ORDER BY moderation_id DESC;" + + return await cls.execute(bot=bot, guild_id=guild_id, query=query, parameters=params, cursor=cursor) + + @classmethod + async def log( + cls, + bot: Red, + guild_id: int, + moderator_id: int, + moderation_type: Type, + target_type: str, + target_id: int, + role_id: int | None = None, + duration: timedelta | None = None, + reason: str | None = None, + database: sqlite3.Connection | None = None, + timestamp: datetime | None = None, + resolved: bool = False, + resolved_by: int | None = None, + resolved_reason: str | None = None, + expired: bool | None = None, + changes: list | None = None, + metadata: dict | None = None, + return_obj: bool = True, + ) -> Union["Moderation", int]: + """Logs a moderation case in the database. + + Args: + bot (Red): The bot instance. + guild_id (int): The ID of the guild to log the case in. + moderator_id (int): The ID of the moderator who issued the case. + moderation_type (Type): The type of moderation case. See `aurora.models.moderation_types` for the built-in options. + target_type (str): The type of target. Should be either `user` or `channel`. + target_id (int): The ID of the target. + role_id (int): The ID of the role, if applicable. + duration (timedelta): The duration of the case, if applicable. + reason (str): The reason for the case. + database (sqlite3.Connection): The database connection to use to log the case. A connection will be automatically created if not provided. + timestamp (datetime): The timestamp of the case. Will be automatically generated if not provided. + resolved (bool): Whether the case is resolved. + resolved_by (int): The ID of the user who resolved the case. + resolved_reason (str): The reason the case was resolved. + expired (bool): Whether the case is expired. + changes (list): A list of changes to log. You usually shouldn't pass this, as it's automatically generated by the `/edit` and `/resolve` commands. + metadata (dict): A dictionary of metadata to store with the case. + return_obj (bool): Whether to return the case object. Defaults to `True`. If `False`, returns the case ID. + + Returns: + Union[Moderation, int]: The `Moderation` object if `return_obj` is `True`, otherwise the case ID. + """ + from ..utilities.json import dumps + if not timestamp: + timestamp = datetime.fromtimestamp(time()) + elif not isinstance(timestamp, datetime): + timestamp = datetime.fromtimestamp(timestamp) + + if duration == "NULL": + duration = None + + if duration is not None: + end_timestamp = timestamp + duration + else: + duration = None + end_timestamp = None + + if not expired: + if end_timestamp: + expired = bool(timestamp > end_timestamp) + else: + expired = False + + if reason == "NULL": + reason = None + + if resolved_by in ["NULL", "?"]: + resolved_by = None + + if resolved_reason == "NULL": + resolved_reason = None + + if role_id == 0: + role_id = None + + if not database: + database = await cls.connect() + close_db = True + else: + close_db = False + + moderation_id = await cls.get_next_case_number(bot=bot, guild_id=guild_id) + + case = { + "moderation_id": moderation_id, + "timestamp": timestamp.timestamp(), + "moderation_type": moderation_type.key, + "target_type": target_type, + "target_id": target_id, + "moderator_id": moderator_id, + "role_id": role_id, + "duration": timedelta_to_string(duration) if duration else None, + "end_timestamp": end_timestamp.timestamp() if end_timestamp else None, + "reason": reason, + "resolved": resolved, + "resolved_by": resolved_by, + "resolve_reason": resolved_reason, + "expired": expired, + "changes": dumps(changes), + "metadata": dumps(metadata) + } + + sql = f"INSERT INTO `moderation_{guild_id}` (moderation_id, timestamp, moderation_type, target_type, target_id, moderator_id, role_id, duration, end_timestamp, reason, resolved, resolved_by, resolve_reason, expired, changes, metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + await database.execute(sql, tuple(case.values())) + + await database.commit() + if close_db: + await database.close() + + logger.verbose( + "Row inserted into moderation_%s!\n%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", + guild_id, + case["moderation_id"], + case["timestamp"], + case["moderation_type"], + case["target_type"], + case["target_id"], + case["moderator_id"], + case["role_id"], + case["duration"], + case["end_timestamp"], + case["reason"], + case["resolved"], + case["resolved_by"], + case["resolve_reason"], + case["expired"], + case["changes"], + case["metadata"], + ) + + if return_obj: + return await cls.find_by_id(bot=bot, moderation_id=moderation_id, guild_id=guild_id) + return moderation_id diff --git a/aurora/models/moderation_types.py b/aurora/models/moderation_types.py new file mode 100644 index 0000000..0dda5d6 --- /dev/null +++ b/aurora/models/moderation_types.py @@ -0,0 +1,1129 @@ +# pylint: disable=abstract-method +from datetime import timedelta +from math import ceil +from time import time +from typing import Tuple + +from discord import AllowedMentions, File, Interaction, Member, Object, Role, TextChannel, User +from discord.abc import Messageable +from discord.errors import Forbidden, HTTPException, NotFound +from redbot.core import app_commands, commands +from redbot.core.bot import Red +from redbot.core.commands.converter import parse_relativedelta, parse_timedelta +from redbot.core.utils.chat_formatting import bold, error, humanize_timedelta, inline + +from ..utilities.config import config +from ..utilities.factory import message_factory, resolve_factory +from ..utilities.logger import logger +from ..utilities.utils import get_footer_image, log, send_evidenceformat, timedelta_from_relativedelta +from .moderation import Moderation +from .type import Type, type_registry + + +def get_icon(bot: Red) -> File: + cog = bot.get_cog("Aurora") + if cog: + return get_footer_image(cog) + raise ValueError("Aurora cog not found. How was this managed?") + +class Note(Type): + key="note" + string="note" + verb="noted" + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User, silent: bool, reason: str) -> 'Note': + response = await ctx.send( + content=f"{target.mention} has {cls.embed_desc}{cls.verb}!\n**Reason** - `{reason}`" + ) + + if silent is False: + try: + embed = await message_factory( + bot=ctx.bot, + color=await ctx.embed_color(), + guild=ctx.guild, + moderator=ctx.author, + reason=reason, + moderation_type=cls(), + response=response, + ) + await target.send(embed=embed, file=get_icon(ctx.bot)) + except HTTPException: + pass + + moderation = await Moderation.log( + bot=ctx.bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type="user", + target_id=target.id, + role_id=None, + duration=None, + reason=reason, + ) + await response.edit( + content=f"{target.mention} has {cls.embed_desc}{cls.verb}! (Case `#{moderation.id:,}`)\n**Reason** - `{reason}`" + ) + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + return cls() + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + if await config.guild(moderation.guild).dm_users() is True: + try: + target = await moderation.bot.fetch_user(moderation.target_id) + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except (Forbidden, HTTPException, NotFound): + pass + return True, "" + +class Warn(Type): + key="warn" + string="warn" + verb="warned" + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User, silent: bool, reason: str) -> 'Warn': + response = await ctx.send( + content=f"{target.mention} has {cls.embed_desc}{cls.verb}!\n**Reason** - `{reason}`" + ) + + if silent is False: + try: + embed = await message_factory( + bot=ctx.bot, + color=await ctx.embed_color(), + guild=ctx.guild, + moderator=ctx.author, + reason=reason, + moderation_type=cls(), + response=response, + ) + await target.send(embed=embed, file=get_icon(ctx.bot)) + except HTTPException: + pass + + moderation = await Moderation.log( + bot=ctx.bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type="user", + target_id=target.id, + role_id=None, + duration=None, + reason=reason, + ) + await response.edit( + content=f"{target.mention} has {cls.embed_desc}{cls.verb}! (Case `#{moderation.id:,}`)\n**Reason** - `{reason}`" + ) + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + return cls() + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + if await config.guild(moderation.guild).dm_users() is True: + try: + target = await moderation.bot.fetch_user(moderation.target_id) + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except (Forbidden, HTTPException, NotFound): + pass + return True, "" + +class AddRole(Type): + key="addrole" + string="addrole" + verb="added a role to" + embed_desc="been given the " + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member, role: Role, silent: bool, duration: str | None = None, reason: str | None = None): + addrole_whitelist = await config.guild(ctx.guild).addrole_whitelist() + + if not addrole_whitelist: + await ctx.send( + content=error("There are no whitelisted roles set for this server!"), + ephemeral=True, + ) + return + + if duration is not None: + try: + parsed_time = parse_relativedelta(argument=duration) + if parsed_time is None: + raise commands.BadArgument() + parsed_time = timedelta_from_relativedelta(relativedelta=parsed_time) + except (commands.BadArgument, ValueError): + await ctx.send(content=error(text="Please provide a valid duration!"), ephemeral=True) + return cls() + else: + parsed_time = None + + if role.id not in addrole_whitelist: + await ctx.send( + content=error("That role isn't whitelisted!"), ephemeral=True + ) + return + + if role.id in [user_role.id for user_role in target.roles]: + await ctx.send( + content=error(f"{target.mention} already has this role!"), + ephemeral=True, + ) + return + + response = await ctx.send( + content=f"{target.mention} has {cls.embed_desc}{role.mention} role{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time else ''}!\n**Reason** - `{reason}`" + ) + + if silent is False: + try: + embed = await message_factory( + bot=ctx.bot, + color=await ctx.embed_color(), + guild=ctx.guild, + moderator=ctx.author, + reason=reason, + moderation_type=cls(), + response=response, + duration=parsed_time, + ) + await target.send(embed=embed, file=get_icon(ctx.bot)) + except HTTPException: + pass + + await target.add_roles( + role, + reason=f"Role added by {ctx.author.id}{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time else ''} for: {reason}", + ) + + moderation = await Moderation.log( + bot=ctx.bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type="user", + target_id=target.id, + role_id=role.id, + duration=parsed_time, + reason=reason, + ) + await response.edit( + content=f"{target.mention} has {cls.embed_desc}{role.mention} role{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time else ''}! (Case `#{moderation.id:,}`)\n**Reason** - `{reason}`", + ) + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + return cls() + + @classmethod + async def duration_edit_handler(cls, interaction: Interaction, old_moderation: Moderation, new_moderation: Moderation) -> bool: # pylint: disable=unused-argument + return True + + @classmethod + async def expiry_handler(cls, moderation: Moderation) -> int: + try: + target = moderation.guild.get_member(moderation.target_id) + if not target: + try: + target = await moderation.guild.fetch_member(moderation.target_id) + except NotFound: + return 0 + + await target.remove_roles( + Object(moderation.role_id), reason=f"Automatic role removal from case #{moderation.id}" + ) + + if await config.guild(moderation.guild).dm_users() is True: + try: + embed = await message_factory( + bot=moderation.bot, + color=await moderation.bot.get_embed_color(moderation.guild.channels[0]), + guild=moderation.guild, + reason=f"Automatic role removal from case #{moderation.id}", + moderation_type=type_registry["removerole"], + moderator=None, + duration=None, + response=None, + case=False, + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except HTTPException: + pass + logger.trace( + "Removed role %s from %s (%s)", + moderation.role_id, + target.name, + target.id, + ) + return 1 + except ( + NotFound, + Forbidden, + HTTPException, + ) as e: + logger.error( + "Removing the role %s from user %s failed due to: \n%s", + moderation.role_id, + moderation.target_id, + e, + ) + return 0 + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + try: + target = await moderation.guild.fetch_member(moderation.target_id) + await target.remove_roles( + Object(moderation.role_id), reason=reason + ) + if await config.guild(moderation.guild).dm_users() is True: + try: + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except HTTPException: + pass + logger.trace( + "Removed role %s from %s (%s)", + moderation.role_id, + target.name, + target.id, + ) + return True, "" + except (NotFound, Forbidden, HTTPException) as e: + logger.error( + "Failed to remove role %s from user %s (%s)\n%s", + moderation.role_id, + target.name, + target.id, + e, + ) + return False, "Failed to remove role from user." + +class RemoveRole(Type): + key="removerole" + string="removerole" + verb="removed a role from" + embed_desc="had the " + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member, role: Role, silent: bool, duration: str | None = None, reason: str | None = None): + addrole_whitelist = await config.guild(ctx.guild).addrole_whitelist() + + if not addrole_whitelist: + await ctx.send( + content=error("There are no whitelisted roles set for this server!"), + ephemeral=True, + ) + return + + if duration is not None: + try: + parsed_time = parse_relativedelta(argument=duration) + if parsed_time is None: + raise commands.BadArgument() + parsed_time = timedelta_from_relativedelta(relativedelta=parsed_time) + except (commands.BadArgument, ValueError): + await ctx.send(content=error(text="Please provide a valid duration!"), ephemeral=True) + return cls() + else: + parsed_time = None + + if role.id not in addrole_whitelist: + await ctx.send( + content=error("That role isn't whitelisted!"), ephemeral=True + ) + return + + if role.id not in [user_role.id for user_role in target.roles]: + await ctx.send( + content=error(f"{target.mention} does not have this role!"), + ephemeral=True, + ) + return + + response = await ctx.send( + content=f"{target.mention} has {cls.embed_desc}{role.mention} role removed{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time else ''}!\n**Reason** - `{reason}`" + ) + + if silent is False: + try: + embed = await message_factory( + bot=ctx.bot, + color=await ctx.embed_color(), + guild=ctx.guild, + moderator=ctx.author, + reason=reason, + moderation_type=cls(), + response=response, + duration=parsed_time, + ) + await target.send(embed=embed, file=get_icon(ctx.bot)) + except HTTPException: + pass + + await target.remove_roles( + role, + reason=f"Role removed by {ctx.author.id}{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time else ''} for: {reason}", + ) + + moderation = await Moderation.log( + bot=ctx.bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type="user", + target_id=target.id, + role_id=role.id, + duration=parsed_time, + reason=reason, + ) + await response.edit( + content=f"{target.mention} has {cls.embed_desc}{role.mention} role removed{' for ' + humanize_timedelta(timedelta=parsed_time) if parsed_time else ''}! (Case `#{moderation.id:,}`)\n**Reason** - `{reason}`", + ) + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + return cls() + + @classmethod + async def duration_edit_handler(cls, interaction: Interaction, old_moderation: Moderation, new_moderation: Moderation) -> bool: # pylint: disable=unused-argument + return True + + @classmethod + async def expiry_handler(cls, moderation: Moderation) -> int: + try: + target = moderation.guild.get_member(moderation.target_id) + if not target: + try: + target = await moderation.guild.fetch_member(moderation.target_id) + except NotFound: + return 0 + + await target.add_roles( + Object(moderation.role_id), reason=f"Automatic role addition from case #{moderation.id}" + ) + if await config.guild(moderation.guild).dm_users() is True: + try: + embed = await message_factory( + bot=moderation.bot, + color=await moderation.bot.get_embed_color(moderation.guild.channels[0]), + guild=moderation.guild, + reason=f"Automatic role addition from case #{moderation.id}", + moderation_type=type_registry["addrole"], + moderator=None, + duration=None, + response=None, + case=False, + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except HTTPException: + pass + logger.trace( + "Added role %s to %s (%s)", + moderation.role_id, + target.name, + target.id, + ) + return 1 + except ( + NotFound, + Forbidden, + HTTPException, + ) as e: + logger.error( + "Adding the role %s to user %s failed due to: \n%s", + moderation.role_id, + moderation.target_id, + e, + ) + return 0 + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + try: + target = await moderation.get_target() + await target.add_roles( + Object(moderation.role_id), reason=reason + ) + if await config.guild(moderation.guild).dm_users() is True: + try: + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except HTTPException: + pass + logger.trace( + "Added role %s to %s (%s)", + moderation.role_id, + target.name, + target.id, + ) + return True, "" + except (NotFound, Forbidden, HTTPException) as e: + logger.error( + "Failed to add role %s to user %s (%s)\n%s", + moderation.role_id, + target.name, + target.id, + e, + ) + return False, "Failed to add role to user." + +class Mute(Type): + key="mute" + string="mute" + verb="muted" + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member, silent: bool, duration: str, reason: str = None): + if target.is_timed_out() is True: + await ctx.send( + error(f"{target.mention} is already muted!"), + allowed_mentions=AllowedMentions(users=False), + ephemeral=True, + ) + return + + try: + parsed_time = parse_timedelta(duration, maximum=timedelta(days=28)) + if parsed_time is None: + await ctx.send( + error("Please provide a valid duration!"), ephemeral=True + ) + return + except commands.BadArgument: + await ctx.send( + error("Please provide a duration that is less than 28 days."), ephemeral=True + ) + return + + await target.timeout( + parsed_time, reason=f"Muted by {ctx.author.id} for: {reason}" + ) + + response = await ctx.send( + content=f"{target.mention} has been muted for {humanize_timedelta(timedelta=parsed_time)}!\n**Reason** - `{reason}`" + ) + + if silent is False: + try: + embed = await message_factory( + bot=ctx.bot, + color=await ctx.embed_color(), + guild=ctx.guild, + moderator=ctx.author, + reason=reason, + moderation_type=cls(), + response=response, + duration=parsed_time, + ) + await target.send(embed=embed, file=get_icon(ctx.bot)) + except HTTPException: + pass + + moderation = await Moderation.log( + bot=ctx.bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type="user", + target_id=target.id, + role_id=None, + duration=parsed_time, + reason=reason, + ) + await response.edit( + content=f"{target.mention} has been muted for {humanize_timedelta(timedelta=parsed_time)}! (Case `#{moderation.id:,}`)\n**Reason** - `{reason}`" + ) + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + return cls() + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + try: + target = await moderation.guild.fetch_member(moderation.target_id) + except (Forbidden, HTTPException, NotFound): + return False, "User is not in the server, so I cannot unmute them." + if target.is_timed_out() is False: + return True, "" + await target.timeout(None, reason=reason) + + if await config.guild(moderation.guild).dm_users() is True: + try: + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except (Forbidden, HTTPException): + pass + return True, "" + + @classmethod + async def duration_edit_handler(cls, interaction: Interaction, old_moderation: Moderation, new_moderation: Moderation) -> bool: # pylint: disable=unused-argument + if ( + time() - new_moderation.unix_timestamp + ) + new_moderation.duration.total_seconds() > 2419200: + await interaction.response.send_message( + content=error( + "Please provide a duration that is less than 28 days from the initial moderation." + ), + ephemeral=True + ) + return False + + try: + member = await interaction.guild.fetch_member( + new_moderation.target_id + ) + + await member.timeout( + new_moderation.duration, + reason=f"Case #{new_moderation.id:,} edited by {interaction.user.id}", + ) + except NotFound: + pass + return True + +class Unmute(Type): + key="unmute" + string="unmute" + verb="unmuted" + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member, silent: bool, reason: str = None): + if target.is_timed_out() is False: + await ctx.send( + content=error(f"{target.mention} is not muted!"), + allowed_mentions=AllowedMentions(users=False), + ephemeral=True, + ) + return + + if reason: + await target.timeout( + None, reason=f"{cls.verb.title()} by {ctx.author.id} for: {reason}" + ) + else: + await target.timeout(None, reason=f"{cls.verb.title()} by {ctx.author.id}") + reason = "No reason given." + + response_message = await ctx.send( + content=f"{target.mention} has been {cls.verb}!\n**Reason** - `{reason}`" + ) + + if silent is False: + try: + embed = await message_factory( + bot=ctx.bot, + color=await ctx.embed_color(), + guild=ctx.guild, + moderator=ctx.author, + reason=reason, + moderation_type=cls(), + response=response_message, + ) + await target.send(embed=embed, file=get_icon(ctx.bot)) + except HTTPException: + pass + + moderation = await Moderation.log( + bot=ctx.bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type="user", + target_id=target.id, + role_id=None, + duration=None, + reason=reason, + ) + await response_message.edit( + content=f"{target.mention} has been {cls.verb}! (Case `#{moderation.id:,}`)\n**Reason** - `{reason}`" + ) + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + +class Kick(Type): + key="kick" + string="kick" + verb="kicked" + removes_from_guild=True + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User, silent: bool, reason: str = None) -> 'Kick': + """Kick a user.""" + bot = ctx.bot + response_message = await ctx.send(f"{target.mention} has been {cls.verb}!\n{bold('Reason:')} {inline(reason)}") + + if silent is False: + try: + embed = await message_factory( + bot=bot, + color=await ctx.embed_color(), + guild=ctx.guild, + reason=reason, + moderation_type=cls(), + moderator=ctx.author, + duration=None, + response=response_message + ) + await target.send(embed=embed, file=get_icon(bot)) + except HTTPException: + pass + + await target.kick(reason=f"{str.title(cls.verb)} by {ctx.author.id} for: {reason}") + moderation = await Moderation.log( + bot=bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type='user', + target_id=target.id, + role_id=None, + duration=None, + reason=reason + ) + await response_message.edit(content=f"{target.mention} has been {cls.verb}! (Case {inline(f'#{moderation.id}')})\n{bold('Reason:')} {inline(reason)}") + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + return cls() + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + if await config.guild(moderation.guild).dm_users() is True: + try: + target = await moderation.bot.fetch_user(moderation.target_id) + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except (Forbidden, HTTPException, NotFound): + pass + return True, "" + +class Ban(Type): + key="ban" + string="ban" + verb="banned" + removes_from_guild=True + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User, silent: bool, reason: str = None, delete_messages: app_commands.Choice | None = None) -> 'Ban': + """Ban a user.""" + bot = ctx.bot + try: + await ctx.guild.fetch_ban(target) + await ctx.send(content=error(f"{target.mention} is already {cls.verb}!"), ephemeral=True) + return + except NotFound: + pass + + if delete_messages is None: + delete_messages_seconds = 0 + else: + delete_messages_seconds = delete_messages.value + + response_message = await ctx.send(f"{target.mention} has been {cls.verb}!\n{bold('Reason:')} {inline(reason)}") + + if silent is False: + try: + embed = await message_factory( + bot=bot, + color=await ctx.embed_color(), + guild=ctx.guild, + reason=reason, + moderation_type=cls(), + moderator=ctx.author, + duration=None, + response=response_message + ) + await target.send(embed=embed, file=get_icon(bot)) + except HTTPException: + pass + + await ctx.guild.ban(target, reason=f"{str.title(cls.verb)} by {ctx.author.id} for: {reason}", delete_message_seconds=delete_messages_seconds) + moderation = await Moderation.log( + bot=bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type='user', + target_id=target.id, + role_id=None, + duration=None, + reason=reason + ) + await response_message.edit(content=f"{target.mention} has been {cls.verb}! (Case {inline(f'#{moderation.id}')})\n{bold('Reason:')} {inline(reason)}") + await log(ctx=ctx, moderation_id=moderation.id) + await send_evidenceformat(ctx=ctx, moderation_id=moderation.id) + return cls() + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + try: + target = await moderation.bot.fetch_user(moderation.target_id) + except (HTTPException, NotFound): + return False, "Fetching the target failed, so I cannot unban them." + + try: + await moderation.guild.unban(user=target, reason=reason) + except (NotFound, Forbidden, HTTPException) as e: + if e == NotFound: + return True, "" + return False, "I do not have permission to unban this user." + + if await config.guild(moderation.guild).dm_users() is True: + try: + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except (Forbidden, HTTPException): + pass + return True, "" + +class Tempban(Ban): + key="tempban" + string="tempban" + verb="tempbanned" + removes_from_guild=True + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User, silent: bool, duration: str, reason: str = None, delete_messages: app_commands.Choice | None = None) -> 'Ban': # pylint: disable=arguments-renamed + """Ban a user.""" + bot = ctx.bot + try: + await ctx.guild.fetch_ban(target) + await ctx.send(content=error(f"{target.mention} is already {Ban.verb}!"), ephemeral=True) + return + except NotFound: + pass + + if delete_messages is None: + delete_messages_seconds = 0 + else: + delete_messages_seconds = delete_messages.value + + try: + parsed_time = parse_relativedelta(argument=duration) + if parsed_time is None: + raise commands.BadArgument() + parsed_time = timedelta_from_relativedelta(relativedelta=parsed_time) + except (commands.BadArgument, ValueError): + await ctx.send(content=error(text="Please provide a valid duration!"), ephemeral=True) + return cls() + + response_message = await ctx.send(content=f"{target.mention} has been {cls.verb} for {humanize_timedelta(timedelta=parsed_time)}!\n{bold(text='Reason:')} {inline(text=reason)}") + + if silent is False: + try: + embed = await message_factory( + bot=bot, + color=await ctx.embed_color(), + guild=ctx.guild, + reason=reason, + moderation_type=cls(), + moderator=ctx.author, + duration=parsed_time, + response=response_message + ) + await target.send(embed=embed, file=get_icon(bot)) + except HTTPException: + pass + + await ctx.guild.ban(target, reason=f"{str.title(cls.verb)} by {ctx.author.id} for: {reason} (Duration: {parsed_time})", delete_message_seconds=delete_messages_seconds) + moderation = await Moderation.log( + bot=bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type='user', + target_id=target.id, + role_id=None, + duration=parsed_time, + reason=reason + ) + await response_message.edit(content=f"{target.mention} has been {cls.verb} for {humanize_timedelta(timedelta=parsed_time)}! (Case {inline(text=f'#{moderation.id}')})\n{bold(text='Reason:')} {inline(reason)}") + await log(ctx, moderation.id) + await send_evidenceformat(ctx, moderation.id) + return cls() + + @classmethod + async def expiry_handler(cls, moderation: Moderation) -> int: + reason = f"Automatic {Unban.string} from case #{moderation.id}" + try: + target = moderation.bot.get_user(moderation.target_id) + if not target: + try: + target = await moderation.bot.fetch_user(moderation.target_id) + except NotFound: + return 0 + await moderation.guild.unban(user=target, reason=reason) + + if await config.guild(moderation.guild).dm_users() is True: + try: + embed = await message_factory( + bot=moderation.bot, + color=await moderation.bot.get_embed_color(moderation.guild.channels[0]), + guild=moderation.guild, + reason=reason, + moderation_type=type_registry["unban"], + moderator=None, + duration=None, + response=None, + case=False, + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except HTTPException: + pass + logger.trace( + "%s %s (%s) from %s (%s)", + Unban.verb.title(), + target.name, + target.id, + moderation.guild.name, + moderation.guild.id, + ) + return 1 + except (NotFound, Forbidden, HTTPException) as e: + logger.error( + "Failed to %s %s (%s) from %s (%s)\n%s", + Unban.string, + target.name, + target.id, + moderation.guild.name, + moderation.guild.id, + e, + ) + return 0 + + @classmethod + async def duration_edit_handler(cls, interaction: Interaction, old_moderation: Moderation, new_moderation: Moderation) -> bool: # pylint: disable=unused-argument + return True + +class Softban(Type): + key="softban" + string="softban" + verb="softbanned" + removes_from_guild=True + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User, silent: bool, reason: str = None, delete_messages: app_commands.Choice | None = None) -> 'Softban': + """Softban a user.""" + bot = ctx.bot + try: + await ctx.guild.fetch_ban(target) + await ctx.send(content=error(f"{target.mention} is already {Ban.verb}!"), ephemeral=True) + except NotFound: + pass + + if delete_messages is None: + delete_messages_seconds = 0 + else: + delete_messages_seconds = delete_messages.value + + response_message = await ctx.send(f"{target.mention} has been {cls.verb}!\n{bold('Reason:')} {inline(reason)}") + + if silent is False: + try: + embed = await message_factory( + bot=bot, + color=await ctx.embed_color(), + guild=ctx.guild, + reason=reason, + moderation_type=cls(), + moderator=ctx.author, + duration=None, + response=response_message + ) + await target.send(embed=embed, file=get_icon(bot)) + except HTTPException: + pass + + await ctx.guild.ban(target, reason=f"{str.title(cls.verb)} by {ctx.author.id} for: {reason}", delete_message_seconds=delete_messages_seconds) + await ctx.guild.unban(target, reason=f"{str.title(cls.verb)} by {ctx.author.id} for: {reason}") + moderation = await Moderation.log( + bot=bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type='user', + target_id=target.id, + role_id=None, + duration=None, + reason=reason + ) + await response_message.edit(content=f"{target.mention} has been {cls.verb}! (Case {inline(f'#{moderation.id}')})\n{bold('Reason:')} {inline(reason)}") + await log(ctx, moderation.id) + await send_evidenceformat(ctx, moderation.id) + return cls() + + @classmethod + async def resolve_handler(cls, moderation: Moderation, reason: str) -> Tuple[bool, str]: + if await config.guild(moderation.guild).dm_users() is True: + try: + target = await moderation.bot.fetch_user(moderation.target_id) + embed = await resolve_factory( + moderation=moderation, + reason=reason + ) + await target.send(embed=embed, file=get_icon(bot=moderation.bot)) + except (Forbidden, HTTPException, NotFound): + pass + return True, "" + +class Unban(Type): + key="unban" + string="unban" + verb="unbanned" + removes_from_guild=True + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User, silent: bool, reason: str = None) -> 'Unban': + """Unban a user.""" + bot = ctx.bot + try: + await ctx.guild.fetch_ban(target) + except NotFound: + await ctx.send(content=error(f"{target.mention} is not {Ban.verb}!"), ephemeral=True) + return + + response_message = await ctx.send(f"{target.mention} has been {cls.verb}!\n{bold('Reason:')} {inline(reason)}") + + if silent is False: + try: + embed = await message_factory( + bot=bot, + color=await ctx.embed_color(), + guild=ctx.guild, + reason=reason, + moderation_type=cls(), + moderator=ctx.author, + duration=None, + response=response_message + ) + await target.send(embed=embed, file=get_icon(bot)) + except HTTPException: + pass + + await ctx.guild.unban(target, reason=f"{str.title(cls.verb)} by {ctx.author.id} for: {reason}") + moderation = await Moderation.log( + bot=bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type='user', + target_id=target.id, + role_id=None, + duration=None, + reason=reason + ) + await response_message.edit(content=f"{target.mention} has been {cls.verb}! (Case {inline(f'#{moderation.id}')})\n{bold('Reason:')} {inline(reason)}") + await log(ctx, moderation.id) + await send_evidenceformat(ctx, moderation.id) + return cls() + +class Slowmode(Type): + key="slowmode" + string="slowmode" + verb="set the slowmode in" + channel=True + + def void(self) -> None: + return None + + @classmethod + async def handler(cls, ctx: commands.Context, target: Messageable, silent: bool, duration: str, reason: str) -> 'Slowmode': # pylint: disable=unused-argument + """Set the slowmode in a channel.""" + bot = ctx.bot + try: + parsed_time = parse_relativedelta(argument=duration) + if parsed_time is None: + raise commands.BadArgument() + parsed_time = timedelta_from_relativedelta(relativedelta=parsed_time) + except (commands.BadArgument, ValueError): + await ctx.send(content=error(text="Please provide a valid duration!"), ephemeral=True) + return cls() + + if ceil(parsed_time.total_seconds()) > 21600: + await ctx.send(content=error(text="The slowmode duration cannot exceed 6 hours!"), ephemeral=True) + return cls() + + if isinstance(target, TextChannel): + await target.edit(slowmode_delay=ceil(parsed_time.total_seconds())) + moderation = await Moderation.log( + bot=bot, + guild_id=ctx.guild.id, + moderator_id=ctx.author.id, + moderation_type=cls(), + target_type='channel', + target_id=target.id, + role_id=None, + duration=parsed_time, + reason=None + ) + await ctx.send(content=f"{ctx.author.mention} has {cls.verb} {target.mention} to {humanize_timedelta(timedelta=parsed_time)}!\n{bold(text='Reason:')} {inline(text=reason)}") + await log(ctx=ctx, moderation_id=moderation.id) + return cls() + +class Lockdown(Type): + key="lockdown" + string="lockdown" + verb="locked down" + channel=True + + def void(self) -> None: + return None diff --git a/aurora/models/partials.py b/aurora/models/partials.py new file mode 100644 index 0000000..0aaa246 --- /dev/null +++ b/aurora/models/partials.py @@ -0,0 +1,89 @@ +from discord import ChannelType, Forbidden, Guild, HTTPException, InvalidData, NotFound, Role, User +from discord.abc import Messageable +from redbot.core.bot import Red + +from .base import AuroraBaseModel, AuroraGuildModel + + +class PartialUser(AuroraBaseModel): + id: int + username: str + discriminator: int + _obj: User | None + + @property + def name(self): + return f"{self.username}#{self.discriminator}" if self.discriminator != 0 else self.username + + def __str__(self): + return self.name + + def __repr__(self): + return f"<{self.__class__.__name__} id={self.id}>" + + @classmethod + async def from_id(cls, bot: Red, user_id: int) -> "PartialUser": + user = bot.get_user(user_id) + if not user: + try: + user = await bot.fetch_user(user_id) + return cls(bot=bot, id=user.id, username=user.name, discriminator=user.discriminator, _obj=user) + except NotFound: + return cls(bot=bot, id=user_id, username="Deleted User", discriminator=0, _obj=None) + return cls(bot=bot, id=user.id, username=user.name, discriminator=user.discriminator, _obj=user) + + +class PartialChannel(AuroraGuildModel): + id: int + name: str + type: ChannelType + _obj: Messageable | None + + @property + def mention(self): + if self.name in ["Deleted Channel", "Forbidden Channel"]: + return self.name + return f"<#{self.id}>" + + def __str__(self): + return self.mention + + def __repr__(self): + return f"<{self.__class__.__name__} id={self.id} guild_id={self.guild_id}>" + + @classmethod + async def from_id(cls, bot: Red, channel_id: int, guild: Guild) -> "PartialChannel": + channel = bot.get_channel(channel_id) + if not channel: + try: + channel = await bot.fetch_channel(channel_id) + return cls(bot=bot, guild_id=channel.guild.id, guild=guild, id=channel.id, name=channel.name, type=channel.type, _obj=channel) + except (NotFound, InvalidData, HTTPException, Forbidden) as e: + if e == Forbidden: + return cls(bot=bot, guild_id=0, id=channel_id, name="Forbidden Channel") + return cls(bot=bot, guild_id=0, id=channel_id, name="Deleted Channel", type=ChannelType.text, _obj=None) + return cls(bot=bot, guild_id=channel.guild.id, guild=guild, id=channel.id, name=channel.name, type=channel.type, _obj=channel) + +class PartialRole(AuroraGuildModel): + id: int + name: str + _obj: Role | None + + @property + def mention(self): + if self.name in ["Deleted Role", "Forbidden Role"]: + return self.name + return f"<@&{self.id}>" + + def __str__(self): + return self.mention + + def __repr__(self) -> str: + return f"<{self.__class__.__name__} id={self.id} guild_id={self.guild_id}>" + + @classmethod + async def from_id(cls, bot: Red, guild: Guild, role_id: int) -> "PartialRole": + role = guild.get_role(role_id) + if not role: + return cls(bot=bot, guild_id=guild.id, id=role_id, name="Deleted Role", _obj=None) + return cls(bot=bot, guild_id=guild.id, id=role.id, name=role.name, _obj=role) diff --git a/aurora/models/type.py b/aurora/models/type.py new file mode 100644 index 0000000..1df3887 --- /dev/null +++ b/aurora/models/type.py @@ -0,0 +1,97 @@ +from abc import ABC, abstractmethod +from typing import Any, Dict, Tuple + +from class_registry import ClassRegistry +from class_registry.base import AutoRegister +from discord import Interaction, Member, User +from discord.abc import Messageable +from redbot.core import commands + +type_registry: Dict['str', 'Type'] = ClassRegistry(attr_name='key', unique=True) + +class Type(AutoRegister(type_registry), ABC): + """This is a base class for moderation types. + + Attributes: + key (str): The key to use for this type. This should be unique, as this is how the type is registered internally. Changing this key will break existing cases with this type. + string (str): The string to display for this type. + verb (str): The verb to use for this type. + embed_desc (str): The string to use for embed descriptions. + channel (bool): Whether this type targets channels or users. If this is `true` in a subclass, its overridden handler methods should be typed with `discord.abc.Messageable` instead of `discord.Member | discord.User`. + removes_from_guild (bool): Whether this type's handler removes the target from the guild, or if the moderation is expected to occur whenever the user is not in the guild. This does not actually remove the target from the guild, the handler method is responsible for that. + + Properties: + name (str): The string to display for this type. This is the same as the `string` attribute. + """ + + key = "type" + string = "type" + verb = "typed" + embed_desc = "been " + channel = False + removes_from_guild = False + + @abstractmethod + def void(self) -> Any: + """This method should be overridden by any child classes. This is a placeholder to allow for automatic class registration.""" + raise NotImplementedError + + @property + def name(self) -> str: + """Alias for the `string` attribute.""" + return self.string + + def __str__(self) -> str: + return self.string + + def __repr__(self) -> str: + attrs = [ + ('key', self.key), + ('channel', self.channel), + ] + joined = ' '.join(f'{key}={value!r}' for key, value in attrs) + return f"<{self.__class__.__name__} {joined}>" + + @classmethod + async def handler(cls, ctx: commands.Context, target: Member | User | Messageable, silent: bool, **kwargs) -> 'Type': # pylint: disable=unused-argument + """This method should be overridden by any child classes, but should retain the same starting keyword arguments. + + Arguments: + ctx (commands.Context): The context of the command. + target (discord.Member | discord.User | discord.abc.Messageable): The target of the moderation. + silent (bool): Whether details about the moderation should be DM'ed to the target of the moderation. + """ + raise NotImplementedError + + @classmethod + async def resolve_handler(cls, moderation, reason: str) -> Tuple[bool, str]: # pylint: disable=unused-argument + """This method should be overridden by any resolvable child classes, but should retain the same keyword arguments. + If your moderation type should not be resolvable, do not override this. + + Arguments: + moderation (aurora.models.Moderation): The moderation to resolve. + reason (str): The reason for resolving the moderation. + """ + raise NotImplementedError + + @classmethod + async def expiry_handler(cls, moderation) -> int: # pylint: disable=unused-argument + """This method should be overridden by any expirable child classes, but should retain the same keyword arguments and return an integer. + If your moderation type should not expire, do not override this, but also do not set an `end_timestamp` when you log your moderation. + + Arguments: + moderation (aurora.models.Moderation): The moderation that is expiring. + """ + raise NotImplementedError + + @classmethod + async def duration_edit_handler(cls, interaction: Interaction, old_moderation, new_moderation) -> bool: # pylint: disable=unused-argument + """This method should be overridden by any child classes with editable durations, but should retain the same keyword arguments and should return True if the duration was successfully modified, or False if it was not. + If your moderation type's duration should not be editable, do not override this. + + Arguments: + interaction (discord.Interaction): The interaction that triggered the duration edit. + old_moderation (aurora.models.Moderation): The old moderation, from before the `/edit` command was invoked. + new_moderation (aurora.models.Moderation): The current state of the moderation. + """ + raise NotImplementedError diff --git a/aurora/utilities/config.py b/aurora/utilities/config.py index 0b5e503..14d5e04 100644 --- a/aurora/utilities/config.py +++ b/aurora/utilities/config.py @@ -27,3 +27,13 @@ def register_config(config_obj: Config): history_inline_pagesize=None, auto_evidenceformat=None, ) + + moderation_type = { + "show_in_history": True, + "show_moderator": None, + "use_discord_permissions": None, + "dm_users": None, + } + + config_obj.init_custom("types", 2) + config_obj.register_custom("types", **moderation_type) diff --git a/aurora/utilities/database.py b/aurora/utilities/database.py deleted file mode 100644 index aa876e8..0000000 --- a/aurora/utilities/database.py +++ /dev/null @@ -1,214 +0,0 @@ -# pylint: disable=cyclic-import -import json -import sqlite3 -import time -from datetime import datetime, timedelta - -from discord import Guild -from redbot.core import data_manager - -from .logger import logger -from .utils import convert_timedelta_to_str, generate_dict, get_next_case_number - - -def connect() -> sqlite3.Connection: - """Connects to the SQLite database, and returns a connection object.""" - try: - return sqlite3.connect(database=data_manager.cog_data_path(raw_name="Aurora") / "aurora.db") - - except sqlite3.OperationalError as e: - logger.error("Unable to access the SQLite database!\nError:\n%s", e.msg) - msg = f"Unable to access the SQLite Database!\n{e.msg}" - raise ConnectionRefusedError(msg) from e - - -async def create_guild_table(guild: Guild): - database = connect() - cursor = database.cursor() - - try: - cursor.execute(f"SELECT * FROM `moderation_{guild.id}`") - logger.debug("SQLite Table exists for server %s (%s)", guild.name, guild.id) - - except sqlite3.OperationalError: - query = f""" - CREATE TABLE `moderation_{guild.id}` ( - moderation_id INTEGER PRIMARY KEY, - timestamp INTEGER NOT NULL, - moderation_type TEXT NOT NULL, - target_type TEXT NOT NULL, - target_id TEXT NOT NULL, - moderator_id TEXT NOT NULL, - role_id TEXT, - duration TEXT, - end_timestamp INTEGER, - reason TEXT, - resolved INTEGER NOT NULL, - resolved_by TEXT, - resolve_reason TEXT, - expired INTEGER NOT NULL, - changes TEXT NOT NULL, - metadata TEXT NOT NULL - ) - """ - cursor.execute(query) - - index_query_1 = f"CREATE INDEX IF NOT EXISTS idx_target_id ON moderation_{guild.id}(target_id);" - cursor.execute(index_query_1) - - index_query_2 = f"CREATE INDEX IF NOT EXISTS idx_moderator_id ON moderation_{guild.id}(moderator_id);" - cursor.execute(index_query_2) - - index_query_3 = f"CREATE INDEX IF NOT EXISTS idx_moderation_id ON moderation_{guild.id}(moderation_id);" - cursor.execute(index_query_3) - - insert_query = f""" - INSERT INTO `moderation_{guild.id}` - (moderation_id, timestamp, moderation_type, target_type, target_id, moderator_id, role_id, duration, end_timestamp, reason, resolved, resolved_by, resolve_reason, expired, changes, metadata) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - """ - insert_values = ( - 0, - 0, - "NULL", - "NULL", - 0, - 0, - 0, - "NULL", - 0, - "NULL", - 0, - "NULL", - "NULL", - 0, - json.dumps([]), - json.dumps({}), - ) - cursor.execute(insert_query, insert_values) - - database.commit() - - logger.debug( - "SQLite Table (moderation_%s) created for %s (%s)", - guild.id, - guild.name, - guild.id, - ) - - database.close() - - -async def mysql_log( - guild_id: str, - author_id: str, - moderation_type: str, - target_type: str, - target_id: int, - role_id: int, - duration: timedelta, - reason: str, - database: sqlite3.Connection = None, - timestamp: int = None, - resolved: bool = False, - resolved_by: str = None, - resolved_reason: str = None, - expired: bool = None, - changes: list = None, - metadata: dict = None, -) -> int: - if not timestamp: - timestamp = int(time.time()) - - if duration != "NULL": - end_timedelta = datetime.fromtimestamp(timestamp) + duration - end_timestamp = int(end_timedelta.timestamp()) - - duration = convert_timedelta_to_str(duration) - else: - end_timestamp = 0 - - if not expired: - if int(time.time()) > end_timestamp: - expired = 1 - else: - expired = 0 - - if resolved_by is None: - resolved_by = "NULL" - - if resolved_reason is None: - resolved_reason = "NULL" - - if not database: - database = connect() - close_db = True - else: - close_db = False - cursor = database.cursor() - - moderation_id = await get_next_case_number(guild_id=guild_id, cursor=cursor) - - sql = f"INSERT INTO `moderation_{guild_id}` (moderation_id, timestamp, moderation_type, target_type, target_id, moderator_id, role_id, duration, end_timestamp, reason, resolved, resolved_by, resolve_reason, expired, changes, metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" - val = ( - moderation_id, - timestamp, - moderation_type, - target_type, - target_id, - author_id, - role_id, - duration, - end_timestamp, - reason, - int(resolved), - resolved_by, - resolved_reason, - expired, - json.dumps(changes if changes else []), - json.dumps(metadata if metadata else {}), - ) - cursor.execute(sql, val) - - cursor.close() - database.commit() - if close_db: - database.close() - - logger.debug( - "Row inserted into moderation_%s!\n%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s", - guild_id, - moderation_id, - timestamp, - moderation_type, - target_type, - target_id, - author_id, - role_id, - duration, - end_timestamp, - reason, - int(resolved), - resolved_by, - resolved_reason, - expired, - changes, - metadata, - ) - - return moderation_id - - -async def fetch_case(moderation_id: int, guild_id: str) -> dict: - """This method fetches a case from the database and returns the case's dictionary.""" - database = connect() - cursor = database.cursor() - - query = f"SELECT * FROM moderation_{guild_id} WHERE moderation_id = ?;" - cursor.execute(query, (moderation_id,)) - result = cursor.fetchone() - - cursor.close() - database.close() - - return generate_dict(result) diff --git a/aurora/utilities/factory.py b/aurora/utilities/factory.py index 4c54a1d..bc94f50 100644 --- a/aurora/utilities/factory.py +++ b/aurora/utilities/factory.py @@ -2,82 +2,70 @@ from datetime import datetime, timedelta from typing import Union -from discord import Color, Embed, Guild, Interaction, InteractionMessage, Member, Role, User +from discord import Color, Embed, Guild, Interaction, Member, Message, Role, User from redbot.core import commands -from redbot.core.utils.chat_formatting import bold, box, error, humanize_timedelta, warning +from redbot.core.bot import Red +from redbot.core.utils.chat_formatting import bold, box, error, humanize_timedelta, inline, warning -from aurora.utilities.config import config -from aurora.utilities.utils import fetch_channel_dict, fetch_user_dict, get_bool_emoji, get_next_case_number, get_pagesize_str +from ..models.moderation import Moderation +from ..models.partials import PartialUser +from ..models.type import Type +from .config import config +from .utils import get_bool_emoji, get_pagesize_str async def message_factory( + bot: Red, color: Color, guild: Guild, reason: str, - moderation_type: str, - moderator: Union[Member, User] = None, - duration: timedelta = None, - response: InteractionMessage = None, - role: Role = None, + moderation_type: Type, + moderator: Union[Member, User] | None = None, + duration: timedelta | None = None, + response: Message | None = None, + case: bool = True, ) -> Embed: """This function creates a message from set parameters, meant for contacting the moderated user. Args: + bot (Red): The bot instance. color (Color): The color of the embed. guild (Guild): The guild the moderation occurred in. reason (str): The reason for the moderation. - moderation_type (str): The type of moderation. + moderation_type (Type): The type of moderation. moderator (Union[Member, User], optional): The moderator who performed the moderation. Defaults to None. duration (timedelta, optional): The duration of the moderation. Defaults to None. - response (InteractionMessage, optional): The response message. Defaults to None. - role (Role, optional): The role that was added or removed. Defaults to None. + response (Message, optional): The response message. Defaults to None. + case (bool, optional): Whether the message is for a moderation case. Defaults to True. Returns: embed: The message embed. """ - if response is not None and moderation_type not in [ - "kicked", - "banned", - "tempbanned", - "unbanned", - ]: + if response is not None and not moderation_type.removes_from_guild: guild_name = f"[{guild.name}]({response.jump_url})" else: guild_name = guild.name - title = moderation_type - - if moderation_type in ["tempbanned", "muted"] and duration: + if duration: embed_duration = f" for {humanize_timedelta(timedelta=duration)}" else: embed_duration = "" - if moderation_type == "note": - embed_desc = "received a" - elif moderation_type == "addrole": - embed_desc = f"received the {role.name} role" - title = "Role Added" - moderation_type = "" - elif moderation_type == "removerole": - embed_desc = f"lost the {role.name} role" - title = "Role Removed" - moderation_type = "" - else: - embed_desc = "been" - embed = Embed( - title=str.title(title), - description=f"You have {embed_desc} {moderation_type}{embed_duration} in {guild_name}.", + title=str.title(moderation_type.verb), + description=f"You have {moderation_type.embed_desc}{moderation_type.verb}{embed_duration} in {guild_name}.", color=color, timestamp=datetime.now(), ) - if await config.guild(guild).show_moderator() and moderator is not None: + show_moderator = await config.custom("types", guild.id, moderation_type.key).show_moderator() + if show_moderator is None: + show_moderator = await config.guild(guild).show_moderator() + + if show_moderator and moderator is not None: embed.add_field( - name="Moderator", - value=f"`{moderator.name} ({moderator.id})`", - inline=False, + name="Moderator", value=f"`{moderator.name} ({moderator.id})`", inline=False ) embed.add_field(name="Reason", value=f"`{reason}`", inline=False) @@ -87,216 +75,213 @@ async def message_factory( else: embed.set_author(name=guild.name) + if case: + embed.set_footer( + text=f"Case #{await Moderation.get_next_case_number(bot=bot, guild_id=guild.id):,}", + icon_url="attachment://arrow.png", + ) + + return embed + +async def resolve_factory(moderation: Moderation, reason: str) -> Embed: + """This function creates a resolved embed from set parameters, meant for contacting the moderated user. + + Args: + moderation (aurora.models.Moderation): The moderation object. + reason (str): The reason for resolving the moderation. + Returns: `discord.Embed` + """ + + embed = Embed( + title=str.title(moderation.type.name) + " Resolved", + description=f"Your {moderation.type.name} in {moderation.guild.name} has been resolved.", + color=await moderation.bot.get_embed_color(moderation.guild.channels[0]), + timestamp=datetime.now(), + ) + + embed.add_field(name="Reason", value=f"`{reason}`", inline=False) + + if moderation.guild.icon.url is not None: + embed.set_author(name=moderation.guild.name, icon_url=moderation.guild.icon.url) + else: + embed.set_author(name=moderation.guild.name) embed.set_footer( - text=f"Case #{await get_next_case_number(guild.id):,}", + text=f"Case #{moderation.id:,}", icon_url="attachment://arrow.png", ) return embed - async def log_factory( - interaction: Interaction, - case_dict: dict, - resolved: bool = False, + ctx: commands.Context, moderation: Moderation, resolved: bool = False ) -> Embed: """This function creates a log embed from set parameters, meant for moderation logging. Args: - interaction (Interaction): The interaction object. - case_dict (dict): The case dictionary. + ctx (commands.Context): The ctx object. + moderation (aurora.models.Moderation): The moderation object. resolved (bool, optional): Whether the case is resolved or not. Defaults to False. """ - target_name = "" + target = await moderation.get_target() + moderator = await moderation.get_moderator() if resolved: - if case_dict["target_type"] == "USER": - target_user = await fetch_user_dict(interaction.client, case_dict["target_id"]) - target_name = f"`{target_user['name']}`" if target_user["discriminator"] == "0" else f"`{target_user['name']}#{target_user['discriminator']}`" - elif case_dict["target_type"] == "CHANNEL": - target_user = await fetch_channel_dict(interaction.guild, case_dict["target_id"]) - if target_user["mention"]: - target_name = f"{target_user['mention']}" - else: - target_name = f"`{target_user['name']}`" - - moderator_user = await fetch_user_dict(interaction.client, case_dict["moderator_id"]) - moderator_name = f"`{moderator_user['name']}`" if moderator_user["discriminator"] == "0" else f"`{moderator_user['name']}#{moderator_user['discriminator']}`" - embed = Embed( - title=f"📕 Case #{case_dict['moderation_id']:,} Resolved", - color=await interaction.client.get_embed_color(interaction.channel), + title=f"📕 Case #{moderation.id:,} Resolved", + color=await ctx.bot.get_embed_color(ctx.channel), ) - embed.description = f"**Type:** {str.title(case_dict['moderation_type'])}\n**Target:** {target_name} ({target_user['id']})\n**Moderator:** {moderator_name} ({moderator_user['id']})\n**Timestamp:** | " + resolved_by = await moderation.get_resolved_by() + embed.description = f"**Type:** {str.title(moderation.type.string)}\n**Target:** {target.name} ({target.id})\n**Moderator:** {moderator.name} ({moderator.id})\n**Timestamp:** | " - if case_dict["duration"] != "NULL": - td = timedelta( - **{ - unit: int(val) - for unit, val in zip( - ["hours", "minutes", "seconds"], - case_dict["duration"].split(":"), - ) - }, + if moderation.duration is not None: + duration_embed = ( + f"{humanize_timedelta(timedelta=moderation.duration)} | " + if not moderation.expired + else str(humanize_timedelta(timedelta=moderation.duration)) + ) + embed.description = ( + embed.description + + f"\n**Duration:** {duration_embed}\n**Expired:** {moderation.expired}" ) - duration_embed = f"{humanize_timedelta(timedelta=td)} | " if case_dict["expired"] == "0" else str(humanize_timedelta(timedelta=td)) - embed.description = embed.description + f"\n**Duration:** {duration_embed}\n**Expired:** {bool(case_dict['expired'])}" - embed.add_field(name="Reason", value=box(case_dict["reason"]), inline=False) + if moderation.metadata.items(): + for key, value in moderation.metadata.items(): + embed.description += f"\n**{key.title()}:** {value}" + + embed.add_field(name="Reason", value=box(moderation.reason), inline=False) - resolved_user = await fetch_user_dict(interaction.client, case_dict["resolved_by"]) - resolved_name = resolved_user["name"] if resolved_user["discriminator"] == "0" else f"{resolved_user['name']}#{resolved_user['discriminator']}" embed.add_field( name="Resolve Reason", - value=f"Resolved by `{resolved_name}` ({resolved_user['id']}) for:\n" + box(case_dict["resolve_reason"]), + value=f"Resolved by `{resolved_by.name}` ({resolved_by.id}) for:\n" + + box(moderation.resolve_reason), inline=False, ) else: - if case_dict["target_type"] == "USER": - target_user = await fetch_user_dict(interaction.client, case_dict["target_id"]) - target_name = f"`{target_user['name']}`" if target_user["discriminator"] == "0" else f"`{target_user['name']}#{target_user['discriminator']}`" - elif case_dict["target_type"] == "CHANNEL": - target_user = await fetch_channel_dict(interaction.guild, case_dict["target_id"]) - if target_user["mention"]: - target_name = target_user["mention"] - else: - target_name = f"`{target_user['name']}`" - - moderator_user = await fetch_user_dict(interaction.client, case_dict["moderator_id"]) - moderator_name = f"`{moderator_user['name']}`" if moderator_user["discriminator"] == "0" else f"`{moderator_user['name']}#{moderator_user['discriminator']}`" - embed = Embed( - title=f"📕 Case #{case_dict['moderation_id']:,}", - color=await interaction.client.get_embed_color(interaction.channel), + title=f"📕 Case #{moderation.id:,}", + color=await ctx.bot.get_embed_color(ctx.channel), ) - embed.description = f"**Type:** {str.title(case_dict['moderation_type'])}\n**Target:** {target_name} ({target_user['id']})\n**Moderator:** {moderator_name} ({moderator_user['id']})\n**Timestamp:** | " + embed.description = f"**Type:** {str.title(moderation.type.string)}\n**Target:** {target.name} ({target.id})\n**Moderator:** {moderator.name} ({moderator.id})\n**Timestamp:** | " - if case_dict["duration"] != "NULL": - td = timedelta( - **{ - unit: int(val) - for unit, val in zip( - ["hours", "minutes", "seconds"], - case_dict["duration"].split(":"), - ) - }, + if moderation.duration: + embed.description = ( + embed.description + + f"\n**Duration:** {humanize_timedelta(timedelta=moderation.duration)} | " ) - embed.description = embed.description + f"\n**Duration:** {humanize_timedelta(timedelta=td)} | " - embed.add_field(name="Reason", value=box(case_dict["reason"]), inline=False) + if moderation.metadata.items(): + for key, value in moderation.metadata.items(): + embed.description += f"\n**{key.title()}:** {value}" + + embed.add_field(name="Reason", value=box(moderation.reason), inline=False) return embed -async def case_factory(interaction: Interaction, case_dict: dict) -> Embed: +async def case_factory(interaction: Interaction, moderation: Moderation) -> Embed: """This function creates a case embed from set parameters. Args: - interaction (Interaction): The interaction object. - case_dict (dict): The case dictionary. + interaction (discord.Interaction): The interaction object. + moderation (aurora.models.Moderation): The moderation object. """ - target_name = "" - if case_dict["target_type"] == "USER": - target_user = await fetch_user_dict(interaction.client, case_dict["target_id"]) - target_name = f"`{target_user['name']}`" if target_user["discriminator"] == "0" else f"`{target_user['name']}#{target_user['discriminator']}`" - elif case_dict["target_type"] == "CHANNEL": - target_user = await fetch_channel_dict(interaction.guild, case_dict["target_id"]) - if target_user["mention"]: - target_name = f"{target_user['mention']}" - else: - target_name = f"`{target_user['name']}`" - - moderator_user = await fetch_user_dict(interaction.client, case_dict["moderator_id"]) - moderator_name = f"`{moderator_user['name']}`" if moderator_user["discriminator"] == "0" else f"`{moderator_user['name']}#{moderator_user['discriminator']}`" + target = await moderation.get_target() + moderator = await moderation.get_moderator() embed = Embed( - title=f"📕 Case #{case_dict['moderation_id']:,}", + title=f"📕 Case #{moderation.id:,}", color=await interaction.client.get_embed_color(interaction.channel), ) - embed.description = f"**Type:** {str.title(case_dict['moderation_type'])}\n**Target:** {target_name} ({target_user['id']})\n**Moderator:** {moderator_name} ({moderator_user['id']})\n**Resolved:** {bool(case_dict['resolved'])}\n**Timestamp:** | " + embed.description = f"**Type:** {str.title(moderation.type.string)}\n**Target:** `{target.name}` ({target.id})\n**Moderator:** `{moderator.name}` ({moderator.id})\n**Resolved:** {moderation.resolved}\n**Timestamp:** | " - if case_dict["duration"] != "NULL": - td = timedelta( - **{ - unit: int(val) - for unit, val in zip( - ["hours", "minutes", "seconds"], - case_dict["duration"].split(":"), - ) - }, + if moderation.duration: + duration_embed = ( + f"{humanize_timedelta(timedelta=moderation.duration)} | " + if moderation.expired is False + else str(humanize_timedelta(timedelta=moderation.duration)) ) - duration_embed = f"{humanize_timedelta(timedelta=td)} | " if bool(case_dict["expired"]) is False else str(humanize_timedelta(timedelta=td)) - embed.description += f"\n**Duration:** {duration_embed}\n**Expired:** {bool(case_dict['expired'])}" + embed.description += f"\n**Duration:** {duration_embed}\n**Expired:** {moderation.expired}" - embed.description += f"\n**Changes:** {len(case_dict['changes']) - 1}" if case_dict["changes"] else "\n**Changes:** 0" + embed.description += ( + f"\n**Changes:** {len(moderation.changes) - 1}" + if moderation.changes + else "\n**Changes:** 0" + ) - if case_dict["role_id"]: - embed.description += f"\n**Role:** <@&{case_dict['role_id']}>" + if moderation.role_id: + role = await moderation.get_role() + embed.description += f"\n**Role:** {role.name}" - if case_dict["metadata"]: - if case_dict["metadata"]["imported_from"]: - embed.description += f"\n**Imported From:** {case_dict['metadata']['imported_from']}" + if moderation.metadata: + if moderation.metadata.get("imported_from"): + embed.description += ( + f"\n**Imported From:** {moderation.metadata['imported_from']}" + ) + moderation.metadata.pop("imported_from") + if moderation.metadata.get("imported_timestamp"): + embed.description += ( + f"\n**Imported Timestamp:** | " + ) + moderation.metadata.pop("imported_timestamp") + if moderation.metadata.items(): + for key, value in moderation.metadata.items(): + embed.description += f"\n**{key.title()}:** {value}" - embed.add_field(name="Reason", value=box(case_dict["reason"]), inline=False) + embed.add_field(name="Reason", value=box(moderation.reason), inline=False) - if case_dict["resolved"] == 1: - resolved_user = await fetch_user_dict(interaction.client, case_dict["resolved_by"]) - resolved_name = f"`{resolved_user['name']}`" if resolved_user["discriminator"] == "0" else f"`{resolved_user['name']}#{resolved_user['discriminator']}`" + if moderation.resolved: + resolved_user = await moderation.get_resolved_by() + if not resolved_user: + resolved_user = PartialUser(bot=interaction.client, id=0, username="Deleted User", discriminator="0") embed.add_field( name="Resolve Reason", - value=f"Resolved by {resolved_name} ({resolved_user['id']}) for:\n{box(case_dict['resolve_reason'])}", + value=f"Resolved by `{resolved_user.name or 'Deleted User'}` ({resolved_user.id or '0'}) for:\n{box(moderation.resolve_reason)}", inline=False, ) return embed -async def changes_factory(interaction: Interaction, case_dict: dict) -> Embed: +async def changes_factory(interaction: Interaction, moderation: Moderation) -> Embed: """This function creates a changes embed from set parameters. Args: - interaction (Interaction): The interaction object. - case_dict (dict): The case dictionary. + interaction (discord.Interaction): The interaction object. + moderation (aurora.models.Moderation): The moderation object. """ embed = Embed( - title=f"📕 Case #{case_dict['moderation_id']:,} Changes", + title=f"📕 Case #{moderation.id:,} Changes", color=await interaction.client.get_embed_color(interaction.channel), ) memory_dict = {} - if case_dict["changes"]: - for change in case_dict["changes"]: - if change["user_id"] not in memory_dict: - memory_dict[str(change["user_id"])] = await fetch_user_dict( - interaction.client, - change["user_id"], - ) + if moderation.changes: + for change in moderation.changes: + if change.user_id not in memory_dict: + memory_dict[str(change.user_id)] = await change.get_user() - user = memory_dict[str(change["user_id"])] - name = user["name"] if user["discriminator"] == "0" else f"{user['name']}#{user['discriminator']}" + user: PartialUser = memory_dict[str(change.user_id)] - timestamp = f" | " + timestamp = f" | " + end_timestamp = f" | " if change.end_timestamp else None - if change["type"] == "ORIGINAL": - embed.add_field( - name="Original", - value=f"**User:** `{name}` ({user['id']})\n**Reason:** {change['reason']}\n**Timestamp:** {timestamp}", - inline=False, - ) + change_str = [ + f"{bold('User:')} {inline(user.name)} ({user.id})", + f"{bold('Reason:')} {change.reason}" if change.reason else "", + f"{bold('Duration:')} {humanize_timedelta(timedelta=change.duration)}" if change.duration else "", + f"{bold('End Timestamp:')} {end_timestamp}" if end_timestamp else "", + f"{bold('Timestamp')} {timestamp}", + ] + copy = change_str.copy() + for string in change_str: + if string == "": + copy.remove(string) - elif change["type"] == "EDIT": - embed.add_field( - name="Edit", - value=f"**User:** `{name}` ({user['id']})\n**Reason:** {change['reason']}\n**Timestamp:** {timestamp}", - inline=False, - ) - - elif change["type"] == "RESOLVE": - embed.add_field( - name="Resolve", - value=f"**User:** `{name}` ({user['id']})\n**Reason:** {change['reason']}\n**Timestamp:** {timestamp}", - inline=False, - ) + embed.add_field( + name=change.type.title(), + value="\n".join(copy), + inline=False, + ) else: embed.description = "*No changes have been made to this case.* 🙁" @@ -304,37 +289,29 @@ async def changes_factory(interaction: Interaction, case_dict: dict) -> Embed: return embed -async def evidenceformat_factory(interaction: Interaction, case_dict: dict) -> str: +async def evidenceformat_factory(moderation: Moderation) -> str: """This function creates a codeblock in evidence format from set parameters. Args: - interaction (Interaction): The interaction object. - case_dict (dict): The case dictionary. + interaction (discord.Interaction): The interaction object. + moderation (aurora.models.Moderation): The moderation object. """ - target_name = "" - if case_dict["target_type"] == "USER": - target_user = await fetch_user_dict(interaction.client, case_dict["target_id"]) - target_name = target_user["name"] if target_user["discriminator"] == "0" else f"{target_user['name']}#{target_user['discriminator']}" + target = await moderation.get_target() + moderator = await moderation.get_moderator() - elif case_dict["target_type"] == "CHANNEL": - target_user = await fetch_channel_dict(interaction.guild, case_dict["target_id"]) - target_name = target_user["name"] + content = f"Case: {moderation.id:,} ({str.title(moderation.type.string)})\nTarget: {target.name} ({target.id})\nModerator: {moderator.name} ({moderator.id})" - moderator_user = await fetch_user_dict(interaction.client, case_dict["moderator_id"]) - moderator_name = moderator_user["name"] if moderator_user["discriminator"] == "0" else f"{moderator_user['name']}#{moderator_user['discriminator']}" + if moderation.duration is not None: + content += f"\nDuration: {humanize_timedelta(timedelta=moderation.duration)}" - content = f"Case: {case_dict['moderation_id']:,} ({str.title(case_dict['moderation_type'])})\nTarget: {target_name} ({target_user['id']})\nModerator: {moderator_name} ({moderator_user['id']})" + if moderation.role_id: + role = await moderation.get_role() + content += "\nRole: " + (role.name if role is not None else moderation.role_id) - if case_dict["role_id"] != "0": - role = interaction.guild.get_role(int(case_dict["role_id"])) - content += "\nRole: " + (role.name if role is not None else case_dict["role_id"]) + content += f"\nReason: {moderation.reason}" - if case_dict["duration"] != "NULL": - hours, minutes, seconds = map(int, case_dict["duration"].split(":")) - td = timedelta(hours=hours, minutes=minutes, seconds=seconds) - content += f"\nDuration: {humanize_timedelta(timedelta=td)}" - - content += f"\nReason: {case_dict['reason']}" + for key, value in moderation.metadata.items(): + content += f"\n{key.title()}: {value}" return box(content, "prolog") @@ -363,11 +340,17 @@ async def overrides_embed(ctx: commands.Context) -> Embed: } override_str = [ - "- " + bold("Auto Evidence Format: ") + get_bool_emoji(override_settings["auto_evidenceformat"]), + "- " + + bold("Auto Evidence Format: ") + + get_bool_emoji(override_settings["auto_evidenceformat"]), "- " + bold("Ephemeral: ") + get_bool_emoji(override_settings["ephemeral"]), "- " + bold("History Inline: ") + get_bool_emoji(override_settings["inline"]), - "- " + bold("History Inline Pagesize: ") + get_pagesize_str(override_settings["inline_pagesize"]), - "- " + bold("History Pagesize: ") + get_pagesize_str(override_settings["pagesize"]), + "- " + + bold("History Inline Pagesize: ") + + get_pagesize_str(override_settings["inline_pagesize"]), + "- " + + bold("History Pagesize: ") + + get_pagesize_str(override_settings["pagesize"]), ] override_str = "\n".join(override_str) @@ -389,7 +372,7 @@ async def guild_embed(ctx: commands.Context) -> Embed: guild_settings = { "show_moderator": await config.guild(ctx.guild).show_moderator(), "use_discord_permissions": await config.guild( - ctx.guild, + ctx.guild ).use_discord_permissions(), "ignore_modlog": await config.guild(ctx.guild).ignore_modlog(), "ignore_other_bots": await config.guild(ctx.guild).ignore_other_bots(), @@ -399,7 +382,7 @@ async def guild_embed(ctx: commands.Context) -> Embed: "history_inline": await config.guild(ctx.guild).history_inline(), "history_pagesize": await config.guild(ctx.guild).history_pagesize(), "history_inline_pagesize": await config.guild( - ctx.guild, + ctx.guild ).history_inline_pagesize(), "auto_evidenceformat": await config.guild(ctx.guild).auto_evidenceformat(), "respect_hierarchy": await config.guild(ctx.guild).respect_hierarchy(), @@ -412,17 +395,37 @@ async def guild_embed(ctx: commands.Context) -> Embed: channel = channel.mention guild_str = [ - "- " + bold("Show Moderator: ") + get_bool_emoji(guild_settings["show_moderator"]), - "- " + bold("Use Discord Permissions: ") + get_bool_emoji(guild_settings["use_discord_permissions"]), - "- " + bold("Respect Hierarchy: ") + get_bool_emoji(guild_settings["respect_hierarchy"]), - "- " + bold("Ignore Modlog: ") + get_bool_emoji(guild_settings["ignore_modlog"]), - "- " + bold("Ignore Other Bots: ") + get_bool_emoji(guild_settings["ignore_other_bots"]), + "- " + + bold("Show Moderator: ") + + get_bool_emoji(guild_settings["show_moderator"]), + "- " + + bold("Use Discord Permissions: ") + + get_bool_emoji(guild_settings["use_discord_permissions"]), + "- " + + bold("Respect Hierarchy: ") + + get_bool_emoji(guild_settings["respect_hierarchy"]), + "- " + + bold("Ignore Modlog: ") + + get_bool_emoji(guild_settings["ignore_modlog"]), + "- " + + bold("Ignore Other Bots: ") + + get_bool_emoji(guild_settings["ignore_other_bots"]), "- " + bold("DM Users: ") + get_bool_emoji(guild_settings["dm_users"]), - "- " + bold("Auto Evidence Format: ") + get_bool_emoji(guild_settings["auto_evidenceformat"]), - "- " + bold("Ephemeral: ") + get_bool_emoji(guild_settings["history_ephemeral"]), - "- " + bold("History Inline: ") + get_bool_emoji(guild_settings["history_inline"]), - "- " + bold("History Pagesize: ") + get_pagesize_str(guild_settings["history_pagesize"]), - "- " + bold("History Inline Pagesize: ") + get_pagesize_str(guild_settings["history_inline_pagesize"]), + "- " + + bold("Auto Evidence Format: ") + + get_bool_emoji(guild_settings["auto_evidenceformat"]), + "- " + + bold("Ephemeral: ") + + get_bool_emoji(guild_settings["history_ephemeral"]), + "- " + + bold("History Inline: ") + + get_bool_emoji(guild_settings["history_inline"]), + "- " + + bold("History Pagesize: ") + + get_pagesize_str(guild_settings["history_pagesize"]), + "- " + + bold("History Inline Pagesize: ") + + get_pagesize_str(guild_settings["history_inline_pagesize"]), "- " + bold("Log Channel: ") + channel, ] guild_str = "\n".join(guild_str) @@ -446,21 +449,17 @@ async def addrole_embed(ctx: commands.Context) -> Embed: for role in whitelist: evalulated_role = ctx.guild.get_role(role) or error(f"`{role}` (Not Found)") if isinstance(evalulated_role, Role): - roles.append( - { - "id": evalulated_role.id, - "mention": evalulated_role.mention, - "position": evalulated_role.position, - }, - ) + roles.append({ + "id": evalulated_role.id, + "mention": evalulated_role.mention, + "position": evalulated_role.position + }) else: - roles.append( - { - "id": role, - "mention": error(f"`{role}` (Not Found)"), - "position": 0, - }, - ) + roles.append({ + "id": role, + "mention": error(f"`{role}` (Not Found)"), + "position": 0 + }) if roles: roles = sorted(roles, key=lambda x: x["position"], reverse=True) @@ -471,7 +470,9 @@ async def addrole_embed(ctx: commands.Context) -> Embed: e = await _config(ctx) e.title += ": Addrole Whitelist" - e.description = "Use the select menu below to manage this guild's addrole whitelist." + e.description = ( + "Use the select menu below to manage this guild's addrole whitelist." + ) if len(whitelist_str) > 4000 and len(whitelist_str) < 5000: lines = whitelist_str.split("\n") @@ -501,21 +502,17 @@ async def immune_embed(ctx: commands.Context) -> Embed: for role in immune_roles: evalulated_role = ctx.guild.get_role(role) or error(f"`{role}` (Not Found)") if isinstance(evalulated_role, Role): - roles.append( - { - "id": evalulated_role.id, - "mention": evalulated_role.mention, - "position": evalulated_role.position, - }, - ) + roles.append({ + "id": evalulated_role.id, + "mention": evalulated_role.mention, + "position": evalulated_role.position + }) else: - roles.append( - { - "id": role, - "mention": error(f"`{role}` (Not Found)"), - "position": 0, - }, - ) + roles.append({ + "id": role, + "mention": error(f"`{role}` (Not Found)"), + "position": 0 + }) if roles: roles = sorted(roles, key=lambda x: x["position"], reverse=True) @@ -546,3 +543,41 @@ async def immune_embed(ctx: commands.Context) -> Embed: e.description += "\n\n" + immune_str return e + +async def type_embed(ctx: commands.Context, moderation_type = Type) -> Embed: + """Generates a configuration menu field value for a guild's settings.""" + + type_settings = { + "show_in_history": await config.custom("types", ctx.guild.id, moderation_type.key).show_in_history(), + "show_moderator": await config.custom("types", ctx.guild.id, moderation_type.key).show_moderator(), + "use_discord_permissions": await config.custom("types", ctx.guild.id, moderation_type.key).use_discord_permissions(), + "dm_users": await config.custom("types", ctx.guild.id, moderation_type.key).dm_users(), + } + + guild_str = [ + "- " + + bold("Show in History: ") + + get_bool_emoji(type_settings["show_in_history"]), + "- " + + bold("Show Moderator: ") + + get_bool_emoji(type_settings["show_moderator"]), + "- " + + bold("Use Discord Permissions: ") + + get_bool_emoji(type_settings["use_discord_permissions"]), + "- " + + bold("DM Users: ") + + get_bool_emoji(type_settings["dm_users"]), + ] + guild_str = "\n".join(guild_str) + + e = await _config(ctx) + e.title += f": {moderation_type.string.title()} Configuration" + e.description = ( + f""" + Use the buttons below to manage Aurora's configuration for the {bold(moderation_type.string)} moderation type. + If an option has a question mark (\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16}) next to it, Aurora will default to the guild level setting instead. + See `{ctx.prefix}aurora set guild` for more information.\n + """ + + guild_str + ) + return e diff --git a/aurora/utilities/json.py b/aurora/utilities/json.py new file mode 100644 index 0000000..b231b7b --- /dev/null +++ b/aurora/utilities/json.py @@ -0,0 +1,135 @@ +import json +from datetime import datetime, timedelta +from typing import Any + +from redbot.core.bot import Red + +from ..models.base import AuroraBaseModel +from ..models.type import Type + + +class JSONEncoder(json.JSONEncoder): + def default(self, o) -> Any: + match o: + case datetime(): + return int(o.timestamp()) + case timedelta(): + from ..utilities.utils import timedelta_to_string + return timedelta_to_string(o) + case AuroraBaseModel(): + return o.dump() + case Type(): + return o.key + case Red(): + return None + case _: + return super().default(o) + + +# This is a wrapper around the json module's dumps function that uses our custom JSONEncoder class +def dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, + allow_nan=True, indent=None, separators=None, + default=None, sort_keys=False, **kw) -> str: + """Serialize ``obj`` to a JSON formatted ``str``. + + If ``skipkeys`` is true then ``dict`` keys that are not basic types + (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped + instead of raising a ``TypeError``. + + If ``ensure_ascii`` is false, then the return value can contain non-ASCII + characters if they appear in strings contained in ``obj``. Otherwise, all + such characters are escaped in JSON strings. + + If ``check_circular`` is false, then the circular reference check + for container types will be skipped and a circular reference will + result in an ``RecursionError`` (or worse). + + If ``allow_nan`` is false, then it will be a ``ValueError`` to + serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in + strict compliance of the JSON specification, instead of using the + JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). + + If ``indent`` is a non-negative integer, then JSON array elements and + object members will be pretty-printed with that indent level. An indent + level of 0 will only insert newlines. ``None`` is the most compact + representation. + + If specified, ``separators`` should be an ``(item_separator, key_separator)`` + tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and + ``(',', ': ')`` otherwise. To get the most compact JSON representation, + you should specify ``(',', ':')`` to eliminate whitespace. + + ``default(obj)`` is a function that should return a serializable version + of obj or raise TypeError. The default simply raises TypeError. + + If *sort_keys* is true (default: ``False``), then the output of + dictionaries will be sorted by key. + """ + return json.dumps( + obj, + cls=JSONEncoder, + skipkeys=skipkeys, + ensure_ascii=ensure_ascii, + check_circular=check_circular, + allow_nan=allow_nan, + indent=indent, + separators=separators, + default=default, + sort_keys=sort_keys, + **kw + ) + +# This is a wrapper around the json module's dump function that uses our custom JSONEncoder class +def dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, + allow_nan=True, indent=None, separators=None, + default=None, sort_keys=False, **kw) -> str: + """Serialize ``obj`` as a JSON formatted stream to ``fp`` (a + ``.write()``-supporting file-like object). + + If ``skipkeys`` is true then ``dict`` keys that are not basic types + (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped + instead of raising a ``TypeError``. + + If ``ensure_ascii`` is false, then the strings written to ``fp`` can + contain non-ASCII characters if they appear in strings contained in + ``obj``. Otherwise, all such characters are escaped in JSON strings. + + If ``check_circular`` is false, then the circular reference check + for container types will be skipped and a circular reference will + result in an ``RecursionError`` (or worse). + + If ``allow_nan`` is false, then it will be a ``ValueError`` to + serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) + in strict compliance of the JSON specification, instead of using the + JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). + + If ``indent`` is a non-negative integer, then JSON array elements and + object members will be pretty-printed with that indent level. An indent + level of 0 will only insert newlines. ``None`` is the most compact + representation. + + If specified, ``separators`` should be an ``(item_separator, key_separator)`` + tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and + ``(',', ': ')`` otherwise. To get the most compact JSON representation, + you should specify ``(',', ':')`` to eliminate whitespace. + + ``default(obj)`` is a function that should return a serializable version + of obj or raise TypeError. The default simply raises TypeError. + + If *sort_keys* is true (default: ``False``), then the output of + dictionaries will be sorted by key. + """ + return json.dump( + obj, + fp, + cls=JSONEncoder, + skipkeys=skipkeys, + ensure_ascii=ensure_ascii, + check_circular=check_circular, + allow_nan=allow_nan, + indent=indent, + separators=separators, + default=default, + sort_keys=sort_keys, + **kw + ) diff --git a/aurora/utilities/utils.py b/aurora/utilities/utils.py index 049eb0d..c0cac6f 100644 --- a/aurora/utilities/utils.py +++ b/aurora/utilities/utils.py @@ -1,23 +1,25 @@ # pylint: disable=cyclic-import -import json -from datetime import datetime -from datetime import timedelta as td -from typing import Optional, Union +from datetime import datetime, timedelta +from typing import Optional, Tuple, Union +import aiosqlite from dateutil.relativedelta import relativedelta as rd -from discord import File, Guild, Interaction, Member, SelectOption, User -from discord.errors import Forbidden, NotFound +from discord import File, Guild, Interaction, Member, SelectOption, TextChannel, User +from discord.errors import Forbidden from redbot.core import commands, data_manager from redbot.core.utils.chat_formatting import error -from .config import config +from ..models.type import Type +from ..utilities.config import config +from ..utilities.json import dumps +from ..utilities.logger import logger def check_permissions( user: User, - permissions: list, - ctx: Union[commands.Context, Interaction] = None, - guild: Guild = None, + permissions: Tuple[str], + ctx: commands.Context | Interaction | None = None, + guild: Guild | None = None, ) -> Union[bool, str]: """Checks if a user has a specific permission (or a list of permissions) in a channel.""" if ctx: @@ -32,48 +34,80 @@ def check_permissions( raise (KeyError) for permission in permissions: - if not getattr(resolved_permissions, permission, False) and resolved_permissions.administrator is not True: + if ( + not getattr(resolved_permissions, permission, False) + and resolved_permissions.administrator is not True + ): return permission return False -async def check_moddable(target: Union[User, Member], interaction: Interaction, permissions: list) -> bool: +async def check_moddable( + target: Union[User, Member, TextChannel], ctx: commands.Context, permissions: Tuple[str], moderation_type: Type, +) -> bool: """Checks if a moderator can moderate a target.""" - if check_permissions(interaction.client.user, permissions, guild=interaction.guild): - await interaction.response.send_message( - error(f"I do not have the `{permissions}` permission, required for this action."), + is_channel = isinstance(target, TextChannel) + + use_discord_permissions = await config.custom("types", ctx.guild.id, moderation_type.key).use_discord_permissions() + if use_discord_permissions is None: + use_discord_permissions = await config.guild(ctx.guild).use_discord_permissions() + + if check_permissions(ctx.bot.user, permissions, guild=ctx.guild): + await ctx.send( + error( + f"I do not have the `{permissions}` permission, required for this action." + ), ephemeral=True, ) return False - if await config.guild(interaction.guild).use_discord_permissions() is True: - if check_permissions(interaction.user, permissions, guild=interaction.guild): - await interaction.response.send_message( - error(f"You do not have the `{permissions}` permission, required for this action."), + if use_discord_permissions is True: + if check_permissions(ctx.author, permissions, guild=ctx.guild): + await ctx.send( + error( + f"You do not have the `{permissions}` permission, required for this action." + ), ephemeral=True, ) return False - if interaction.user.id == target.id: - await interaction.response.send_message(content="You cannot moderate yourself!", ephemeral=True) + if ctx.author.id == target.id: + await ctx.send( + content="You cannot moderate yourself!", ephemeral=True + ) return False - if target.bot: - await interaction.response.send_message(content="You cannot moderate bots!", ephemeral=True) + if not is_channel and target.bot: + await ctx.send( + content="You cannot moderate bots!", ephemeral=True + ) return False if isinstance(target, Member): - if interaction.user.top_role <= target.top_role and await config.guild(interaction.guild).respect_hierarchy() is True: - await interaction.response.send_message( - content=error("You cannot moderate members with a higher role than you!"), + if ctx.author.top_role <= target.top_role and await config.guild(ctx.guild).respect_hierarchy() is True: + await ctx.send( + content=error( + "You cannot moderate members with a higher role than you!" + ), ephemeral=True, ) return False - if interaction.guild.get_member(interaction.client.user.id).top_role <= target.top_role: - await interaction.response.send_message( - content=error("You cannot moderate members with a role higher than the bot!"), + if target.guild_permissions.administrator: + await ctx.send( + content="You cannot moderate members with the Administrator permission!", ephemeral=True + ) + return False + + if ( + ctx.guild.get_member(ctx.bot.user.id).top_role + <= target.top_role + ): + await ctx.send( + content=error( + "You cannot moderate members with a role higher than the bot!" + ), ephemeral=True, ) return False @@ -82,7 +116,7 @@ async def check_moddable(target: Union[User, Member], interaction: Interaction, for role in target.roles: if role.id in immune_roles: - await interaction.response.send_message( + await ctx.send( content=error("You cannot moderate members with an immune role!"), ephemeral=True, ) @@ -91,140 +125,56 @@ async def check_moddable(target: Union[User, Member], interaction: Interaction, return True -async def get_next_case_number(guild_id: str, cursor=None) -> int: - """This function returns the next case number from the MySQL table for a specific guild.""" - from .database import connect - - if not cursor: - database = connect() - cursor = database.cursor() - cursor.execute(f"SELECT moderation_id FROM `moderation_{guild_id}` ORDER BY moderation_id DESC LIMIT 1") - result = cursor.fetchone() - return (result[0] + 1) if result else 1 - - -def generate_dict(result) -> dict: - return { - "moderation_id": result[0], - "timestamp": result[1], - "moderation_type": result[2], - "target_type": result[3], - "target_id": result[4], - "moderator_id": result[5], - "role_id": result[6], - "duration": result[7], - "end_timestamp": result[8], - "reason": result[9], - "resolved": result[10], - "resolved_by": result[11], - "resolve_reason": result[12], - "expired": result[13], - "changes": json.loads(result[14]), - "metadata": json.loads(result[15]), - } - - -async def fetch_user_dict(client: commands.Bot, user_id: str) -> dict: - """This function returns a dictionary containing either user information or a standard deleted user template.""" - if user_id == "?": - user_dict = {"id": "?", "name": "Unknown User", "discriminator": "0"} - - else: - try: - user = client.get_user(int(user_id)) - if user is None: - user = await client.fetch_user(int(user_id)) - - user_dict = { - "id": user.id, - "name": user.name, - "discriminator": user.discriminator, - } - - except NotFound: - user_dict = { - "id": user_id, - "name": "Deleted User", - "discriminator": "0", - } - - return user_dict - - -async def fetch_channel_dict(guild: Guild, channel_id: int) -> dict: - """This function returns a dictionary containing either channel information or a standard deleted channel template.""" - try: - channel = guild.get_channel(int(channel_id)) - if not channel: - channel = await guild.fetch_channel(channel_id) - - channel_dict = { - "id": channel.id, - "name": channel.name, - "mention": channel.mention, - } - - except NotFound: - channel_dict = {"id": channel_id, "name": "Deleted Channel", "mention": None} - - return channel_dict - - -async def fetch_role_dict(guild: Guild, role_id: int) -> dict: - """This function returns a dictionary containing either role information or a standard deleted role template.""" - role = guild.get_role(int(role_id)) - if not role: - pass - - return {"id": role.id, "name": role.name} - - -async def log(interaction: Interaction, moderation_id: int, resolved: bool = False) -> None: +async def log(ctx: commands.Context, moderation_id: int, resolved: bool = False) -> None: """This function sends a message to the guild's configured logging channel when an infraction takes place.""" - from .database import fetch_case + from ..models.moderation import Moderation from .factory import log_factory - logging_channel_id = await config.guild(interaction.guild).log_channel() + logging_channel_id = await config.guild(ctx.guild).log_channel() if logging_channel_id != " ": - logging_channel = interaction.guild.get_channel(logging_channel_id) + logging_channel = ctx.guild.get_channel(logging_channel_id) - case = await fetch_case(moderation_id, interaction.guild.id) - if case: - embed = await log_factory(interaction=interaction, case_dict=case, resolved=resolved) + try: + moderation = await Moderation.find_by_id(ctx.bot, moderation_id, ctx.guild.id) + embed = await log_factory( + ctx=ctx, moderation=moderation, resolved=resolved + ) try: await logging_channel.send(embed=embed) except Forbidden: return + except ValueError: + return -async def send_evidenceformat(interaction: Interaction, case_dict: dict) -> None: +async def send_evidenceformat(ctx: commands.Context, moderation_id: int) -> None: """This function sends an ephemeral message to the moderator who took the moderation action, with a pre-made codeblock for use in the mod-evidence channel.""" + from ..models.moderation import Moderation from .factory import evidenceformat_factory - send_evidence_bool = await config.user(interaction.user).auto_evidenceformat() or await config.guild(interaction.guild).auto_evidenceformat() or False - if send_evidence_bool is False: - return - - content = await evidenceformat_factory(interaction=interaction, case_dict=case_dict) - await interaction.followup.send(content=content, ephemeral=True) - - -def convert_timedelta_to_str(timedelta: td) -> str: - """This function converts a timedelta object to a string.""" - total_seconds = int(timedelta.total_seconds()) - hours = total_seconds // 3600 - minutes = (total_seconds % 3600) // 60 - seconds = total_seconds % 60 - return f"{hours}:{minutes}:{seconds}" + send_evidence_bool = ( + await config.user(ctx.author).auto_evidenceformat() + or await config.guild(guild=ctx.guild).auto_evidenceformat() + or False + ) + if send_evidence_bool is True: + moderation = await Moderation.find_by_id(ctx.bot, moderation_id, ctx.guild.id) + content = await evidenceformat_factory(moderation=moderation) + if not ctx.interaction: + await ctx.author.send(content=content) + else: + await ctx.send(content=content, ephemeral=True) def get_bool_emoji(value: Optional[bool]) -> str: """Returns a unicode emoji based on a boolean value.""" - if value is True: - return "\N{WHITE HEAVY CHECK MARK}" - if value is False: - return "\N{NO ENTRY SIGN}" - return "\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16}" + match value: + case True: + return "\N{WHITE HEAVY CHECK MARK}" + case False: + return "\N{NO ENTRY SIGN}" + case _: + return "\N{BLACK QUESTION MARK ORNAMENT}\N{VARIATION SELECTOR-16}" def get_pagesize_str(value: Union[int, None]) -> str: @@ -242,20 +192,103 @@ def create_pagesize_options() -> list[SelectOption]: label="Default", value="default", description="Reset the pagesize to the default value.", - ), + ) ) - options.extend(SelectOption(label=str(i), value=str(i), description=f"Set the pagesize to {i}") for i in range(1, 21)) + for i in range(1, 21): + options.append( + SelectOption( + label=str(i), + value=str(i), + description=f"Set the pagesize to {i}.", + ) + ) return options - -def timedelta_from_relativedelta(relativedelta: rd) -> td: +def timedelta_from_relativedelta(relativedelta: rd) -> timedelta: """Converts a relativedelta object to a timedelta object.""" now = datetime.now() then = now - relativedelta return now - then +def timedelta_from_string(string: str) -> timedelta: + """Converts a string to a timedelta object.""" + hours, minutes, seconds = map(int, string.split(":")) + return timedelta(hours=hours, minutes=minutes, seconds=seconds) + +def timedelta_to_string(td: timedelta) -> str: + """Converts a timedelta object to a string.""" + days = td.days * 24 + hours, remainder = divmod(td.seconds, 3600) + minutes, seconds = divmod(remainder, 60) + return f"{days + hours}:{minutes:02}:{seconds:02}" def get_footer_image(coginstance: commands.Cog) -> File: """Returns the footer image for the embeds.""" image_path = data_manager.bundled_data_path(coginstance) / "arrow.png" return File(image_path, filename="arrow.png", description="arrow") + +async def create_guild_table(guild: Guild) -> None: + from ..models.moderation import Moderation + + try: + await Moderation.execute(f"SELECT * FROM `moderation_{guild.id}`", return_obj=False) + logger.trace("SQLite Table exists for server %s (%s)", guild.name, guild.id) + + except aiosqlite.OperationalError: + query = f""" + CREATE TABLE `moderation_{guild.id}` ( + moderation_id INTEGER PRIMARY KEY NOT NULL, + timestamp INTEGER NOT NULL, + moderation_type TEXT NOT NULL, + target_type TEXT NOT NULL, + target_id INTEGER NOT NULL, + moderator_id INTEGER NOT NULL, + role_id INTEGER, + duration TEXT, + end_timestamp INTEGER, + reason TEXT, + resolved INTEGER NOT NULL, + resolved_by TEXT, + resolve_reason TEXT, + expired INTEGER NOT NULL, + changes JSON NOT NULL, + metadata JSON NOT NULL + ) + """ + await Moderation.execute(query=query, return_obj=False) + + index_query_1 = f"CREATE INDEX IF NOT EXISTS idx_target_id ON moderation_{guild.id}(target_id);" + await Moderation.execute(query=index_query_1, return_obj=False) + + index_query_2 = f"CREATE INDEX IF NOT EXISTS idx_moderator_id ON moderation_{guild.id}(moderator_id);" + await Moderation.execute(query=index_query_2, return_obj=False) + + index_query_3 = f"CREATE INDEX IF NOT EXISTS idx_moderation_id ON moderation_{guild.id}(moderation_id);" + await Moderation.execute(query=index_query_3, return_obj=False) + + insert_query = f""" + INSERT INTO `moderation_{guild.id}` + (moderation_id, timestamp, moderation_type, target_type, target_id, moderator_id, role_id, duration, end_timestamp, reason, resolved, resolved_by, resolve_reason, expired, changes, metadata) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + """ + insert_values = ( + 0, + 0, + "NULL", + "NULL", + 0, + 0, + None, + None, + None, + None, + 0, + None, + None, + 0, + dumps([]), + dumps({}), + ) + await Moderation.execute(query=insert_query, parameters=insert_values, return_obj=False) + + logger.trace("SQLite Table created for server %s (%s)", guild.name, guild.id) diff --git a/backup/backup.py b/backup/backup.py index 5133b43..dfc5397 100644 --- a/backup/backup.py +++ b/backup/backup.py @@ -17,16 +17,13 @@ from redbot.core.bot import Red from redbot.core.utils.chat_formatting import bold, error, humanize_list, text_to_file -# Disable Ruff & Pylint complaining about accessing private members -# That's kind of necessary for this cog to function because the Downloader cog has a limited public API -# ruff: noqa: SLF001 # Private member access # pylint: disable=protected-access class Backup(commands.Cog): """A utility to make reinstalling repositories and cogs after migrating the bot far easier.""" __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.1.4" + __version__ = "1.1.1" __documentation__ = "https://seacogs.coastalcommits.com/backup/" def __init__(self, bot: Red): @@ -45,18 +42,22 @@ class Backup(commands.Cog): ] return "\n".join(text) - @commands.group(autohelp=True) # type: ignore + @commands.group(autohelp=True) @commands.is_owner() - async def backup(self, ctx: commands.Context) -> None: + async def backup(self, ctx: commands.Context): """Backup your installed cogs.""" @backup.command(name="export") @commands.is_owner() - async def backup_export(self, ctx: commands.Context) -> None: + async def backup_export(self, ctx: commands.Context): """Export your installed repositories and cogs to a file.""" downloader = ctx.bot.get_cog("Downloader") if downloader is None: - await ctx.send(error(f"You do not have the `Downloader` cog loaded. Please run `{ctx.prefix}load downloader` and try again.")) + await ctx.send( + error( + f"You do not have the `Downloader` cog loaded. Please run `{ctx.prefix}load downloader` and try again." + ) + ) return all_repos = list(downloader._repo_manager.repos) @@ -77,7 +78,7 @@ class Backup(commands.Cog): if cog.repo_name == repo.name: cog_dict = { "name": cog.name, - # "loaded": cog.name in ctx.bot.extensions.keys(), # noqa: ERA001 + # "loaded": cog.name in ctx.bot.extensions.keys(), # this functionality was planned but never implemented due to Red limitations # and the possibility of restoration functionality being added to Core "pinned": cog.pinned, @@ -87,24 +88,30 @@ class Backup(commands.Cog): export_data.append(repo_dict) - await ctx.send(file=text_to_file(json.dumps(export_data, indent=4), "backup.json")) + await ctx.send( + file=text_to_file(json.dumps(export_data, indent=4), "backup.json") + ) @backup.command(name="import") @commands.is_owner() - async def backup_import(self, ctx: commands.Context) -> None: + async def backup_import(self, ctx: commands.Context): """Import your installed repositories and cogs from an export file.""" try: export = json.loads(await ctx.message.attachments[0].read()) except (json.JSONDecodeError, IndexError): try: - export = json.loads(await ctx.message.reference.resolved.attachments[0].read()) # type: ignore - this is fine to let error because it gets handled + export = json.loads(await ctx.message.reference.resolved.attachments[0].read()) except (json.JSONDecodeError, IndexError, AttributeError): await ctx.send(error("Please provide a valid JSON export file.")) return downloader = ctx.bot.get_cog("Downloader") if downloader is None: - await ctx.send(error(f"You do not have the `Downloader` cog loaded. Please run `{ctx.prefix}load downloader` and try again.")) + await ctx.send( + error( + f"You do not have the `Downloader` cog loaded. Please run `{ctx.prefix}load downloader` and try again." + ) + ) return repo_s = [] @@ -126,20 +133,32 @@ class Backup(commands.Cog): repo_e.append("PyLav cogs are not supported.") continue if name.startswith(".") or name.endswith("."): - repo_e.append(f"Invalid repository name: {name}\nRepository names cannot start or end with a dot.") + repo_e.append( + f"Invalid repository name: {name}\nRepository names cannot start or end with a dot." + ) continue if re.match(r"^[a-zA-Z0-9_\-\.]+$", name) is None: - repo_e.append(f"Invalid repository name: {name}\nRepository names may only contain letters, numbers, underscores, hyphens, and dots.") + repo_e.append( + f"Invalid repository name: {name}\nRepository names may only contain letters, numbers, underscores, hyphens, and dots." + ) continue try: - repository = await downloader._repo_manager.add_repo(url, name, branch) - repo_s.append(f"Added repository {name} from {url} on branch {branch}.") - self.logger.debug("Added repository %s from %s on branch %s", name, url, branch) + repository = await downloader._repo_manager.add_repo( + url, name, branch + ) + repo_s.append( + f"Added repository {name} from {url} on branch {branch}." + ) + self.logger.debug( + "Added repository %s from %s on branch %s", name, url, branch + ) except errors.ExistingGitRepo: repo_e.append(f"Repository {name} already exists.") - repository = downloader._repo_manager.get_repo(name) + repository = downloader._repo_manager.get_repo( + name + ) self.logger.debug("Repository %s already exists", name) except errors.AuthenticationError as err: @@ -153,7 +172,9 @@ class Backup(commands.Cog): continue except errors.CloningError as err: - repo_e.append(f"Cloning error while adding repository {name}. See logs for more information.") + repo_e.append( + f"Cloning error while adding repository {name}. See logs for more information." + ) self.logger.exception( "Something went wrong whilst cloning %s (to revision %s)", url, @@ -163,7 +184,9 @@ class Backup(commands.Cog): continue except OSError: - repo_e.append(f"OS error while adding repository {name}. See logs for more information.") + repo_e.append( + f"OS error while adding repository {name}. See logs for more information." + ) self.logger.exception( "Something went wrong trying to add repo %s under name %s", url, @@ -183,19 +206,23 @@ class Backup(commands.Cog): continue cog_modules.append(cog_module) - for cog in {cog.name for cog in cog_modules}: + for cog in set(cog.name for cog in cog_modules): poss_installed_path = (await downloader.cog_install_path()) / cog if poss_installed_path.exists(): with contextlib.suppress(commands.ExtensionNotLoaded): await ctx.bot.unload_extension(cog) await ctx.bot.remove_loaded_package(cog) - await downloader._delete_cog(poss_installed_path) + await downloader._delete_cog( + poss_installed_path + ) uninstall_s.append(f"Uninstalled {cog}") self.logger.debug("Uninstalled %s", cog) else: uninstall_e.append(f"Failed to uninstall {cog}") self.logger.warning("Failed to uninstall %s", cog) - await downloader._remove_from_installed(cog_modules) + await downloader._remove_from_installed( + cog_modules + ) for cog in cogs: cog_name = cog["name"] @@ -209,15 +236,25 @@ class Backup(commands.Cog): if cog_name == "backup" and "cswimr/SeaCogs" in url: continue - async with repository.checkout(commit, exit_to_rev=repository.branch): - cogs_c, message = await downloader._filter_incorrect_cogs_by_names(repository, [cog_name]) + async with repository.checkout( + commit, exit_to_rev=repository.branch + ): + cogs_c, message = ( + await downloader._filter_incorrect_cogs_by_names( + repository, [cog_name] + ) + ) if not cogs_c: install_e.append(message) self.logger.error(message) continue - failed_reqs = await downloader._install_requirements(cogs_c) + failed_reqs = await downloader._install_requirements( + cogs_c + ) if failed_reqs: - install_e.append(f"Failed to install {cog_name} due to missing requirements: {failed_reqs}") + install_e.append( + f"Failed to install {cog_name} due to missing requirements: {failed_reqs}" + ) self.logger.error( "Failed to install %s due to missing requirements: %s", cog_name, @@ -225,37 +262,51 @@ class Backup(commands.Cog): ) continue - installed_cogs, failed_cogs = await downloader._install_cogs(cogs_c) + installed_cogs, failed_cogs = await downloader._install_cogs( + cogs_c + ) if repository.available_libraries: - installed_libs, failed_libs = await repository.install_libraries( - target_dir=downloader.SHAREDLIB_PATH, - req_target_dir=downloader.LIB_PATH, + installed_libs, failed_libs = ( + await repository.install_libraries( + target_dir=downloader.SHAREDLIB_PATH, + req_target_dir=downloader.LIB_PATH, + ) ) else: installed_libs = None failed_libs = None if cog_pinned: - for cog in installed_cogs: # noqa: PLW2901 + for cog in installed_cogs: cog.pinned = True - await downloader._save_to_installed(installed_cogs + installed_libs if installed_libs else installed_cogs) + await downloader._save_to_installed( + installed_cogs + installed_libs + if installed_libs + else installed_cogs + ) if installed_cogs: installed_cog_name = installed_cogs[0].name install_s.append(f"Installed {installed_cog_name}") self.logger.debug("Installed %s", installed_cog_name) if installed_libs: for lib in installed_libs: - install_s.append(f"Installed {lib.name} required for {cog_name}") - self.logger.debug("Installed %s required for %s", lib.name, cog_name) + install_s.append( + f"Installed {lib.name} required for {cog_name}" + ) + self.logger.debug( + "Installed %s required for %s", lib.name, cog_name + ) if failed_cogs: failed_cog_name = failed_cogs[0].name install_e.append(f"Failed to install {failed_cog_name}") self.logger.error("Failed to install %s", failed_cog_name) if failed_libs: for lib in failed_libs: - install_e.append(f"Failed to install {lib.name} required for {cog_name}") + install_e.append( + f"Failed to install {lib.name} required for {cog_name}" + ) self.logger.error( "Failed to install %s required for %s", lib.name, diff --git a/backup/info.json b/backup/info.json index a5bd8a5..2e465b0 100644 --- a/backup/info.json +++ b/backup/info.json @@ -1,22 +1,15 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": [ - "cswimr" - ], - "install_msg": "Thank you for installing Backup!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", - "name": "Backup", - "short": "A utility to make reinstalling repositories and cogs after migrating the bot far easier.", - "description": "A utility to make reinstalling repositories and cogs after migrating the bot far easier.", - "end_user_data_statement": "This cog does not store end user data.", + "author" : ["cswimr"], + "install_msg" : "Thank you for installing Backup!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", + "name" : "Backup", + "short" : "A utility to make reinstalling repositories and cogs after migrating the bot far easier.", + "description" : "A utility to make reinstalling repositories and cogs after migrating the bot far easier.", + "end_user_data_statement" : "This cog does not store end user data.", "hidden": false, "disabled": false, "min_bot_version": "3.5.6", - "max_bot_version": "3.5.17", - "min_python_version": [ - 3, - 9, - 0 - ], + "max_bot_version": "3.5.13", + "min_python_version": [3, 9, 0], "tags": [ "utility", "backup", diff --git a/bible/bible.py b/bible/bible.py index cd95566..0cfdb3c 100644 --- a/bible/bible.py +++ b/bible/bible.py @@ -6,7 +6,6 @@ # |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_| import random -from asyncio import create_task from io import BytesIO import aiohttp @@ -27,21 +26,20 @@ class Bible(commands.Cog): __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.1.4" + __version__ = "1.1.1" __documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/" def __init__(self, bot: Red): super().__init__() self.bot = bot self.session = aiohttp.ClientSession() - self.config = Config.get_conf(self, identifier=481923957134912, force_registration=True) + self.config = Config.get_conf( + self, identifier=481923957134912, force_registration=True + ) self.logger = getLogger("red.SeaCogs.Bible") self.config.register_global(bible="de4e12af7f28f599-02") self.config.register_user(bible=None) - async def cog_unload(self): - create_task(self.session.close()) - def format_help_for_context(self, ctx: commands.Context) -> str: pre_processed = super().format_help_for_context(ctx) or "" n = "\n" if "\n\n" not in pre_processed else "" @@ -53,13 +51,14 @@ class Bible(commands.Cog): ] return "\n".join(text) + def get_icon(self, color: Colour) -> File: """Get the docs.api.bible favicon with a given color.""" image_path = data_manager.bundled_data_path(self) / "api.bible-logo.png" image = Image.open(image_path) image = image.convert("RGBA") data = np.array(image) - red, green, blue, alpha = data.T # pylint: disable=unused-variable + red, green, blue, alpha = data.T # pylint: disable=unused-variable white_areas = (red == 255) & (blue == 255) & (green == 255) data[..., :-1][white_areas.T] = color.to_rgb() image = Image.fromarray(data) @@ -71,7 +70,9 @@ class Bible(commands.Cog): async def translate_book_name(self, bible_id: str, book_name: str) -> str: """Translate a book name to a book ID.""" - book_name_list = [w.lower() if w.lower() == "of" else w.title() for w in book_name.split()] + book_name_list = [ + w.lower() if w.lower() == "of" else w.title() for w in book_name.split() + ] book_name = " ".join(book_name_list) books = await self._get_books(bible_id) for book in books: @@ -91,20 +92,20 @@ class Bible(commands.Cog): response.status, ) if response.status == 401: - raise bible.errors.UnauthorizedError + raise bible.errors.Unauthorized() if response.status == 403: - raise bible.errors.BibleAccessError + raise bible.errors.BibleAccessError() if response.status == 503: - raise bible.errors.ServiceUnavailableError + raise bible.errors.ServiceUnavailable() return Version( - bible_id=bible_id, - abbreviation=data["data"]["abbreviation"], - language=data["data"]["language"]["name"], - abbreviation_local=data["data"]["abbreviationLocal"], - language_local=data["data"]["language"]["nameLocal"], - description=data["data"]["description"], - description_local=data["data"]["descriptionLocal"], - version_copyright=data["data"]["copyright"], + bible_id, + data["data"]["abbreviation"], + data["data"]["language"]["name"], + data["data"]["abbreviationLocal"], + data["data"]["language"]["nameLocal"], + data["data"]["description"], + data["data"]["descriptionLocal"], + data["data"]["copyright"], ) async def _get_passage( @@ -135,17 +136,16 @@ class Bible(commands.Cog): response.status, ) if response.status == 400: - raise bible.errors.InexplicableError + raise bible.errors.InexplicableError() if response.status == 401: - raise bible.errors.UnauthorizedError + raise bible.errors.Unauthorized() if response.status == 403: - raise bible.errors.BibleAccessError + raise bible.errors.BibleAccessError() if response.status == 404: - raise bible.errors.NotFoundError + raise bible.errors.NotFound() if response.status == 503: - raise bible.errors.ServiceUnavailableError + raise bible.errors.ServiceUnavailable() - assert self.bot.user is not None # bot will always be logged in fums_url = "https://fums.api.bible/f3" fums_params = { "t": data["meta"]["fumsToken"], @@ -177,11 +177,11 @@ class Bible(commands.Cog): response.status, ) if response.status == 401: - raise bible.errors.UnauthorizedError + raise bible.errors.Unauthorized() if response.status == 403: - raise bible.errors.BibleAccessError + raise bible.errors.BibleAccessError() if response.status == 503: - raise bible.errors.ServiceUnavailableError + raise bible.errors.ServiceUnavailable() return data["data"] async def _get_chapters(self, bible_id: str, book_id: str) -> dict: @@ -196,11 +196,11 @@ class Bible(commands.Cog): response.status, ) if response.status == 401: - raise bible.errors.UnauthorizedError + raise bible.errors.Unauthorized() if response.status == 403: - raise bible.errors.BibleAccessError + raise bible.errors.BibleAccessError() if response.status == 503: - raise bible.errors.ServiceUnavailableError + raise bible.errors.ServiceUnavailable() return data["data"] async def _get_verses(self, bible_id: str, book_id: str, chapter: int) -> dict: @@ -215,11 +215,11 @@ class Bible(commands.Cog): response.status, ) if response.status == 401: - raise bible.errors.UnauthorizedError + raise bible.errors.Unauthorized() if response.status == 403: - raise bible.errors.BibleAccessError + raise bible.errors.BibleAccessError() if response.status == 503: - raise bible.errors.ServiceUnavailableError + raise bible.errors.ServiceUnavailable() return data["data"] @commands.group(autohelp=True) @@ -247,34 +247,41 @@ class Bible(commands.Cog): from_verse, to_verse = passage.replace(":", ".").split("-") if "." not in to_verse: to_verse = f"{from_verse.split('.')[0]}.{to_verse}" - retrieved_passage = await self._get_passage(ctx, bible_id, f"{book_id}.{from_verse}-{book_id}.{to_verse}", True) + passage = await self._get_passage( + ctx, bible_id, f"{book_id}.{from_verse}-{book_id}.{to_verse}", True + ) else: - retrieved_passage = await self._get_passage(ctx, bible_id, f"{book_id}.{passage.replace(':', '.')}", False) + passage = await self._get_passage( + ctx, bible_id, f"{book_id}.{passage.replace(':', '.')}", False + ) except ( bible.errors.BibleAccessError, - bible.errors.NotFoundError, + bible.errors.NotFound, bible.errors.InexplicableError, - bible.errors.ServiceUnavailableError, - bible.errors.UnauthorizedError, + bible.errors.ServiceUnavailable, + bible.errors.Unauthorized, ) as e: await ctx.send(e.message) return - if len(retrieved_passage["content"]) > 4096: + if len(passage["content"]) > 4096: await ctx.send("The passage is too long to send.") return if await ctx.embed_requested(): icon = self.get_icon(await ctx.embed_color()) embed = Embed( - title=f"{retrieved_passage['reference']}", - description=retrieved_passage["content"].replace("¶ ", ""), + title=f"{passage['reference']}", + description=passage["content"].replace("¶ ", ""), color=await ctx.embed_color(), ) - embed.set_footer(text=f"{ctx.prefix}bible passage - Powered by API.Bible - {version.abbreviation_local} ({version.language_local}, {version.description_local})", icon_url="attachment://icon.png") + embed.set_footer( + text=f"{ctx.prefix}bible passage - Powered by API.Bible - {version.abbreviationLocal} ({version.languageLocal}, {version.descriptionLocal})", + icon_url="attachment://icon.png" + ) await ctx.send(embed=embed, file=icon) else: - await ctx.send(f"## {retrieved_passage['reference']}\n{retrieved_passage['content']}") + await ctx.send(f"## {passage['reference']}\n{passage['content']}") @bible.command(name="random") async def bible_random(self, ctx: commands.Context): @@ -295,10 +302,10 @@ class Bible(commands.Cog): passage = await self._get_passage(ctx, bible_id, verse, False) except ( bible.errors.BibleAccessError, - bible.errors.NotFoundError, + bible.errors.NotFound, bible.errors.InexplicableError, - bible.errors.ServiceUnavailableError, - bible.errors.UnauthorizedError, + bible.errors.ServiceUnavailable, + bible.errors.Unauthorized, ) as e: await ctx.send(e.message) return @@ -310,7 +317,10 @@ class Bible(commands.Cog): description=passage["content"].replace("¶ ", ""), color=await ctx.embed_color(), ) - embed.set_footer(text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviation_local} ({version.language_local}, {version.description_local})", icon_url="attachment://icon.png") + embed.set_footer( + text=f"{ctx.prefix}bible random - Powered by API.Bible - {version.abbreviationLocal} ({version.languageLocal}, {version.descriptionLocal})", + icon_url="attachment://icon.png" + ) await ctx.send(embed=embed, file=icon) else: await ctx.send(f"## {passage['reference']}\n{passage['content']}") diff --git a/bible/errors.py b/bible/errors.py index 954e92d..4b6bb1c 100644 --- a/bible/errors.py +++ b/bible/errors.py @@ -4,22 +4,26 @@ from redbot.core.utils.chat_formatting import error class BibleAccessError(Exception): def __init__( self, - message: str = error("The provided API key cannot retrieve sections from the configured Bible. Please report this to the bot owner."), + message: str = error( + "The provided API key cannot retrieve sections from the configured Bible. Please report this to the bot owner." + ), ): super().__init__(message) self.message = message -class UnauthorizedError(Exception): +class Unauthorized(Exception): def __init__( self, - message: str = error("The API key for API.Bible is missing or invalid. Please report this to the bot owner.\nIf you are the bot owner, please check the documentation [here]()."), + message: str = error( + "The API key for API.Bible is missing or invalid. Please report this to the bot owner.\nIf you are the bot owner, please check the documentation [here]()." + ), ): super().__init__(message) self.message = message -class NotFoundError(Exception): +class NotFound(Exception): def __init__( self, message: str = error("The requested passage was not found."), @@ -28,7 +32,7 @@ class NotFoundError(Exception): self.message = message -class ServiceUnavailableError(Exception): +class ServiceUnavailable(Exception): def __init__( self, message: str = error("The API.Bible service is currently unavailable."), @@ -40,7 +44,9 @@ class ServiceUnavailableError(Exception): class InexplicableError(Exception): def __init__( self, - message: str = error("An inexplicable 'Bad Request' error occurred. This error happens occasionally with the API.Bible service. Please try again. If the error persists, please report this to the bot owner."), + message: str = error( + "An inexplicable 'Bad Request' error occurred. This error happens occassionally with the API.Bible service. Please try again. If the error persists, please report this to the bot owner." + ), ): super().__init__(message) self.message = message diff --git a/bible/info.json b/bible/info.json index 79ae088..b2da6d1 100644 --- a/bible/info.json +++ b/bible/info.json @@ -1,15 +1,18 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thank you for installing Bible!\nThis cog requires setting an API key for API.Bible. Please read the [documentation](https://seacogs.coastalcommits.com/bible/#setup) for more information.\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", - "name": "Bible", - "short": "Retrieve Bible verses from API.Bible.", - "description": "Retrieve Bible verses from the API.Bible API. This cog requires an API.Bible api key.", - "end_user_data_statement": "This cog does not store end user data, however it does send the following data to the API.Bible API:\n- The bot user's ID\n- The timestamp of the invoking message\n- The hashed user id of the invoking user", + "author" : ["cswimr"], + "install_msg" : "Thank you for installing Bible!\nThis cog requires setting an API key for API.Bible. Please read the [documentation](https://seacogs.coastalcommits.com/bible/#setup) for more information.\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", + "name" : "Bible", + "short" : "Retrieve Bible verses from API.Bible.", + "description" : "Retrieve Bible verses from the API.Bible API. This cog requires an API.Bible api key.", + "end_user_data_statement" : "This cog does not store end user data, however it does send the following data to the API.Bible API:\n- The bot user's ID\n- The timestamp of the invoking message\n- The hashed user id of the invoking user", "hidden": false, "disabled": false, "min_bot_version": "3.5.0", "min_python_version": [3, 10, 0], "requirements": ["numpy", "pillow"], - "tags": ["fun", "utility", "api"] + "tags": [ + "fun", + "utility", + "api" + ] } diff --git a/bible/models.py b/bible/models.py index b8e3b09..97500be 100644 --- a/bible/models.py +++ b/bible/models.py @@ -4,23 +4,23 @@ class Version: bible_id, abbreviation, language, - abbreviation_local, - language_local, + abbreviationLocal, + languageLocal, description, - description_local, + descriptionLocal, version_copyright, ): self.bible_id = bible_id self.abbreviation = abbreviation self.language = language - self.abbreviation_local = abbreviation_local - self.language_local = language_local + self.abbreviationLocal = abbreviationLocal + self.languageLocal = languageLocal self.description = description - self.description_local = description_local + self.descriptionLocal = descriptionLocal self.copyright = version_copyright def __str__(self): - return self.abbreviation_local + return self.abbreviationLocal def __repr__(self): - return f'bible.models.Version("{self.bible_id}", "{self.abbreviation}", "{self.language}", "{self.abbreviation_local}", "{self.language_local}", "{self.description}", "{self.description_local}", "{self.copyright}")' + return f'bible.models.Version("{self.bible_id}", "{self.abbreviation}", "{self.language}", "{self.abbreviationLocal}", "{self.languageLocal}", "{self.description}", "{self.descriptionLocal}", "{self.copyright}")' diff --git a/emojiinfo/emojiinfo.py b/emojiinfo/emojiinfo.py index 96b533d..3dd8188 100644 --- a/emojiinfo/emojiinfo.py +++ b/emojiinfo/emojiinfo.py @@ -16,13 +16,13 @@ class EmojiInfo(commands.Cog): __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.0.3" + __version__ = "1.0.1" __documentation__ = "https://seacogs.coastalcommits.com/emojiinfo/" def __init__(self, bot: Red) -> None: super().__init__() self.bot: Red = bot - self.logger: RedTraceLogger = getLogger(name="red.SeaCogs.EmojiInfo") + self.logger: RedTraceLogger = getLogger(name="red.SeaCogs.Emoji") def format_help_for_context(self, ctx: commands.Context) -> str: pre_processed = super().format_help_for_context(ctx) or "" @@ -35,12 +35,14 @@ class EmojiInfo(commands.Cog): ] return "\n".join(text) + async def fetch_twemoji(self, unicode_emoji) -> str: base_url = "https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/72x72/" emoji_codepoint = "-".join([hex(ord(char))[2:] for char in unicode_emoji]) segments = emoji_codepoint.split("-") valid_segments = [seg for seg in segments if len(seg) >= 4] - return f"{base_url}{valid_segments[0]}.png" + emoji_url = f"{base_url}{valid_segments[0]}.png" + return emoji_url async def fetch_primary_color(self, emoji_url: str) -> discord.Color | None: async with aiohttp.ClientSession() as session: @@ -49,7 +51,8 @@ class EmojiInfo(commands.Cog): return None image = await response.read() dominant_color = ColorThief(io.BytesIO(image)).get_color(quality=1) - return discord.Color.from_rgb(*dominant_color) + color = discord.Color.from_rgb(*dominant_color) + return color async def get_emoji_info(self, emoji: PartialEmoji) -> tuple[str, str]: if emoji.is_unicode_emoji(): @@ -69,51 +72,59 @@ class EmojiInfo(commands.Cog): else: emoji_id = "" markdown = f"`{emoji}`" - name = f"{bold('Name:')} {emoji.aliases.pop(0) if emoji.aliases else emoji.name}\n" + name = f"{bold('Name:')} {emoji.aliases.pop(0)}\n" aliases = f"{bold('Aliases:')} {', '.join(emoji.aliases)}\n" if emoji.aliases else "" group = f"{bold('Group:')} {emoji.group}\n" - return (f"{name}{emoji_id}{bold('Native:')} {emoji.is_unicode_emoji()}\n{group}{aliases}{bold('Animated:')} {emoji.animated}\n{bold('Markdown:')} {markdown}\n{bold('URL:')} [Click Here]({emoji_url})"), emoji_url + return ( + f"{name}" + f"{emoji_id}" + f"{bold('Native:')} {emoji.is_unicode_emoji()}\n" + f"{group}" + f"{aliases}" + f"{bold('Animated:')} {emoji.animated}\n" + f"{bold('Markdown:')} {markdown}\n" + f"{bold('URL:')} [Click Here]({emoji_url})" + ), emoji_url @app_commands.command(name="emoji") - @app_commands.describe(emoji="What emoji would you like to get information on?", ephemeral="Would you like the response to be hidden?") + @app_commands.describe( + emoji="What emoji would you like to get information on?", + ephemeral="Would you like the response to be hidden?" + ) async def emoji_slash(self, interaction: discord.Interaction, emoji: str, ephemeral: bool = True) -> None: """Retrieve information about an emoji.""" await interaction.response.defer(ephemeral=ephemeral) try: - retrieved_emoji: PartialEmoji = PartialEmoji.from_str(self, value=emoji) - string, emoji_url = await self.get_emoji_info(retrieved_emoji) + emoji: PartialEmoji = PartialEmoji.from_str(self, value=emoji) + string, emoji_url, = await self.get_emoji_info(emoji) self.logger.verbose(f"Emoji:\n{string}") except (IndexError, UnboundLocalError): return await interaction.followup.send("Please provide a valid emoji!") - assert isinstance(interaction.channel, discord.TextChannel) if await self.bot.embed_requested(channel=interaction.channel): - embed = discord.Embed(title="Emoji Information", description=string, color=await self.fetch_primary_color(emoji_url) or await self.bot.get_embed_color(interaction.channel)) + embed = embed = discord.Embed(title="Emoji Information", description=string, color = await self.fetch_primary_color(emoji_url) or await self.bot.get_embed_color(interaction.channel)) embed.set_thumbnail(url=emoji_url) await interaction.followup.send(embed=embed) - return None - await interaction.followup.send(content=string) - return None + else: + await interaction.followup.send(content=string) @commands.command(name="emoji") async def emoji(self, ctx: commands.Context, *, emoji: str) -> None: """Retrieve information about an emoji.""" try: - retrieved_emoji: PartialEmoji = PartialEmoji.from_str(self, value=emoji) - string, emoji_url = await self.get_emoji_info(retrieved_emoji) + emoji: PartialEmoji = PartialEmoji.from_str(self, value=emoji) + string, emoji_url, = await self.get_emoji_info(emoji) self.logger.verbose(f"Emoji:\n{string}") except (IndexError, UnboundLocalError): - await ctx.send("Please provide a valid emoji!") - return + return await ctx.send("Please provide a valid emoji!") if await ctx.embed_requested(): - embed = discord.Embed(title="Emoji Information", description=string, color=await self.fetch_primary_color(emoji_url) or await ctx.embed_color()) + embed = embed = discord.Embed(title="Emoji Information", description=string, color = await self.fetch_primary_color(emoji_url) or await ctx.embed_color) embed.set_thumbnail(url=emoji_url) await ctx.send(embed=embed) - return - await ctx.send(content=string) - return + else: + await ctx.send(content=string) diff --git a/emojiinfo/info.json b/emojiinfo/info.json index ccc32c7..68a8de1 100644 --- a/emojiinfo/info.json +++ b/emojiinfo/info.json @@ -1,15 +1,16 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thank you for installing Emoji!", - "name": "Emoji", - "short": "Retrieve information about emojis.", - "description": "Retrieve information about emojis.", - "end_user_data_statement": "This cog does not store end user data.", + "author" : ["cswimr"], + "install_msg" : "Thank you for installing Emoji!", + "name" : "Emoji", + "short" : "Retrieve information about emojis.", + "description" : "Retrieve information about emojis.", + "end_user_data_statement" : "This cog does not store end user data.", "hidden": false, "disabled": false, "min_bot_version": "3.5.0", "min_python_version": [3, 10, 0], "requirements": ["colorthief"], - "tags": ["utility"] + "tags": [ + "utility" + ] } diff --git a/emojiinfo/model.py b/emojiinfo/model.py index c553950..cc8a468 100644 --- a/emojiinfo/model.py +++ b/emojiinfo/model.py @@ -39,7 +39,7 @@ class PartialEmoji(discord.PartialEmoji): The group name of the emoji if it is a native emoji. """ - def __init__(self, *, name: str, animated: bool = False, id: int | None = None, group: str | None = None, aliases: list | None = None) -> None: # pylint: disable=redefined-builtin # noqa: A002 + def __init__(self, *, name: str, animated: bool = False, id: int | None = None, group: str | None = None, aliases: list | None = None) -> None: # pylint: disable=redefined-builtin super().__init__(name=name, animated=animated, id=id) self.group = group self.aliases = aliases @@ -72,12 +72,12 @@ class PartialEmoji(discord.PartialEmoji): match = cls._CUSTOM_EMOJI_RE.match(value) if match is not None: groups = match.groupdict() - animated = bool(groups["animated"]) - emoji_id = int(groups["id"]) - name = groups["name"] + animated = bool(groups['animated']) + emoji_id = int(groups['id']) + name = groups['name'] return cls(name=name, animated=animated, id=emoji_id) - path = data_manager.bundled_data_path(coginstance) / "emojis.json" + path: data_manager.Path = data_manager.bundled_data_path(coginstance) / "emojis.json" with open(path, "r", encoding="UTF-8") as file: emojis: dict = json.load(file) emoji_aliases = [] diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 363c464..0000000 --- a/flake.lock +++ /dev/null @@ -1,25 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1738680400, - "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", - "rev": "799ba5bffed04ced7067a91798353d360788b30d", - "revCount": 747653, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.747653%2Brev-799ba5bffed04ced7067a91798353d360788b30d/0194d302-29da-7009-8f43-5b8a58825954/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 819e209..0000000 --- a/flake.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - description = "SeaCogs Nix Flake"; - inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; - - outputs = - { self, nixpkgs }: - let - supportedSystems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - forEachSupportedSystem = - f: - nixpkgs.lib.genAttrs supportedSystems ( - system: - f { - pkgs = import nixpkgs { inherit system; }; - lib = nixpkgs.lib; - } - ); - in - { - devShells = forEachSupportedSystem ( - { pkgs, lib }: - let - myPython = pkgs.python311; - lib-path = - with pkgs; - lib.makeLibraryPath [ - stdenv.cc.cc - # Red-DiscordBot dependencies - libffi - libsodium - # PyLav dependency - libaio - # Material for MkDocs dependency - cairo - ]; - in - { - default = pkgs.mkShell { - lib-path = lib-path; - packages = with pkgs; [ - myPython - uv - ruff # the ruff pip package installs a dynamically linked binary that cannot run on NixOS - forgejo-runner - # Red-DiscordBot dependencies - git - jdk17 - # Material for MkDocs dependencies - pngquant - # SeaCogs dependencies - dig - ]; - shellHook = # bash - '' - export "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib-path}" - export "UV_PYTHON_PREFERENCE=only-system" - export "UV_PYTHON_DOWNLOADS=never" - uv sync --all-groups - source ./.venv/bin/activate - export "PYTHONPATH=`pwd`/.venv/${myPython.sitePackages}/:$PYTHONPATH" - export "PATH=${pkgs.ruff}/bin:$PATH" - ''; - }; - } - ); - }; -} diff --git a/hotreload/__init__.py b/hotreload/__init__.py deleted file mode 100644 index 7140931..0000000 --- a/hotreload/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .hotreload import HotReload - - -async def setup(bot): - await bot.add_cog(HotReload(bot)) diff --git a/hotreload/hotreload.py b/hotreload/hotreload.py deleted file mode 100644 index 7eed202..0000000 --- a/hotreload/hotreload.py +++ /dev/null @@ -1,192 +0,0 @@ -import py_compile -from asyncio import run_coroutine_threadsafe -from pathlib import Path -from tempfile import NamedTemporaryFile -from typing import Generator, List, Sequence - -import discord -from red_commons.logging import RedTraceLogger, getLogger -from redbot.core import Config, checks, commands -from redbot.core.bot import Red -from redbot.core.core_commands import CoreLogic -from redbot.core.utils.chat_formatting import bold, box, humanize_list -from typing_extensions import override -from watchdog.events import FileSystemEvent, FileSystemMovedEvent, RegexMatchingEventHandler -from watchdog.observers import Observer -from watchdog.observers.api import BaseObserver - - -class HotReload(commands.Cog): - """Automatically reload cogs in local cog paths on file change.""" - - __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] - __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.4.2" - __documentation__ = "https://seacogs.coastalcommits.com/hotreload/" - - def __init__(self, bot: Red) -> None: - super().__init__() - self.bot: Red = bot - self.config: Config = Config.get_conf(cog_instance=self, identifier=294518358420750336, force_registration=True) - self.logger: RedTraceLogger = getLogger(name="red.SeaCogs.HotReload") - self.observers: List[BaseObserver] = [] - self.config.register_global(notify_channel=None, compile_before_reload=False) - watchdog_loggers = [getLogger(name="watchdog.observers.inotify_buffer")] - for watchdog_logger in watchdog_loggers: - watchdog_logger.setLevel("INFO") # SHUT UP!!!! - - @override - async def cog_load(self) -> None: - """Start the observer when the cog is loaded.""" - _ = self.bot.loop.create_task(self.start_observer()) - - @override - async def cog_unload(self) -> None: - """Stop the observer when the cog is unloaded.""" - for observer in self.observers: - observer.stop() - observer.join() - self.logger.info("Stopped observer. No longer watching for file changes.") - - @override - def format_help_for_context(self, ctx: commands.Context) -> str: - pre_processed = super().format_help_for_context(ctx) or "" - n = "\n" if "\n\n" not in pre_processed else "" - text = [ - f"{pre_processed}{n}", - f"{bold('Cog Version:')} [{self.__version__}]({self.__git__})", - f"{bold('Author:')} {humanize_list(self.__author__)}", - f"{bold('Documentation:')} {self.__documentation__}", - ] - return "\n".join(text) - - # pylint: disable=protected-access - async def get_paths(self) -> Generator[Path, None, None]: - """Retrieve user defined paths.""" - cog_manager = self.bot._cog_mgr # noqa: SLF001 # We have to use this private method because there is no public API to get user defined paths - cog_paths = await cog_manager.user_defined_paths() - return (Path(path) for path in cog_paths) - - async def start_observer(self) -> None: - """Start the observer to watch for file changes.""" - self.observers.append(Observer()) - paths = await self.get_paths() - is_first = True - for observer in self.observers: - if not is_first: - observer.stop() - observer.join() - self.logger.debug("Stopped hanging observer.") - continue - for path in paths: - if not path.exists(): - self.logger.warning("Path %s does not exist. Skipping.", path) - continue - self.logger.debug("Adding observer schedule for path %s.", path) - observer.schedule(event_handler=HotReloadHandler(cog=self, path=path), path=str(path), recursive=True) - observer.start() - self.logger.info("Started observer. Watching for file changes.") - is_first = False - - @checks.is_owner() - @commands.group(name="hotreload") - async def hotreload_group(self, ctx: commands.Context) -> None: - """HotReload configuration commands.""" - - @hotreload_group.command(name="notifychannel") - async def hotreload_notifychannel(self, ctx: commands.Context, channel: discord.TextChannel) -> None: - """Set the channel to send notifications to.""" - await self.config.notify_channel.set(channel.id) - await ctx.send(f"Notifications will be sent to {channel.mention}.") - - @hotreload_group.command(name="compile") # type: ignore - async def hotreload_compile(self, ctx: commands.Context, compile_before_reload: bool) -> None: - """Set whether to compile modified files before reloading.""" - await self.config.compile_before_reload.set(compile_before_reload) - await ctx.send(f"I {'will' if compile_before_reload else 'will not'} compile modified files before hotreloading cogs.") - - @hotreload_group.command(name="list") # type: ignore - async def hotreload_list(self, ctx: commands.Context) -> None: - """List the currently active observers.""" - if not self.observers: - await ctx.send("No observers are currently active.") - return - await ctx.send(f"Currently active observers (If there are more than one of these, report an issue): {box(humanize_list([str(o) for o in self.observers], style='unit'))}") - - -class HotReloadHandler(RegexMatchingEventHandler): - """Handler for file changes.""" - - def __init__(self, cog: HotReload, path: Path) -> None: - super().__init__(regexes=[r".*\.py$"]) - self.cog: HotReload = cog - self.path: Path = path - self.logger: RedTraceLogger = getLogger(name="red.SeaCogs.HotReload.Observer") - - def on_any_event(self, event: FileSystemEvent) -> None: - """Handle filesystem events.""" - if event.is_directory: - return - - allowed_events = ("moved", "deleted", "created", "modified") - if event.event_type not in allowed_events: - return - - relative_src_path = Path(str(event.src_path)).relative_to(self.path) - src_package_name = relative_src_path.parts[0] - cogs_to_reload = [src_package_name] - - if isinstance(event, FileSystemMovedEvent): - dest = f" to {event.dest_path}" - relative_dest_path = Path(str(event.dest_path)).relative_to(self.path) - dest_package_name = relative_dest_path.parts[0] - if dest_package_name != src_package_name: - cogs_to_reload.append(dest_package_name) - else: - dest = "" - - self.logger.info("File %s has been %s%s.", event.src_path, event.event_type, dest) - - run_coroutine_threadsafe( - coro=self.reload_cogs( - cog_names=cogs_to_reload, - paths=[Path(str(p)) for p in (event.src_path, getattr(event, "dest_path", None)) if p], - ), - loop=self.cog.bot.loop, - ) - - # pylint: disable=protected-access - async def reload_cogs(self, cog_names: Sequence[str], paths: Sequence[Path]) -> None: - """Reload modified cogs.""" - if not self.compile_modified_files(cog_names, paths): - return - - core_logic = CoreLogic(bot=self.cog.bot) - self.logger.info("Reloading cogs: %s", humanize_list(cog_names, style="unit")) - await core_logic._reload(pkg_names=cog_names) # noqa: SLF001 # We have to use this private method because there is no public API to reload other cogs - self.logger.info("Reloaded cogs: %s", humanize_list(cog_names, style="unit")) - - channel = self.cog.bot.get_channel(await self.cog.config.notify_channel()) - if channel and isinstance(channel, discord.TextChannel): - await channel.send(f"Reloaded cogs: {humanize_list(cog_names, style='unit')}") - - def compile_modified_files(self, cog_names: Sequence[str], paths: Sequence[Path]) -> bool: - """Compile modified files to ensure they are valid Python files.""" - for path in paths: - if not path.exists() or path.suffix != ".py": - self.logger.debug("Path %s does not exist or does not point to a Python file. Skipping compilation step.", path) - continue - - try: - with NamedTemporaryFile() as temp_file: - self.logger.debug("Attempting to compile %s", path) - py_compile.compile(file=str(path), cfile=temp_file.name, doraise=True) - self.logger.debug("Successfully compiled %s", path) - - except py_compile.PyCompileError as e: - e.__suppress_context__ = True - self.logger.exception("%s failed to compile. Not reloading cogs %s.", path, humanize_list(cog_names, style="unit")) - return False - except OSError: - self.logger.exception("Failed to create tempfile for compilation step. Skipping.") - return True diff --git a/hotreload/info.json b/hotreload/info.json deleted file mode 100644 index 4669078..0000000 --- a/hotreload/info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thank you for installing HotReload! Please see the [documentation](https://seacogs.coastalcommits.com/hotreload) to get started.", - "name": "HotReload", - "short": "Automatically reload cogs in local cog paths on file change.", - "description": "Automatically reload cogs in local cog paths on file change.", - "end_user_data_statement": "This cog does not store end user data.", - "hidden": false, - "disabled": false, - "min_bot_version": "3.5.0", - "min_python_version": [3, 8, 0], - "requirements": ["watchdog"], - "tags": ["utility", "development"] -} diff --git a/info.json b/info.json index 08ba1dc..c679a52 100644 --- a/info.json +++ b/info.json @@ -1,8 +1,9 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thanks for installing my repo!\n\nIf you have any issues with any of the cogs, please create an issue [here](https://coastalcommits.com/cswimr/SeaCogs/issues) or join my [Discord Server](https://discord.gg/eMUMe77Yb8 ).", - "index_name": "sea-cogs", - "short": "Various cogs for Red, by cswimr", - "description": "Various cogs for Red, by cswimr" + "author": [ + "cswimr" + ], + "install_msg": "Thanks for installing my repo!\n\nIf you have any issues with any of the cogs, please create an issue [here](https://coastalcommits.com/cswimr/SeaCogs/issues) or join my [Discord Server](https://discord.gg/eMUMe77Yb8 ).", + "index_name": "sea-cogs", + "short": "Various cogs for Red, by cswimr", + "description": "Various cogs for Red, by cswimr" } diff --git a/mkdocs.yml b/mkdocs.yml index 81ab9ed..9d61aee 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,8 @@ site_name: SeaCogs Documentation -site_url: !ENV [SITE_URL, "https://seacogs.coastalcommits.com"] +site_url: !ENV [SITE_URL, 'https://seacogs.coastalcommits.com'] repo_name: CoastalCommits repo_url: https://coastalcommits.com/cswimr/SeaCogs -edit_uri: !ENV [EDIT_URI, "src/branch/main/.docs"] +edit_uri: !ENV [EDIT_URI, 'src/branch/main/.docs'] copyright: Copyright © 2023-2024, cswimr docs_dir: .docs @@ -12,21 +12,20 @@ site_description: Documentation for my Red-DiscordBot Cogs. nav: - Home: index.md - Aurora: - - aurora/index.md - - Moderation Commands: aurora/moderation-commands.md - - Case Commands: aurora/case-commands.md - - Configuration: aurora/configuration.md + - aurora/index.md + - Moderation Commands: aurora/moderation-commands.md + - Case Commands: aurora/case-commands.md + - Configuration: aurora/configuration.md - Bible: bible.md - Backup: backup.md - EmojiInfo: emojiinfo.md - - HotReload: hotreload.md - Nerdify: nerdify.md - Pterodactyl: - - pterodactyl/index.md - - Installing Red: pterodactyl/installing-red.md - - Getting Started: pterodactyl/getting-started.md - - Configuration: pterodactyl/configuration.md - - Regex Examples: pterodactyl/regex.md + - pterodactyl/index.md + - Installing Red: pterodactyl/installing-red.md + - Getting Started: pterodactyl/getting-started.md + - Configuration: pterodactyl/configuration.md + - Regex Examples: pterodactyl/regex.md plugins: - git-authors @@ -73,7 +72,7 @@ markdown_extensions: theme: name: material palette: - - media: "(prefers-color-scheme: light)" + - media: '(prefers-color-scheme: light)' scheme: default primary: white accent: light blue @@ -81,7 +80,7 @@ theme: icon: material/toggle-switch name: Switch to dark mode - - media: "(prefers-color-scheme: dark)" + - media: '(prefers-color-scheme: dark)' scheme: slate primary: black accent: light blue diff --git a/nerdify/info.json b/nerdify/info.json index eeb0ef7..1d06223 100644 --- a/nerdify/info.json +++ b/nerdify/info.json @@ -1,14 +1,17 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thank you for installing Nerdify!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs). Based off of PhasecoreX's [UwU]() cog.", - "name": "Nerdify", - "short": "Nerdify your text!", - "description": "Nerdify your text!", - "end_user_data_statement": "This cog does not store end user data.", + "author" : ["cswimr"], + "install_msg" : "Thank you for installing Nerdify!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs). Based off of PhasecoreX's [UwU]() cog.", + "name" : "Nerdify", + "short" : "Nerdify your text!", + "description" : "Nerdify your text!", + "end_user_data_statement" : "This cog does not store end user data.", "hidden": false, "disabled": false, "min_bot_version": "3.5.0", "min_python_version": [3, 8, 0], - "tags": ["fun", "text", "meme"] + "tags": [ + "fun", + "text", + "meme" + ] } diff --git a/nerdify/nerdify.py b/nerdify/nerdify.py index fb9b784..f5e92b5 100644 --- a/nerdify/nerdify.py +++ b/nerdify/nerdify.py @@ -37,20 +37,16 @@ class Nerdify(commands.Cog): ] return "\n".join(text) + @commands.command(aliases=["nerd"]) async def nerdify( - self, - ctx: commands.Context, - *, - text: Optional[str] = None, + self, ctx: commands.Context, *, text: Optional[str] = None ) -> None: """Nerdify the replied to message, previous message, or your own text.""" if not text: if hasattr(ctx.message, "reference") and ctx.message.reference: with suppress( - discord.Forbidden, - discord.NotFound, - discord.HTTPException, + discord.Forbidden, discord.NotFound, discord.HTTPException ): message_id = ctx.message.reference.message_id if message_id: @@ -66,9 +62,7 @@ class Nerdify(commands.Cog): ctx.channel, self.nerdify_text(text), allowed_mentions=discord.AllowedMentions( - everyone=False, - users=False, - roles=False, + everyone=False, users=False, roles=False ), ) @@ -83,10 +77,7 @@ class Nerdify(commands.Cog): return f'"{text}" 🤓' async def type_message( - self, - destination: discord.abc.Messageable, - content: str, - **kwargs: Any, + self, destination: discord.abc.Messageable, content: str, **kwargs: Any ) -> Union[discord.Message, None]: """Simulate typing and sending a message to a destination. diff --git a/pterodactyl/config.py b/pterodactyl/config.py index 800d773..28fecd8 100644 --- a/pterodactyl/config.py +++ b/pterodactyl/config.py @@ -2,29 +2,28 @@ from redbot.core import Config config: Config = Config.get_conf(None, identifier=457581387213637448123567, cog_name="Pterodactyl", force_registration=True) - def register_config(config_obj: Config) -> None: config_obj.register_global( base_url=None, server_id=None, console_channel=None, console_commands_enabled=False, - current_status="", + current_status='', chat_regex=r"^\[\d{2}:\d{2}:\d{2}\sINFO\]: (?!\[(?:Server|Rcon)\])(?:<|\[)(\w+)(?:>|\]) (.*)", server_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]:(?: \[Not Secure\])? \[(?:Server|Rcon)\] (.*)", join_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) joined the game$", leave_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) left the game$", achievement_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: (.*) has (made the advancement|completed the challenge) \[(.*)\]$", - chat_command='tellraw @a ["",{"text":".$N ","color":".$C","insertion":"<@.$I>","hoverEvent":{"action":"show_text","contents":"Shift click to mention this user inside Discord"}},{"text":"(DISCORD):","color":"blue","clickEvent":{"action":"open_url","value":".$V"},"hoverEvent":{"action":"show_text","contents":"Click to join the Discord Server"}},{"text":" .$M","color":"white"}]', # noqa: E501 - topic="Server IP: .$H\nServer Players: .$P/.$M", + chat_command='tellraw @a ["",{"text":".$N ","color":".$C","insertion":"<@.$I>","hoverEvent":{"action":"show_text","contents":"Shift click to mention this user inside Discord"}},{"text":"(DISCORD):","color":"blue","clickEvent":{"action":"open_url","value":".$V"},"hoverEvent":{"action":"show_text","contents":"Click to join the Discord Server"}},{"text":" .$M","color":"white"}]', # noqa: E501 + topic='Server IP: .$H\nServer Players: .$P/.$M', topic_hostname=None, topic_port=25565, api_endpoint="minecraft", chat_channel=None, - startup_msg="Server started!", - shutdown_msg="Server stopped!", - join_msg="Welcome to the server! 👋", - leave_msg="Goodbye! 👋", + startup_msg='Server started!', + shutdown_msg='Server stopped!', + join_msg='Welcome to the server! 👋', + leave_msg='Goodbye! 👋', mask_ip=True, invite=None, regex_blacklist={}, diff --git a/pterodactyl/info.json b/pterodactyl/info.json index d32c39c..7c4545a 100644 --- a/pterodactyl/info.json +++ b/pterodactyl/info.json @@ -1,18 +1,19 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thank you for installing Pterodactyl!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).\nDocumentation can be found [here](https://seacogs.coastalcommits.com/pterodactyl ).", - "name": "Pterodactyl", - "short": "Interface with Pterodactyl through websockets.", - "description": "Interface with Pterodactyl through websockets.", - "end_user_data_statement": "This cog does not store end user data.", + "author" : ["cswimr"], + "install_msg" : "Thank you for installing Pterodactyl!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).\nDocumentation can be found [here](https://seacogs.coastalcommits.com/pterodactyl ).", + "name" : "Pterodactyl", + "short" : "Interface with Pterodactyl through websockets.", + "description" : "Interface with Pterodactyl through websockets.", + "end_user_data_statement" : "This cog does not store end user data.", "hidden": false, "disabled": false, "min_bot_version": "3.5.0", - "min_python_version": [3, 10, 0], - "requirements": [ - "git+https://github.com/iamkubi/pydactyl@v2.0.5", - "websockets" - ], - "tags": ["pterodactyl", "minecraft", "server", "management"] + "min_python_version": [3, 8, 0], + "requirements": ["git+https://github.com/cswimr/pydactyl", "websockets"], + "tags": [ + "pterodactyl", + "minecraft", + "server", + "management" + ] } diff --git a/pterodactyl/logger.py b/pterodactyl/logger.py index 8600903..64b005f 100644 --- a/pterodactyl/logger.py +++ b/pterodactyl/logger.py @@ -1,8 +1,8 @@ from red_commons import logging from red_commons.logging import getLogger -logger = getLogger("red.SeaCogs.Pterodactyl") -websocket_logger = getLogger("red.SeaCogs.Pterodactyl.Websocket") +logger = getLogger('red.SeaCogs.Pterodactyl') +websocket_logger = getLogger('red.SeaCogs.Pterodactyl.websocket') if logger.level >= logging.VERBOSE: websocket_logger.setLevel(logging.logging.INFO) elif logger.level < logging.VERBOSE: diff --git a/pterodactyl/mcsrvstatus.py b/pterodactyl/mcsrvstatus.py index d677029..e51827a 100644 --- a/pterodactyl/mcsrvstatus.py +++ b/pterodactyl/mcsrvstatus.py @@ -2,17 +2,9 @@ import aiohttp async def get_status(host: str, port: int = 25565) -> tuple[bool, dict]: - """Get the status of a Minecraft server using the [mcsrvstat.us API](https://api.mcsrvstat.us). - - Args: - host (str): The host of the server. - port (int, optional): The port to connect to. Defaults to 25565. - - Returns: - A tuple containing a boolean and a dictionary. The boolean is True if the server is online, or False if it is offline. The dictionary contains the response from the API.""" async with aiohttp.ClientSession() as session: - async with session.get(f"https://api.mcsrvstat.us/2/{host}:{port}") as response: - response = await response.json() # noqa: PLW2901 - if response["online"]: + async with session.get(f'https://api.mcsrvstat.us/2/{host}:{port}') as response: + response = await response.json() + if response['online']: return (True, response) return (False, response) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index d500620..fc49e3f 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -1,6 +1,6 @@ import asyncio import json -from typing import AsyncIterable, Iterable, Mapping, Optional, Tuple, Union +from typing import Mapping, Optional, Tuple, Union import discord import websockets @@ -9,9 +9,8 @@ from pydactyl import PterodactylClient from redbot.core import app_commands, commands from redbot.core.app_commands import Choice from redbot.core.bot import Red -from redbot.core.utils.chat_formatting import bold, box, humanize_list +from redbot.core.utils.chat_formatting import bold, box, error, humanize_list from redbot.core.utils.views import ConfirmView -from typing_extensions import override from pterodactyl import mcsrvstatus from pterodactyl.config import config, register_config @@ -23,20 +22,19 @@ class Pterodactyl(commands.Cog): __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "2.0.9" + __version__ = "2.0.4" __documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/" def __init__(self, bot: Red): self.bot = bot self.client: Optional[PterodactylClient] = None self.task: Optional[asyncio.Task] = None - self.websocket: Optional[websockets.ClientConnection] = None + self.websocket: Optional[websockets.WebSocketClientProtocol] = None self.retry_counter: int = 0 register_config(config) - self.task = self._get_task() + self.task = self.get_task() self.update_topic.start() - @override def format_help_for_context(self, ctx: commands.Context) -> str: pre_processed = super().format_help_for_context(ctx) or "" n = "\n" if "\n\n" not in pre_processed else "" @@ -48,57 +46,47 @@ class Pterodactyl(commands.Cog): ] return "\n".join(text) - @override async def cog_load(self) -> None: pterodactyl_keys = await self.bot.get_shared_api_tokens("pterodactyl") api_key = pterodactyl_keys.get("api_key") if api_key is None: - self.maybe_cancel_task() - logger.error("Pterodactyl API key not set. Please set it using `[p]set api`.") - return + self.task.cancel() + raise ValueError("Pterodactyl API key not set. Please set it using `[p]set api`.") base_url = await config.base_url() if base_url is None: - self.maybe_cancel_task() - logger.error("Pterodactyl base URL not set. Please set it using `[p]pterodactyl config url`.") - return + self.task.cancel() + raise ValueError("Pterodactyl base URL not set. Please set it using `[p]pterodactyl config url`.") server_id = await config.server_id() if server_id is None: - self.maybe_cancel_task() - logger.error("Pterodactyl server ID not set. Please set it using `[p]pterodactyl config serverid`.") - return + self.task.cancel() + raise ValueError("Pterodactyl server ID not set. Please set it using `[p]pterodactyl config serverid`.") self.client = PterodactylClient(base_url, api_key).client - @override async def cog_unload(self) -> None: self.update_topic.cancel() - self.maybe_cancel_task() + self.task.cancel() + self.retry_counter = 0 + await self.client._session.close() # pylint: disable=protected-access - def maybe_cancel_task(self, reset_retry_counter: bool = True) -> None: - if self.task: - self.task.cancel() - if reset_retry_counter: - self.retry_counter = 0 - - def _get_task(self) -> asyncio.Task: + def get_task(self) -> asyncio.Task: from pterodactyl.websocket import establish_websocket_connection - task = self.bot.loop.create_task(establish_websocket_connection(self), name="Pterodactyl Websocket Connection") - task.add_done_callback(self._error_callback) + task.add_done_callback(self.error_callback) return task - def _error_callback(self, fut) -> None: # NOTE Thanks flame442 and zephyrkul for helping me figure this out + def error_callback(self, fut) -> None: #NOTE - Thanks flame442 and zephyrkul for helping me figure this out try: fut.result() except asyncio.CancelledError: logger.info("WebSocket task has been cancelled.") - except Exception as e: # pylint: disable=broad-exception-caught + except Exception as e: # pylint: disable=broad-exception-caught logger.error("WebSocket task has failed: %s", e, exc_info=e) - self.maybe_cancel_task(reset_retry_counter=False) + self.task.cancel() if self.retry_counter < 5: self.retry_counter += 1 logger.info("Retrying in %s seconds...", 5 * self.retry_counter) - self.task = self.bot.loop.call_later(5 * self.retry_counter, self._get_task) + self.task = self.bot.loop.call_later(5 * self.retry_counter, self.get_task) else: logger.info("Retry limit reached. Stopping task.") @@ -109,9 +97,9 @@ class Pterodactyl(commands.Cog): console = self.bot.get_channel(await config.console_channel()) chat = self.bot.get_channel(await config.chat_channel()) if console: - await console.edit(topic=topic) # type: ignore + await console.edit(topic=topic) if chat: - await chat.edit(topic=topic) # type: ignore + await chat.edit(topic=topic) @commands.Cog.listener() async def on_message_without_command(self, message: discord.Message) -> None: @@ -122,7 +110,13 @@ class Pterodactyl(commands.Cog): return logger.debug("Received console command from %s: %s", message.author.id, message.content) await message.channel.send(f"Received console command from {message.author.id}: {message.content[:1900]}", allowed_mentions=discord.AllowedMentions.none()) - await self._send(json.dumps({"event": "send command", "args": [message.content]})) + try: + await self.websocket.send(json.dumps({"event": "send command", "args": [message.content]})) + except websockets.exceptions.ConnectionClosed as e: + logger.error("WebSocket connection closed: %s", e) + self.task.cancel() + self.retry_counter = 0 + self.task = self.get_task() if message.channel.id == await config.chat_channel() and message.author.bot is False: logger.debug("Received chat message from %s: %s", message.author.id, message.content) channel = self.bot.get_channel(await config.console_channel()) @@ -130,22 +124,13 @@ class Pterodactyl(commands.Cog): await channel.send(f"Received chat message from {message.author.id}: {message.content[:1900]}", allowed_mentions=discord.AllowedMentions.none()) msg = json.dumps({"event": "send command", "args": [await self.get_chat_command(message)]}) logger.debug("Sending chat message to server:\n%s", msg) - await self._send(message=msg) - - async def _send(self, message: Union[websockets.Data, Iterable[websockets.Data], AsyncIterable[websockets.Data]], text: bool = False): - """Send a message through the websocket connection. Restarts the websocket connection task if it is closed, and reinvokes itself.""" - try: - await self.websocket.send(message=message, text=text) # type: ignore - we want this to error if `self.websocket` is none - except websockets.exceptions.ConnectionClosed as e: - logger.error("WebSocket connection closed: %s", e) - self.maybe_cancel_task() - self.task = self._get_task() try: - await asyncio.wait_for(fut=self.task, timeout=60) - await self._send(message=message, text=text) - except asyncio.TimeoutError: - logger.error("Timeout while waiting for websocket connection") - raise + await self.websocket.send(msg) + except websockets.exceptions.ConnectionClosed as e: + logger.error("WebSocket connection closed: %s", e) + self.task.cancel() + self.retry_counter = 0 + self.task = self.get_task() async def get_topic(self) -> str: topic: str = await config.topic() @@ -156,27 +141,23 @@ class Pterodactyl(commands.Cog): if await config.api_endpoint() == "minecraft": status, response = await mcsrvstatus.get_status(await config.topic_hostname(), await config.topic_port()) if status: - placeholders.update( - { - "I": response["ip"], - "M": str(response["players"]["max"]), - "P": str(response["players"]["online"]), - "V": response["version"], - "D": response["motd"]["clean"][0] if response["motd"]["clean"] else "unset", - }, - ) + placeholders.update({ + "I": response['ip'], + "M": str(response['players']['max']), + "P": str(response['players']['online']), + "V": response['version'], + "D": response['motd']['clean'][0] if response['motd']['clean'] else "unset", + }) else: - placeholders.update( - { - "I": response["ip"], - "M": "0", - "P": "0", - "V": "Server Offline", - "D": "Server Offline", - }, - ) + placeholders.update({ + "I": response['ip'], + "M": "0", + "P": "0", + "V": "Server Offline", + "D": "Server Offline", + }) for key, value in placeholders.items(): - topic = topic.replace(".$" + key, value) + topic = topic.replace('.$' + key, value) return topic async def get_chat_command(self, message: discord.Message) -> str: @@ -185,45 +166,42 @@ class Pterodactyl(commands.Cog): "C": str(message.author.color), "D": message.author.discriminator, "I": str(message.author.id), - "M": message.content.replace('"', "").replace("\n", " "), + "M": message.content.replace('"','').replace("\n", " "), "N": message.author.display_name, "U": message.author.name, "V": await config.invite() or "use [p]pterodactyl config invite to change me", } for key, value in placeholders.items(): - command = command.replace(".$" + key, value) + command = command.replace('.$' + key, value) return command async def get_player_list(self) -> Optional[Tuple[str, list]]: if await config.api_endpoint() == "minecraft": status, response = await mcsrvstatus.get_status(await config.topic_hostname(), await config.topic_port()) - if status and "list" in response["players"]: - output_str = "\n".join(response["players"]["list"]) - return output_str, response["players"]["list"] + if status and 'list' in response['players']: + output_str = '\n'.join(response['players']['list']) + return output_str, response['players']['list'] return None - return None async def get_player_list_embed(self, ctx: Union[commands.Context, discord.Interaction]) -> Optional[discord.Embed]: player_list = await self.get_player_list() - if player_list and isinstance(ctx.channel, discord.abc.Messageable): + if player_list: embed = discord.Embed(color=await self.bot.get_embed_color(ctx.channel), title="Players Online") embed.description = player_list[0] return embed return None - async def power(self, ctx: Union[discord.Interaction, commands.Context], action: str, action_ing: str, warning: str = "") -> None: + async def power(self, ctx: Union[discord.Interaction, commands.Context], action: str, action_ing: str, warning: str = '') -> None: if isinstance(ctx, discord.Interaction): ctx = await self.bot.get_context(ctx) current_status = await config.current_status() if current_status == action_ing: - await ctx.send(f"Server is already {action_ing}.", ephemeral=True) - return + return await ctx.send(f"Server is already {action_ing}.", ephemeral=True) if current_status in ["starting", "stopping"] and action != "kill": - await ctx.send("Another power action is already in progress.", ephemeral=True) - return + return await ctx.send("Another power action is already in progress.", ephemeral=True) view = ConfirmView(ctx.author, disable_buttons=True) @@ -234,13 +212,12 @@ class Pterodactyl(commands.Cog): if view.result is True: await message.edit(content=f"Sending websocket command to {action} server...", view=None) - await self._send(json.dumps({"event": "set state", "args": [action]})) + await self.websocket.send(json.dumps({"event": "set state", "args": [action]})) await message.edit(content=f"Server {action_ing}", view=None) - return - await message.edit(content="Cancelled.", view=None) - return + else: + await message.edit(content="Cancelled.", view=None) async def send_command(self, ctx: Union[discord.Interaction, commands.Context], command: str): channel = self.bot.get_channel(await config.console_channel()) @@ -248,19 +225,27 @@ class Pterodactyl(commands.Cog): ctx = await self.bot.get_context(ctx) if channel: await channel.send(f"Received console command from {ctx.author.id}: {command[:1900]}", allowed_mentions=discord.AllowedMentions.none()) - await self._send(json.dumps({"event": "send command", "args": [command]})) - await ctx.send(f"Command sent to server. {box(command, 'json')}") + try: + await self.websocket.send(json.dumps({"event": "send command", "args": [command]})) + await ctx.send(f"Command sent to server. {box(command, 'json')}") + except websockets.exceptions.ConnectionClosed as e: + logger.error("WebSocket connection closed: %s", e) + await ctx.send(error("WebSocket connection closed.")) + self.task.cancel() + self.retry_counter = 0 + self.task = self.get_task() @commands.Cog.listener() - async def on_red_api_tokens_update(self, service_name: str, api_tokens: Mapping[str, str]): # pylint: disable=unused-argument + async def on_red_api_tokens_update(self, service_name: str, api_tokens: Mapping[str,str]): # pylint: disable=unused-argument if service_name == "pterodactyl": logger.info("Configuration value set: api_key\nRestarting task...") - self.maybe_cancel_task(reset_retry_counter=True) - self.task = self._get_task() + self.task.cancel() + self.retry_counter = 0 + self.task = self.get_task() slash_pterodactyl = app_commands.Group(name="pterodactyl", description="Pterodactyl allows you to manage your Pterodactyl Panel from Discord.") - @slash_pterodactyl.command(name="command", description="Send a command to the server console.") + @slash_pterodactyl.command(name = "command", description = "Send a command to the server console.") async def slash_pterodactyl_command(self, interaction: discord.Interaction, command: str) -> None: """Send a command to the server console. @@ -270,7 +255,7 @@ class Pterodactyl(commands.Cog): The command to send to the server.""" return await self.send_command(interaction, command) - @slash_pterodactyl.command(name="players", description="Retrieve a list of players on the server.") + @slash_pterodactyl.command(name = "players", description = "Retrieve a list of players on the server.") async def slash_pterodactyl_players(self, interaction: discord.Interaction) -> None: """Retrieve a list of players on the server.""" e = await self.get_player_list_embed(interaction) @@ -279,8 +264,13 @@ class Pterodactyl(commands.Cog): else: await interaction.response.send_message("No players online.", ephemeral=True) - @slash_pterodactyl.command(name="power", description="Send power actions to the server.") - @app_commands.choices(action=[Choice(name="Start", value="start"), Choice(name="Stop", value="stop"), Choice(name="Restart", value="restart"), Choice(name="⚠️ Kill ⚠️", value="kill")]) + @slash_pterodactyl.command(name = "power", description = "Send power actions to the server.") + @app_commands.choices(action=[ + Choice(name="Start", value="start"), + Choice(name="Stop", value="stop"), + Choice(name="Restart", value="restart"), + Choice(name="⚠️ Kill ⚠️", value="kill") + ]) async def slash_pterodactyl_power(self, interaction: discord.Interaction, action: app_commands.Choice[str]) -> None: """Send power actions to the server. @@ -294,11 +284,11 @@ class Pterodactyl(commands.Cog): return await self.power(interaction, action.value, "stopping...") return await self.power(interaction, action.value, f"{action.value}ing...") - @commands.group(autohelp=True, name="pterodactyl", aliases=["ptero"]) + @commands.group(autohelp = True, name = "pterodactyl", aliases = ["ptero"]) async def pterodactyl(self, ctx: commands.Context) -> None: """Pterodactyl allows you to manage your Pterodactyl Panel from Discord.""" - @pterodactyl.command(name="players", aliases=["list", "online", "playerlist", "who"]) + @pterodactyl.command(name = "players", aliases=["list", "online", "playerlist", "who"]) async def pterodactyl_players(self, ctx: commands.Context) -> None: """Retrieve a list of players on the server.""" e = await self.get_player_list_embed(ctx) @@ -307,43 +297,43 @@ class Pterodactyl(commands.Cog): else: await ctx.send("No players online.") - @pterodactyl.command(name="command", aliases=["cmd", "execute", "exec"]) + @pterodactyl.command(name = "command", aliases = ["cmd", "execute", "exec"]) @commands.admin() async def pterodactyl_command(self, ctx: commands.Context, *, command: str) -> None: """Send a command to the server console.""" return await self.send_command(ctx, command) - @pterodactyl.group(autohelp=True, name="power") + @pterodactyl.group(autohelp = True, name = "power") @commands.admin() async def pterodactyl_power(self, ctx: commands.Context) -> None: """Send power actions to the server.""" - @pterodactyl_power.command(name="start") + @pterodactyl_power.command(name = "start") async def pterodactyl_power_start(self, ctx: commands.Context) -> Optional[discord.Message]: """Start the server.""" return await self.power(ctx, "start", "starting...") - @pterodactyl_power.command(name="stop") + @pterodactyl_power.command(name = "stop") async def pterodactyl_power_stop(self, ctx: commands.Context) -> Optional[discord.Message]: """Stop the server.""" return await self.power(ctx, "stop", "stopping...") - @pterodactyl_power.command(name="restart") + @pterodactyl_power.command(name = "restart") async def pterodactyl_power_restart(self, ctx: commands.Context) -> Optional[discord.Message]: """Restart the server.""" return await self.power(ctx, "restart", "restarting...") - @pterodactyl_power.command(name="kill") + @pterodactyl_power.command(name = "kill") async def pterodactyl_power_kill(self, ctx: commands.Context) -> Optional[discord.Message]: """Kill the server.""" return await self.power(ctx, "kill", "stopping... (forcefully killed)", warning="**⚠️ Forcefully killing the server process can corrupt data in some cases. ⚠️**\n") - @pterodactyl.group(autohelp=True, name="config", aliases=["settings", "set"]) + @pterodactyl.group(autohelp = True, name = "config", aliases = ["settings", "set"]) @commands.is_owner() async def pterodactyl_config(self, ctx: commands.Context) -> None: """Configure Pterodactyl settings.""" - @pterodactyl_config.command(name="url") + @pterodactyl_config.command(name = "url") async def pterodactyl_config_base_url(self, ctx: commands.Context, *, base_url: str) -> None: """Set the base URL of your Pterodactyl Panel. @@ -352,57 +342,59 @@ class Pterodactyl(commands.Cog): await config.base_url.set(base_url) await ctx.send(f"Base URL set to {base_url}") logger.info("Configuration value set: base_url = %s\nRestarting task...", base_url) - self.maybe_cancel_task(reset_retry_counter=True) - self.task = self._get_task() + self.task.cancel() + self.retry_counter = 0 + self.task = self.get_task() - @pterodactyl_config.command(name="serverid") + @pterodactyl_config.command(name = "serverid") async def pterodactyl_config_server_id(self, ctx: commands.Context, *, server_id: str) -> None: """Set the ID of your server.""" await config.server_id.set(server_id) await ctx.send(f"Server ID set to {server_id}") logger.info("Configuration value set: server_id = %s\nRestarting task...", server_id) - self.maybe_cancel_task(reset_retry_counter=True) - self.task = self._get_task() + self.task.cancel() + self.retry_counter = 0 + self.task = self.get_task() - @pterodactyl_config.group(name="console") + @pterodactyl_config.group(name = "console") async def pterodactyl_config_console(self, ctx: commands.Context): """Configure console settings.""" - @pterodactyl_config_console.command(name="channel") + @pterodactyl_config_console.command(name = "channel") async def pterodactyl_config_console_channel(self, ctx: commands.Context, channel: discord.TextChannel) -> None: """Set the channel to send console output to.""" await config.console_channel.set(channel.id) await ctx.send(f"Console channel set to {channel.mention}") - @pterodactyl_config_console.command(name="commands") + @pterodactyl_config_console.command(name = "commands") async def pterodactyl_config_console_commands(self, ctx: commands.Context, enabled: bool) -> None: """Enable or disable console commands.""" await config.console_commands_enabled.set(enabled) await ctx.send(f"Console commands set to {enabled}") - @pterodactyl_config.command(name="invite") + @pterodactyl_config.command(name = "invite") async def pterodactyl_config_invite(self, ctx: commands.Context, invite: str) -> None: """Set the invite link for your server.""" await config.invite.set(invite) await ctx.send(f"Invite link set to {invite}") - @pterodactyl_config.group(name="topic") + @pterodactyl_config.group(name = "topic") async def pterodactyl_config_topic(self, ctx: commands.Context): """Set the topic for the console and chat channels.""" - @pterodactyl_config_topic.command(name="host", aliases=["hostname", "ip"]) + @pterodactyl_config_topic.command(name = "host", aliases = ["hostname", "ip"]) async def pterodactyl_config_topic_host(self, ctx: commands.Context, host: str) -> None: """Set the hostname or IP address of your server.""" await config.topic_hostname.set(host) await ctx.send(f"Hostname/IP set to `{host}`") - @pterodactyl_config_topic.command(name="port") + @pterodactyl_config_topic.command(name = "port") async def pterodactyl_config_topic_port(self, ctx: commands.Context, port: int) -> None: """Set the port of your server.""" await config.topic_port.set(port) await ctx.send(f"Port set to `{port}`") - @pterodactyl_config_topic.command(name="text") + @pterodactyl_config_topic.command(name = "text") async def pterodactyl_config_topic_text(self, ctx: commands.Context, *, text: str) -> None: """Set the text for the console and chat channels. @@ -416,19 +408,19 @@ class Pterodactyl(commands.Cog): - `.$V` (version) - `.$D` (description / Message of the Day)""" await config.topic.set(text) - await ctx.send(f"Topic set to:\n{box(text, 'markdown')}") + await ctx.send(f"Topic set to:\n{box(text, 'yaml')}") - @pterodactyl_config.group(name="chat") + @pterodactyl_config.group(name = "chat") async def pterodactyl_config_chat(self, ctx: commands.Context): """Configure chat settings.""" - @pterodactyl_config_chat.command(name="channel") + @pterodactyl_config_chat.command(name = "channel") async def pterodactyl_config_chat_channel(self, ctx: commands.Context, channel: discord.TextChannel) -> None: """Set the channel to send chat output to.""" await config.chat_channel.set(channel.id) await ctx.send(f"Chat channel set to {channel.mention}") - @pterodactyl_config_chat.command(name="command") + @pterodactyl_config_chat.command(name = "command") async def pterodactyl_config_chat_command(self, ctx: commands.Context, *, command: str) -> None: """Set the command that will be used to send messages from Discord. @@ -437,11 +429,11 @@ class Pterodactyl(commands.Cog): await config.chat_command.set(command) await ctx.send(f"Chat command set to:\n{box(command, 'json')}") - @pterodactyl_config.group(name="regex") + @pterodactyl_config.group(name = "regex") async def pterodactyl_config_regex(self, ctx: commands.Context) -> None: """Set regex patterns.""" - @pterodactyl_config_regex.command(name="chat") + @pterodactyl_config_regex.command(name = "chat") async def pterodactyl_config_regex_chat(self, ctx: commands.Context, *, regex: str) -> None: """Set the regex pattern to match chat messages on the server. @@ -449,7 +441,7 @@ class Pterodactyl(commands.Cog): await config.chat_regex.set(regex) await ctx.send(f"Chat regex set to:\n{box(regex, 'regex')}") - @pterodactyl_config_regex.command(name="server") + @pterodactyl_config_regex.command(name = "server") async def pterodactyl_config_regex_server(self, ctx: commands.Context, *, regex: str) -> None: """Set the regex pattern to match server messages on the server. @@ -457,7 +449,7 @@ class Pterodactyl(commands.Cog): await config.server_regex.set(regex) await ctx.send(f"Server regex set to:\n{box(regex, 'regex')}") - @pterodactyl_config_regex.command(name="join") + @pterodactyl_config_regex.command(name = "join") async def pterodactyl_config_regex_join(self, ctx: commands.Context, *, regex: str) -> None: """Set the regex pattern to match join messages on the server. @@ -465,7 +457,7 @@ class Pterodactyl(commands.Cog): await config.join_regex.set(regex) await ctx.send(f"Join regex set to:\n{box(regex, 'regex')}") - @pterodactyl_config_regex.command(name="leave") + @pterodactyl_config_regex.command(name = "leave") async def pterodactyl_config_regex_leave(self, ctx: commands.Context, *, regex: str) -> None: """Set the regex pattern to match leave messages on the server. @@ -473,7 +465,7 @@ class Pterodactyl(commands.Cog): await config.leave_regex.set(regex) await ctx.send(f"Leave regex set to:\n{box(regex, 'regex')}") - @pterodactyl_config_regex.command(name="achievement") + @pterodactyl_config_regex.command(name = "achievement") async def pterodactyl_config_regex_achievement(self, ctx: commands.Context, *, regex: str) -> None: """Set the regex pattern to match achievement messages on the server. @@ -481,41 +473,41 @@ class Pterodactyl(commands.Cog): await config.achievement_regex.set(regex) await ctx.send(f"Achievement regex set to:\n{box(regex, 'regex')}") - @pterodactyl_config.group(name="messages", aliases=["msg", "msgs", "message"]) + @pterodactyl_config.group(name = "messages", aliases = ['msg', 'msgs', 'message']) async def pterodactyl_config_messages(self, ctx: commands.Context): """Configure message settings.""" - @pterodactyl_config_messages.command(name="startup") + @pterodactyl_config_messages.command(name = "startup") async def pterodactyl_config_messages_startup(self, ctx: commands.Context, *, message: str) -> None: """Set the message that will be sent when the server starts.""" await config.startup_msg.set(message) await ctx.send(f"Startup message set to: {message}") - @pterodactyl_config_messages.command(name="shutdown") + @pterodactyl_config_messages.command(name = "shutdown") async def pterodactyl_config_messages_shutdown(self, ctx: commands.Context, *, message: str) -> None: """Set the message that will be sent when the server stops.""" await config.shutdown_msg.set(message) await ctx.send(f"Shutdown message set to: {message}") - @pterodactyl_config_messages.command(name="join") + @pterodactyl_config_messages.command(name = "join") async def pterodactyl_config_messages_join(self, ctx: commands.Context, *, message: str) -> None: """Set the message that will be sent when a user joins the server. This is only shown in embeds.""" await config.join_msg.set(message) await ctx.send(f"Join message set to: {message}") - @pterodactyl_config_messages.command(name="leave") + @pterodactyl_config_messages.command(name = "leave") async def pterodactyl_config_messages_leave(self, ctx: commands.Context, *, message: str) -> None: """Set the message that will be sent when a user leaves the server. This is only shown in embeds.""" await config.leave_msg.set(message) await ctx.send(f"Leave message set to: {message}") - @pterodactyl_config.command(name="ip") + @pterodactyl_config.command(name = "ip") async def pterodactyl_config_mask_ip(self, ctx: commands.Context, mask: bool) -> None: """Mask the IP addresses of users in console messages.""" await config.mask_ip.set(mask) await ctx.send(f"IP masking set to {mask}") - @pterodactyl_config.command(name="api") + @pterodactyl_config.command(name = "api") async def pterodactyl_config_api(self, ctx: commands.Context, endpoint: str) -> None: """Set the API endpoint for retrieving user avatars. @@ -524,14 +516,11 @@ class Pterodactyl(commands.Cog): await config.api_endpoint.set(endpoint) await ctx.send(f"API endpoint set to {endpoint}") - @pterodactyl_config_regex.group( - name="blacklist", - aliases=["block", "blocklist"], - ) + @pterodactyl_config_regex.group(name = "blacklist", aliases = ['block', 'blocklist'],) async def pterodactyl_config_regex_blacklist(self, ctx: commands.Context): """Blacklist regex patterns.""" - @pterodactyl_config_regex_blacklist.command(name="add") + @pterodactyl_config_regex_blacklist.command(name = "add") async def pterodactyl_config_regex_blacklist_add(self, ctx: commands.Context, name: str, *, regex: str) -> None: """Add a regex pattern to the blacklist.""" async with config.regex_blacklist() as blacklist: @@ -549,7 +538,7 @@ class Pterodactyl(commands.Cog): else: await msg.edit(content="Cancelled.") - @pterodactyl_config_regex_blacklist.command(name="remove") + @pterodactyl_config_regex_blacklist.command(name = "remove") async def pterodactyl_config_regex_blacklist_remove(self, ctx: commands.Context, name: str) -> None: """Remove a regex pattern from the blacklist.""" async with config.regex_blacklist() as blacklist: @@ -566,7 +555,7 @@ class Pterodactyl(commands.Cog): else: await ctx.send(f"Name `{name}` does not exist in the blacklist.") - @pterodactyl_config.command(name="view", aliases=["show"]) + @pterodactyl_config.command(name = 'view', aliases = ['show']) async def pterodactyl_config_view(self, ctx: commands.Context) -> None: """View the current configuration.""" base_url = await config.base_url() @@ -591,7 +580,7 @@ class Pterodactyl(commands.Cog): topic_text = await config.topic() topic_hostname = await config.topic_hostname() topic_port = await config.topic_port() - embed = discord.Embed(color=await ctx.embed_color(), title="Pterodactyl Configuration") + embed = discord.Embed(color = await ctx.embed_color(), title="Pterodactyl Configuration") embed.description = f"""**Base URL:** {base_url} **Server ID:** `{server_id}` **Console Channel:** <#{console_channel}> @@ -607,19 +596,19 @@ class Pterodactyl(commands.Cog): **Topic Hostname:** `{topic_hostname}` **Topic Port:** `{topic_port}` - **Topic Text:** {box(topic_text, "markdown")} + **Topic Text:** {box(topic_text, 'yaml')} - **Chat Command:** {box(chat_command, "json")} - **Chat Regex:** {box(chat_regex, "regex")} - **Server Regex:** {box(server_regex, "regex")} - **Join Regex:** {box(join_regex, "regex")} - **Leave Regex:** {box(leave_regex, "regex")} - **Achievement Regex:** {box(achievement_regex, "regex")}""" + **Chat Command:** {box(chat_command, 'json')} + **Chat Regex:** {box(chat_regex, 're')} + **Server Regex:** {box(server_regex, 're')} + **Join Regex:** {box(join_regex, 're')} + **Leave Regex:** {box(leave_regex, 're')} + **Achievement Regex:** {box(achievement_regex, 're')}""" await ctx.send(embed=embed) if not len(regex_blacklist) == 0: - regex_blacklist_embed = discord.Embed(color=await ctx.embed_color(), title="Regex Blacklist") + regex_blacklist_embed = discord.Embed(color = await ctx.embed_color(), title="Regex Blacklist") for name, regex in regex_blacklist.items(): - regex_blacklist_embed.add_field(name=name, value=box(regex, "regex"), inline=False) + regex_blacklist_embed.add_field(name=name, value=box(regex, 're'), inline=False) await ctx.send(embed=regex_blacklist_embed) def get_bool_str(self, inp: bool) -> str: diff --git a/pterodactyl/websocket.py b/pterodactyl/websocket.py index 0948a1a..e5fd8db 100644 --- a/pterodactyl/websocket.py +++ b/pterodactyl/websocket.py @@ -2,14 +2,14 @@ import json import re from pathlib import Path -from typing import Any, Optional, Tuple, Union +from typing import Optional, Tuple, Union import aiohttp import discord +import websockets from pydactyl import PterodactylClient from redbot.core.data_manager import bundled_data_path from redbot.core.utils.chat_formatting import bold, pagify -from websockets.asyncio.client import connect from pterodactyl.config import config from pterodactyl.logger import logger, websocket_logger @@ -19,48 +19,46 @@ from pterodactyl.pterodactyl import Pterodactyl async def establish_websocket_connection(coginstance: Pterodactyl) -> None: await coginstance.bot.wait_until_red_ready() base_url = await config.base_url() - base_url = base_url[:-1] if base_url.endswith("/") else base_url + base_url = base_url[:-1] if base_url.endswith('/') else base_url logger.info("Establishing WebSocket connection") websocket_credentials = await retrieve_websocket_credentials(coginstance) - async with connect(websocket_credentials["data"]["socket"], origin=base_url, ping_timeout=60, logger=websocket_logger) as websocket: + async with websockets.connect(websocket_credentials['data']['socket'], origin=base_url, ping_timeout=60, logger=websocket_logger) as websocket: logger.info("WebSocket connection established") - auth_message = json.dumps({"event": "auth", "args": [websocket_credentials["data"]["token"]]}) + auth_message = json.dumps({"event": "auth", "args": [websocket_credentials['data']['token']]}) await websocket.send(auth_message) logger.info("Authentication message sent") coginstance.websocket = websocket - while True: # pylint: disable=too-many-nested-blocks + while True: # pylint: disable=too-many-nested-blocks message = json.loads(await websocket.recv()) - if message["event"] in ("token expiring", "token expired"): + if message['event'] in ('token expiring', 'token expired'): logger.info("Received token expiring/expired event. Refreshing token.") websocket_credentials = await retrieve_websocket_credentials(coginstance) - auth_message = json.dumps({"event": "auth", "args": [websocket_credentials["data"]["token"]]}) + auth_message = json.dumps({"event": "auth", "args": [websocket_credentials['data']['token']]}) await websocket.send(auth_message) logger.info("Authentication message sent") - if message["event"] == "auth success": + if message['event'] == 'auth success': logger.info("WebSocket authentication successful") - if message["event"] == "console output" and await config.console_channel() is not None: + if message['event'] == 'console output' and await config.console_channel() is not None: regex_blacklist: dict = await config.regex_blacklist() - matches = [re.search(regex, message["args"][0]) for regex in regex_blacklist.values()] + matches = [re.search(regex, message['args'][0]) for regex in regex_blacklist.values()] - if await config.current_status() in ("running", "") and not any(matches): - content = remove_ansi_escape_codes(message["args"][0]) + if await config.current_status() in ('running', '') and not any(matches): + content = remove_ansi_escape_codes(message['args'][0]) if await config.mask_ip() is True: content = mask_ip(content) console_channel = coginstance.bot.get_channel(await config.console_channel()) - assert isinstance(console_channel, discord.abc.Messageable) chat_channel = coginstance.bot.get_channel(await config.chat_channel()) - assert isinstance(chat_channel, discord.abc.Messageable) if console_channel is not None: - if content.startswith("["): + if content.startswith('['): pagified_content = pagify(content, delims=[" ", "\n"]) for page in pagified_content: await console_channel.send(content=page, allowed_mentions=discord.AllowedMentions.none()) @@ -68,24 +66,24 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None: server_message = await check_if_server_message(content) if server_message: if chat_channel is not None: - await chat_channel.send(server_message if len(server_message) < 2000 else server_message[:1997] + "...", allowed_mentions=discord.AllowedMentions.none()) + await chat_channel.send(server_message if len(server_message) < 2000 else server_message[:1997] + '...', allowed_mentions=discord.AllowedMentions.none()) chat_message = await check_if_chat_message(content) if chat_message: - info = await get_info(chat_message["username"]) + info = await get_info(chat_message['username']) if info is not None: - await send_chat_discord(coginstance, chat_message["username"], chat_message["message"], info["data"]["player"]["avatar"]) + await send_chat_discord(coginstance, chat_message['username'], chat_message['message'], info['data']['player']['avatar']) else: - await send_chat_discord(coginstance, chat_message["username"], chat_message["message"], "https://seafsh.cc/u/j3AzqQ.png") + await send_chat_discord(coginstance, chat_message['username'], chat_message['message'], 'https://seafsh.cc/u/j3AzqQ.png') join_message = await check_if_join_message(content) if join_message: if chat_channel is not None: if coginstance.bot.embed_requested(chat_channel): - embed, img = await generate_join_leave_embed(coginstance=coginstance, username=join_message, join=True) + embed, img = await generate_join_leave_embed(coginstance=coginstance, username=join_message,join=True) if img: - with open(img, "rb") as file: - await chat_channel.send(embed=embed, file=discord.File(fp=file)) + with open(img, 'rb') as file: + await chat_channel.send(embed=embed, file=file) else: await chat_channel.send(embed=embed) else: @@ -95,10 +93,10 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None: if leave_message: if chat_channel is not None: if coginstance.bot.embed_requested(chat_channel): - embed, img = await generate_join_leave_embed(coginstance=coginstance, username=leave_message, join=False) + embed, img = await generate_join_leave_embed(coginstance=coginstance, username=leave_message,join=False) if img: - with open(img, "rb") as file: - await chat_channel.send(embed=embed, file=discord.File(fp=file)) + with open(img, 'rb') as file: + await chat_channel.send(embed=embed, file=file) else: await chat_channel.send(embed=embed) else: @@ -108,17 +106,13 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None: if achievement_message: if chat_channel is not None: if coginstance.bot.embed_requested(chat_channel): - embed, img = await generate_achievement_embed(coginstance, achievement_message["username"], achievement_message["achievement"], achievement_message["challenge"]) - if img: - await chat_channel.send(embed=embed, file=discord.File(fp=img)) - else: - await chat_channel.send(embed=embed) + await chat_channel.send(embed=await generate_achievement_embed(coginstance, achievement_message['username'], achievement_message['achievement'], achievement_message['challenge'])) else: await chat_channel.send(f"{achievement_message['username']} has {'completed the challenge' if achievement_message['challenge'] else 'made the advancement'} {achievement_message['achievement']}") - if message["event"] == "status": + if message['event'] == 'status': old_status = await config.current_status() - current_status = message["args"][0] + current_status = message['args'][0] if old_status != current_status: await config.current_status.set(current_status) if await config.console_channel() is not None: @@ -126,92 +120,81 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None: if console is not None: await console.send(f"Server status changed! `{current_status}`") if await config.chat_channel() is not None: - if current_status == "running" and await config.startup_msg() is not None: + if current_status == 'running' and await config.startup_msg() is not None: chat = coginstance.bot.get_channel(await config.chat_channel()) if chat is not None: await chat.send(await config.startup_msg()) - if current_status == "stopping" and await config.shutdown_msg() is not None: + if current_status == 'stopping' and await config.shutdown_msg() is not None: chat = coginstance.bot.get_channel(await config.chat_channel()) if chat is not None: await chat.send(await config.shutdown_msg()) - -async def retrieve_websocket_credentials(coginstance: Pterodactyl) -> dict: +async def retrieve_websocket_credentials(coginstance: Pterodactyl) -> Optional[dict]: pterodactyl_keys = await coginstance.bot.get_shared_api_tokens("pterodactyl") api_key = pterodactyl_keys.get("api_key") if api_key is None: - coginstance.maybe_cancel_task() + coginstance.task.cancel() raise ValueError("Pterodactyl API key not set. Please set it using `[p]set api`.") base_url = await config.base_url() if base_url is None: - coginstance.maybe_cancel_task() + coginstance.task.cancel() raise ValueError("Pterodactyl base URL not set. Please set it using `[p]pterodactyl config url`.") server_id = await config.server_id() if server_id is None: - coginstance.maybe_cancel_task() + coginstance.task.cancel() raise ValueError("Pterodactyl server ID not set. Please set it using `[p]pterodactyl config serverid`.") client = PterodactylClient(base_url, api_key).client coginstance.client = client - websocket_credentials: dict[str, Any] = client.servers.get_websocket(server_id) - if not websocket_credentials: - coginstance.maybe_cancel_task() - raise ValueError("Failed to retrieve websocket credentials. Please ensure the API details are correctly configured.") - logger.debug( - """Websocket connection details retrieved: + websocket_credentials = client.servers.get_websocket(server_id) + logger.debug("""Websocket connection details retrieved: Socket: %s Token: %s...""", - websocket_credentials["data"]["socket"], - websocket_credentials["data"]["token"][:20], - ) + websocket_credentials['data']['socket'], + websocket_credentials['data']['token'][:20] + ) return websocket_credentials - # NOTE - The token is truncated to prevent it from being logged in its entirety, for security reasons - + #NOTE - The token is truncated to prevent it from being logged in its entirety, for security reasons def remove_ansi_escape_codes(text: str) -> str: - ansi_escape = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])") - # NOTE - https://chat.openai.com/share/d92f9acf-d776-4fd6-a53f-b14ac15dd540 - return ansi_escape.sub("", text) + ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])') + #NOTE - https://chat.openai.com/share/d92f9acf-d776-4fd6-a53f-b14ac15dd540 + return ansi_escape.sub('', text) - -async def check_if_server_message(text: str) -> Optional[str]: +async def check_if_server_message(text: str) -> Union[bool, str]: regex = await config.server_regex() match: Optional[re.Match[str]] = re.match(regex, text) if match: logger.trace("Message is a server message") return match.group(1) - return None + return False - -async def check_if_chat_message(text: str) -> Optional[dict]: +async def check_if_chat_message(text: str) -> Union[bool, dict]: regex = await config.chat_regex() match: Optional[re.Match[str]] = re.match(regex, text) if match: groups = {"username": match.group(1), "message": match.group(2)} logger.trace("Message is a chat message\n%s", json.dumps(groups)) return groups - return None + return False - -async def check_if_join_message(text: str) -> Optional[str]: +async def check_if_join_message(text: str) -> Union[bool, str]: regex = await config.join_regex() match: Optional[re.Match[str]] = re.match(regex, text) if match: logger.trace("Message is a join message") return match.group(1) - return None + return False - -async def check_if_leave_message(text: str) -> Optional[str]: +async def check_if_leave_message(text: str) -> Union[bool, str]: regex = await config.leave_regex() match: Optional[re.Match[str]] = re.match(regex, text) if match: logger.trace("Message is a leave message") return match.group(1) - return None + return False - -async def check_if_achievement_message(text: str) -> Optional[dict]: +async def check_if_achievement_message(text: str) -> Union[bool, dict]: regex = await config.achievement_regex() match: Optional[re.Match[str]] = re.match(regex, text) if match: @@ -222,8 +205,7 @@ async def check_if_achievement_message(text: str) -> Optional[dict]: groups["challenge"] = False logger.trace("Message is an achievement message") return groups - return None - + return False async def get_info(username: str) -> Optional[dict]: logger.verbose("Retrieving player info for %s", username) @@ -236,7 +218,6 @@ async def get_info(username: str) -> Optional[dict]: logger.warning("Failed to retrieve player info for %s: %s", username, response.status) return None - async def send_chat_discord(coginstance: Pterodactyl, username: str, message: str, avatar_url: str) -> None: logger.trace("Sending chat message to Discord") channel = coginstance.bot.get_channel(await config.chat_channel()) @@ -250,7 +231,6 @@ async def send_chat_discord(coginstance: Pterodactyl, username: str, message: st else: logger.warning("Chat channel not set. Skipping sending chat message to Discord") - async def generate_join_leave_embed(coginstance: Pterodactyl, username: str, join: bool) -> Tuple[discord.Embed, Optional[Union[str, Path]]]: embed = discord.Embed() embed.color = discord.Color.green() if join else discord.Color.red() @@ -258,32 +238,30 @@ async def generate_join_leave_embed(coginstance: Pterodactyl, username: str, joi info = await get_info(username) if info: img = None - embed.set_author(name=username, icon_url=info["data"]["player"]["avatar"]) + embed.set_author(name=username, icon_url=info['data']['player']['avatar']) else: img = bundled_data_path(coginstance) / "unknown.png" - embed.set_author(name=username, icon_url="attachment://unknown.png") + embed.set_author(name=username, icon_url='attachment://unknown.png') embed.timestamp = discord.utils.utcnow() return embed, img - async def generate_achievement_embed(coginstance: Pterodactyl, username: str, achievement: str, challenge: bool) -> Tuple[discord.Embed, Optional[Union[str, Path]]]: embed = discord.Embed() - embed.color = discord.Color.from_str("#a800a7") if challenge else discord.Color.from_str("#54fb54") + embed.color = discord.Color.from_str('#a800a7') if challenge else discord.Color.from_str('#54fb54') embed.description = f"{bold(username)} has {'completed the challenge' if challenge else 'made the advancement'} {bold(achievement)}" info = await get_info(username) if info: img = None - embed.set_author(name=username, icon_url=info["data"]["player"]["avatar"]) + embed.set_author(name=username, icon_url=info['data']['player']['avatar']) else: img = bundled_data_path(coginstance) / "unknown.png" - embed.set_author(name=username, icon_url="attachment://unknown.png") + embed.set_author(name=username, icon_url='attachment://unknown.png') embed.timestamp = discord.utils.utcnow() return embed, img - def mask_ip(string: str) -> str: def check(match: re.Match[str]): ip = match.group(0) - return ".".join(r"\*" * len(octet) for octet in ip.split(".")) - - return re.sub(r"\b(?:\d{1,3}\.){3}\d{1,3}\b", check, string) + masked_ip = '.'.join(r'\*' * len(octet) for octet in ip.split('.')) + return masked_ip + return re.sub(r'\b(?:\d{1,3}\.){3}\d{1,3}\b', check, string) diff --git a/pyproject.toml b/pyproject.toml index 6f3ebd0..2c40dee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,75 +2,74 @@ name = "seacogs" version = "0.1.0" description = "My assorted cogs for Red-DiscordBot." -authors = [{ name = "cswimr", email = "seaswimmerthefsh@gmail.com" }] -license = { file = "LICENSE" } +authors = [{name = "cswimr", email = "seaswimmerthefsh@gmail.com"}] +license = {file="LICENSE"} readme = "README.md" requires-python = ">=3.11" dependencies = [ - "aiosqlite==0.21.0", - "beautifulsoup4==4.13.3", - "colorthief==0.2.1", - "markdownify==1.1.0", - "numpy==2.2.4", - "phx-class-registry==5.1.1", - "pillow==10.4.0", - "pip==25.0.1", - "py-dactyl", - "pydantic==2.11.1", - "red-discordbot==3.5.18", - "watchdog==6.0.0", - "websockets==15.0.1", + "aiosqlite>=0.20.0", + "beautifulsoup4>=4.12.3", + "colorthief>=0.2.1", + "markdownify>=0.13.1", + "numpy>=2.1.2", + "phx-class-registry>=5.0.0", + "pillow>=10.4.0", + "pip>=24.3.1", + "py-dactyl", + "pydantic>=2.9.2", + "red-discordbot>=3.5.14", + "websockets>=13.1", ] -[dependency-groups] +[project.optional-dependencies] documentation = [ - "mkdocs==1.6.1", - "mkdocs-git-authors-plugin==0.9.4", - "mkdocs-git-revision-date-localized-plugin==1.4.5", - "mkdocs-material[imaging]==9.6.10", - "mkdocs-redirects==1.2.2", - "mkdocstrings[python]==0.29.0", + "mkdocs>=1.6.1", + "mkdocs-git-authors-plugin>=0.9.0", + "mkdocs-git-revision-date-localized-plugin>=1.2.9", + "mkdocs-material[imaging]>=9.5.40", + "mkdocstrings[python]>=0.26.1", + "mkdocs-redirects>=1.2.1", ] [tool.uv] -dev-dependencies = ["pylint==3.3.6", "ruff==0.11.2", "sqlite-web==0.6.4"] +dev-dependencies = [ + "pylint>=3.3.1", + "ruff>=0.6.9", + "sqlite-web>=0.6.4", +] [tool.uv.sources] -py-dactyl = { git = "https://github.com/iamkubi/pydactyl", tag = "v2.0.5" } - -[tool.basedpyright] -typeCheckingMode = "basic" -reportAttributeAccessIssue = false # disabled because `commands.group.command` is listed as Any / Unknown for some reason +py-dactyl = { git = "https://github.com/cswimr/pydactyl" } [tool.ruff] # Exclude a variety of commonly ignored directories. exclude = [ - ".bzr", - ".direnv", - ".eggs", - ".git", - ".git-rewrite", - ".hg", - ".ipynb_checkpoints", - ".mypy_cache", - ".nox", - ".pants.d", - ".pyenv", - ".pytest_cache", - ".pytype", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - ".vscode", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "site-packages", - "venv", + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".ipynb_checkpoints", + ".mypy_cache", + ".nox", + ".pants.d", + ".pyenv", + ".pytest_cache", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + ".vscode", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "site-packages", + "venv", ] # Same as Black. @@ -84,32 +83,8 @@ target-version = "py311" # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or # McCabe complexity (`C901`) by default. -select = [ - "I", - "N", - "F", - "W", - "E", - "G", - "A", - "COM", - "INP", - "T20", - "PLC", - "PLE", - "PLW", - "PLR", - "LOG", - "SLF", - "ERA", - "FIX", - "PERF", - "C4", - "EM", - "RET", - "RSE", -] -ignore = ["PLR0911", "PLR0912", "PLR0915", "PLR2004", "PLR0913", "EM101"] +select = ["F", "W", "E", "C901"] +ignore = ["C901"] # Allow fix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] diff --git a/seautils/info.json b/seautils/info.json index bdd6708..2f8fa83 100644 --- a/seautils/info.json +++ b/seautils/info.json @@ -1,11 +1,10 @@ { - "$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json", - "author": ["cswimr"], - "install_msg": "Thank you for installing SeaUtils!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", - "name": "SeaUtils", - "short": "A collection of useful utilities.", - "description": "A collection of useful utilities.", - "end_user_data_statement": "This cog does not store end user data.", + "author" : ["cswimr"], + "install_msg" : "Thank you for installing SeaUtils!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).", + "name" : "SeaUtils", + "short" : "A collection of useful utilities.", + "description" : "A collection of useful utilities.", + "end_user_data_statement" : "This cog does not store end user data.", "hidden": true, "disabled": false, "min_bot_version": "3.5.0", diff --git a/seautils/seautils.py b/seautils/seautils.py index 126ffd1..a895c35 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -29,20 +29,18 @@ from redbot.core.utils.views import SimpleMenu def md(soup: BeautifulSoup, **options) -> Any | str: return MarkdownConverter(**options).convert_soup(soup=soup) - def format_rfc_text(text: str, number: int) -> str: one: str = re.sub(r"\(\.\/rfc(\d+)", r"(https://www.rfc-editor.org/rfc/rfc\1.html", text) two: str = re.sub(r"\((#(?:section|page)-\d+(?:.\d+)?)\)", f"(https://www.rfc-editor.org/rfc/rfc{number}.html\1)", one) three: str = re.sub(r"\n{3,}", "\n\n", two) return three - class SeaUtils(commands.Cog): """A collection of random utilities.""" __author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"] __git__ = "https://www.coastalcommits.com/cswimr/SeaCogs" - __version__ = "1.0.2" + __version__ = "1.0.1" __documentation__ = "https://seacogs.coastalcommits.com/seautils/" def __init__(self, bot: Red) -> None: @@ -59,6 +57,7 @@ class SeaUtils(commands.Cog): ] return "\n".join(text) + def format_src(self, obj: Any) -> str: """A large portion of this code is repurposed from Zephyrkul's RTFS cog. https://github.com/Zephyrkul/FluffyCogs/blob/master/rtfs/rtfs.py""" @@ -74,9 +73,9 @@ class SeaUtils(commands.Cog): src = obj.function return inspect.getsource(object=src) - @commands.command(aliases=["source", "src", "code", "showsource"]) # type: ignore + @commands.command(aliases=["source", "src", "code", "showsource"]) @commands.is_owner() - async def showcode(self, ctx: commands.Context, *, object: str) -> None: # pylint: disable=redefined-builtin # noqa: A002 + async def showcode(self, ctx: commands.Context, *, object: str) -> None: # pylint: disable=redefined-builtin """Show the code for a particular object.""" try: if object.startswith("/") and (obj := ctx.bot.tree.get_command(object[1:])): @@ -87,7 +86,11 @@ class SeaUtils(commands.Cog): text = self.format_src(obj) else: raise AttributeError - temp_content = cf.pagify(text=cleanup_code(text), escape_mass_mentions=True, page_length=1977) + temp_content = cf.pagify( + text=cleanup_code(text), + escape_mass_mentions=True, + page_length = 1977 + ) content = [] max_i = operator.length_hint(temp_content) i = 1 @@ -102,7 +105,7 @@ class SeaUtils(commands.Cog): else: await ctx.send(content="Object not found!", reference=ctx.message.to_reference(fail_if_not_exists=False)) - @commands.command(name="dig", aliases=["dnslookup", "nslookup"]) # type: ignore + @commands.command(name='dig', aliases=['dnslookup', 'nslookup']) @commands.is_owner() async def dig(self, ctx: commands.Context, name: str, record_type: str | None = None, server: str | None = None, port: int = 53) -> None: """Retrieve DNS information for a domain. @@ -110,13 +113,13 @@ class SeaUtils(commands.Cog): Uses `dig` to perform a DNS query. Will fall back to `nslookup` if `dig` is not installed on the system. `nslookup` does not provide as much information as `dig`, so only the `name` parameter will be used if `nslookup` is used. Will return the A, AAAA, and CNAME records for a domain by default. You can specify a different record type with the `type` parameter.""" - command_opts: list[str] = ["dig"] - query_types: list[str] = [record_type] if record_type else ["A", "AAAA", "CNAME"] + command_opts: list[str | int] = ['dig'] + query_types: list[str] = [record_type] if record_type else ['A', 'AAAA', 'CNAME'] if server: - command_opts.extend(["@", server]) + command_opts.extend(['@', server]) for query_type in query_types: command_opts.extend([name, query_type]) - command_opts.extend(["-p", str(port), "+yaml"]) + command_opts.extend(['-p', str(port), '+yaml']) try: process: Process = await asyncio.create_subprocess_exec(*command_opts, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) @@ -125,18 +128,22 @@ class SeaUtils(commands.Cog): await ctx.maybe_send_embed(message="An error was encountered!\n" + cf.box(text=stderr.decode())) else: data = yaml.safe_load(stdout.decode()) - message_data: dict = data[0]["message"] - response_data: dict = message_data["response_message_data"] + message_data: dict = data[0]['message'] + response_data: dict = message_data['response_message_data'] if ctx.embed_requested(): - embed = Embed(title="DNS Query Result", color=await ctx.embed_color(), timestamp=message_data["response_time"]) - embed.add_field(name="Response Address", value=message_data["response_address"], inline=True) - embed.add_field(name="Response Port", value=message_data["response_port"], inline=True) - embed.add_field(name="Query Address", value=message_data["query_address"], inline=True) - embed.add_field(name="Query Port", value=message_data["query_port"], inline=True) - embed.add_field(name="Status", value=response_data["status"], inline=True) - embed.add_field(name="Flags", value=response_data["flags"], inline=True) + embed = Embed( + title="DNS Query Result", + color=await ctx.embed_color(), + timestamp=message_data['response_time'] + ) + embed.add_field(name="Response Address", value=message_data['response_address'], inline=True) + embed.add_field(name="Response Port", value=message_data['response_port'], inline=True) + embed.add_field(name="Query Address", value=message_data['query_address'], inline=True) + embed.add_field(name="Query Port", value=message_data['query_port'], inline=True) + embed.add_field(name="Status", value=response_data['status'], inline=True) + embed.add_field(name="Flags", value=response_data['flags'], inline=True) - if response_data.get("status") != "NOERROR": + if response_data.get('status') != 'NOERROR': embed.colour = Color.red() embed.description = cf.error("Dig query did not return `NOERROR` status.") @@ -144,19 +151,19 @@ class SeaUtils(commands.Cog): answers = [] authorities = [] for m in data: - response = m["message"]["response_message_data"] - if "QUESTION_SECTION" in response: - for question in response["QUESTION_SECTION"]: + response = m['message']['response_message_data'] + if 'QUESTION_SECTION' in response: + for question in response['QUESTION_SECTION']: if question not in questions: questions.append(question) - if "ANSWER_SECTION" in response: - for answer in response["ANSWER_SECTION"]: + if 'ANSWER_SECTION' in response: + for answer in response['ANSWER_SECTION']: if answer not in answers: answers.append(answer) - if "AUTHORITY_SECTION" in response: - for authority in response["AUTHORITY_SECTION"]: + if 'AUTHORITY_SECTION' in response: + for authority in response['AUTHORITY_SECTION']: if authority not in authorities: authorities.append(authority) @@ -176,22 +183,26 @@ class SeaUtils(commands.Cog): embed.add_field(name="Authority Section", value=f"{cf.box(text=authority_section, lang='prolog')}", inline=False) await ctx.send(embed=embed) else: - await ctx.send(content=cf.box(text=str(stdout), lang="yaml")) - except FileNotFoundError: + await ctx.send(content=cf.box(text=stdout, lang='yaml')) + except (FileNotFoundError): try: - ns_process = await asyncio.create_subprocess_exec("nslookup", name, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) + ns_process = await asyncio.create_subprocess_exec('nslookup', name, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) ns_stdout, ns_stderr = await ns_process.communicate() if ns_stderr: await ctx.maybe_send_embed(message="An error was encountered!\n" + cf.box(text=ns_stderr.decode())) else: warning = cf.warning("`dig` is not installed! Defaulting to `nslookup`.\nThis command provides more information when `dig` is installed on the system.\n") if await ctx.embed_requested(): - embed = Embed(title="DNS Query Result", color=await ctx.embed_color(), timestamp=ctx.message.created_at) + embed = Embed( + title="DNS Query Result", + color=await ctx.embed_color(), + timestamp=ctx.message.created_at + ) embed.description = warning + cf.box(text=ns_stdout.decode()) await ctx.send(embed=embed) else: - await ctx.send(content=warning + cf.box(text=ns_stdout.decode())) - except FileNotFoundError: + await ctx.send(content = warning + cf.box(text=ns_stdout.decode())) + except (FileNotFoundError): await ctx.maybe_send_embed(message=cf.error("Neither `dig` nor `nslookup` are installed on the system. Unable to resolve DNS query.")) @commands.command() @@ -199,34 +210,45 @@ class SeaUtils(commands.Cog): """Retrieve the text of an RFC document. This command uses the [RFC Editor website](https://www.rfc-editor.org/) to fetch the text of an RFC document. - A [Request for Comments (RFC)](https://en.wikipedia.org/wiki/Request_for_Comments) is a publication in a series from the principal technical development and standards-setting bodies for the [Internet](https://en.wikipedia.org/wiki/Internet), most prominently the [Internet Engineering Task Force](https://en.wikipedia.org/wiki/Internet_Engineering_Task_Force). An RFC is authored by individuals or groups of engineers and [computer scientists](https://en.wikipedia.org/wiki/Computer_scientist) in the form of a [memorandum](https://en.wikipedia.org/wiki/Memorandum) describing methods, behaviors, research, or innovations applicable to the working of the Internet and Internet-connected systems. It is submitted either for [peer review](https://en.wikipedia.org/wiki/Peer_review) or to convey new concepts, information, or, occasionally, engineering humor.""" # noqa: E501 + A [Request for Comments (RFC)](https://en.wikipedia.org/wiki/Request_for_Comments) is a publication in a series from the principal technical development and standards-setting bodies for the [Internet](https://en.wikipedia.org/wiki/Internet), most prominently the [Internet Engineering Task Force](https://en.wikipedia.org/wiki/Internet_Engineering_Task_Force). An RFC is authored by individuals or groups of engineers and [computer scientists](https://en.wikipedia.org/wiki/Computer_scientist) in the form of a [memorandum](https://en.wikipedia.org/wiki/Memorandum) describing methods, behaviors, research, or innovations applicable to the working of the Internet and Internet-connected systems. It is submitted either for [peer review](https://en.wikipedia.org/wiki/Peer_review) or to convey new concepts, information, or, occasionally, engineering humor.""" # noqa: E501 url = f"https://www.rfc-editor.org/rfc/rfc{number}.html" datatracker_url = f"https://datatracker.ietf.org/doc/rfc{number}" async with aiohttp.ClientSession() as session: async with session.get(url=url) as response: if response.status == 200: html = await response.text() - soup = BeautifulSoup(html, "html.parser") - pre_tags = soup.find_all("pre") - content: list[str | Embed] = [] + soup = BeautifulSoup(html, 'html.parser') + pre_tags = soup.find_all('pre') + content: list[Embed | str] = [] for pre_tag in pre_tags: text = format_rfc_text(md(pre_tag), number) if len(text) > 4096: pagified_text = cf.pagify(text, delims=["\n\n"], page_length=4096) for page in pagified_text: if await ctx.embed_requested(): - embed = Embed(title=f"RFC Document {number}", url=datatracker_url, description=page, color=await ctx.embed_color()) + embed = Embed( + title=f"RFC Document {number}", + url=datatracker_url, + description=page, + color=await ctx.embed_color() + ) content.append(embed) else: content.append(page) - elif await ctx.embed_requested(): - embed = Embed(title=f"RFC Document {number}", url=datatracker_url, description=text, color=await ctx.embed_color()) - content.append(embed) else: - content.append(text) + if await ctx.embed_requested(): + embed = Embed( + title=f"RFC Document {number}", + url=datatracker_url, + description=text, + color=await ctx.embed_color() + ) + content.append(embed) + else: + content.append(text) if await ctx.embed_requested(): for embed in content: embed.set_footer(text=f"Page {content.index(embed) + 1}/{len(content)}") - await SimpleMenu(pages=content, disable_after_timeout=True, timeout=300).start(ctx) # type: ignore + await SimpleMenu(pages=content, disable_after_timeout=True, timeout=300).start(ctx) else: await ctx.maybe_send_embed(message=cf.error(f"An error occurred while fetching RFC {number}. Status code: {response.status}.")) diff --git a/uv.lock b/uv.lock index 14654e8..9056ced 100644 --- a/uv.lock +++ b/uv.lock @@ -1,10 +1,9 @@ version = 1 -revision = 1 requires-python = ">=3.11" resolution-markers = [ - "python_full_version >= '3.13'", - "python_full_version == '3.12.*'", "python_full_version < '3.12'", + "python_full_version == '3.12.*'", + "python_full_version >= '3.13'", ] [[package]] @@ -78,14 +77,14 @@ wheels = [ [[package]] name = "aiosqlite" -version = "0.21.0" +version = "0.20.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/13/7d/8bca2bf9a247c2c5dfeec1d7a5f40db6518f88d314b8bca9da29670d2671/aiosqlite-0.21.0.tar.gz", hash = "sha256:131bb8056daa3bc875608c631c678cda73922a2d4ba8aec373b19f18c17e7aa3", size = 13454 } +sdist = { url = "https://files.pythonhosted.org/packages/0d/3a/22ff5415bf4d296c1e92b07fd746ad42c96781f13295a074d58e77747848/aiosqlite-0.20.0.tar.gz", hash = "sha256:6d35c8c256637f4672f843c31021464090805bf925385ac39473fb16eaaca3d7", size = 21691 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f5/10/6c25ed6de94c49f88a91fa5018cb4c0f3625f31d5be9f771ebe5cc7cd506/aiosqlite-0.21.0-py3-none-any.whl", hash = "sha256:2549cf4057f95f53dcba16f2b64e8e2791d7e1adedb13197dd8ed77bb226d7d0", size = 15792 }, + { url = "https://files.pythonhosted.org/packages/00/c4/c93eb22025a2de6b83263dfe3d7df2e19138e345bca6f18dba7394120930/aiosqlite-0.20.0-py3-none-any.whl", hash = "sha256:36a1deaca0cac40ebe32aac9977a6e2bbc7f5189f23f4a54d5908986729e5bd6", size = 15564 }, ] [[package]] @@ -137,11 +136,11 @@ wheels = [ [[package]] name = "astroid" -version = "3.3.9" +version = "3.3.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/39/33/536530122a22a7504b159bccaf30a1f76aa19d23028bd8b5009eb9b2efea/astroid-3.3.9.tar.gz", hash = "sha256:622cc8e3048684aa42c820d9d218978021c3c3d174fb03a9f0d615921744f550", size = 398731 } +sdist = { url = "https://files.pythonhosted.org/packages/38/1e/326fb1d3d83a3bb77c9f9be29d31f2901e35acb94b0605c3f2e5085047f9/astroid-3.3.5.tar.gz", hash = "sha256:5cfc40ae9f68311075d27ef68a4841bdc5cc7f6cf86671b49f00607d30188e2d", size = 397229 } wheels = [ - { url = "https://files.pythonhosted.org/packages/de/80/c749efbd8eef5ea77c7d6f1956e8fbfb51963b7f93ef79647afd4d9886e3/astroid-3.3.9-py3-none-any.whl", hash = "sha256:d05bfd0acba96a7bd43e222828b7d9bc1e138aaeb0649707908d3702a9831248", size = 275339 }, + { url = "https://files.pythonhosted.org/packages/41/30/624365383fa4a40329c0f0bbbc151abc4a64e30dfc110fc8f6e2afcd02bb/astroid-3.3.5-py3-none-any.whl", hash = "sha256:a9d1c946ada25098d790e079ba2a1b112157278f3fb7e718ae6a9252f5835dc8", size = 274586 }, ] [[package]] @@ -155,95 +154,41 @@ wheels = [ [[package]] name = "attrs" -version = "25.3.0" +version = "24.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b", size = 812032 } +sdist = { url = "https://files.pythonhosted.org/packages/48/c8/6260f8ccc11f0917360fc0da435c5c9c7504e3db174d5a12a1494887b045/attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff", size = 805984 } wheels = [ - { url = "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", size = 63815 }, -] - -[[package]] -name = "audioop-lts" -version = "0.2.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/dd/3b/69ff8a885e4c1c42014c2765275c4bd91fe7bc9847e9d8543dbcbb09f820/audioop_lts-0.2.1.tar.gz", hash = "sha256:e81268da0baa880431b68b1308ab7257eb33f356e57a5f9b1f915dfb13dd1387", size = 30204 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/01/91/a219253cc6e92db2ebeaf5cf8197f71d995df6f6b16091d1f3ce62cb169d/audioop_lts-0.2.1-cp313-abi3-macosx_10_13_universal2.whl", hash = "sha256:fd1345ae99e17e6910f47ce7d52673c6a1a70820d78b67de1b7abb3af29c426a", size = 46252 }, - { url = "https://files.pythonhosted.org/packages/ec/f6/3cb21e0accd9e112d27cee3b1477cd04dafe88675c54ad8b0d56226c1e0b/audioop_lts-0.2.1-cp313-abi3-macosx_10_13_x86_64.whl", hash = "sha256:e175350da05d2087e12cea8e72a70a1a8b14a17e92ed2022952a4419689ede5e", size = 27183 }, - { url = "https://files.pythonhosted.org/packages/ea/7e/f94c8a6a8b2571694375b4cf94d3e5e0f529e8e6ba280fad4d8c70621f27/audioop_lts-0.2.1-cp313-abi3-macosx_11_0_arm64.whl", hash = "sha256:4a8dd6a81770f6ecf019c4b6d659e000dc26571b273953cef7cd1d5ce2ff3ae6", size = 26726 }, - { url = "https://files.pythonhosted.org/packages/ef/f8/a0e8e7a033b03fae2b16bc5aa48100b461c4f3a8a38af56d5ad579924a3a/audioop_lts-0.2.1-cp313-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1cd3c0b6f2ca25c7d2b1c3adeecbe23e65689839ba73331ebc7d893fcda7ffe", size = 80718 }, - { url = "https://files.pythonhosted.org/packages/8f/ea/a98ebd4ed631c93b8b8f2368862cd8084d75c77a697248c24437c36a6f7e/audioop_lts-0.2.1-cp313-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff3f97b3372c97782e9c6d3d7fdbe83bce8f70de719605bd7ee1839cd1ab360a", size = 88326 }, - { url = "https://files.pythonhosted.org/packages/33/79/e97a9f9daac0982aa92db1199339bd393594d9a4196ad95ae088635a105f/audioop_lts-0.2.1-cp313-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a351af79edefc2a1bd2234bfd8b339935f389209943043913a919df4b0f13300", size = 80539 }, - { url = "https://files.pythonhosted.org/packages/b2/d3/1051d80e6f2d6f4773f90c07e73743a1e19fcd31af58ff4e8ef0375d3a80/audioop_lts-0.2.1-cp313-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2aeb6f96f7f6da80354330470b9134d81b4cf544cdd1c549f2f45fe964d28059", size = 78577 }, - { url = "https://files.pythonhosted.org/packages/7a/1d/54f4c58bae8dc8c64a75071c7e98e105ddaca35449376fcb0180f6e3c9df/audioop_lts-0.2.1-cp313-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c589f06407e8340e81962575fcffbba1e92671879a221186c3d4662de9fe804e", size = 82074 }, - { url = "https://files.pythonhosted.org/packages/36/89/2e78daa7cebbea57e72c0e1927413be4db675548a537cfba6a19040d52fa/audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fbae5d6925d7c26e712f0beda5ed69ebb40e14212c185d129b8dfbfcc335eb48", size = 84210 }, - { url = "https://files.pythonhosted.org/packages/a5/57/3ff8a74df2ec2fa6d2ae06ac86e4a27d6412dbb7d0e0d41024222744c7e0/audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_i686.whl", hash = "sha256:d2d5434717f33117f29b5691fbdf142d36573d751716249a288fbb96ba26a281", size = 85664 }, - { url = "https://files.pythonhosted.org/packages/16/01/21cc4e5878f6edbc8e54be4c108d7cb9cb6202313cfe98e4ece6064580dd/audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:f626a01c0a186b08f7ff61431c01c055961ee28769591efa8800beadd27a2959", size = 93255 }, - { url = "https://files.pythonhosted.org/packages/3e/28/7f7418c362a899ac3b0bf13b1fde2d4ffccfdeb6a859abd26f2d142a1d58/audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_s390x.whl", hash = "sha256:05da64e73837f88ee5c6217d732d2584cf638003ac72df124740460531e95e47", size = 87760 }, - { url = "https://files.pythonhosted.org/packages/6d/d8/577a8be87dc7dd2ba568895045cee7d32e81d85a7e44a29000fe02c4d9d4/audioop_lts-0.2.1-cp313-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:56b7a0a4dba8e353436f31a932f3045d108a67b5943b30f85a5563f4d8488d77", size = 84992 }, - { url = "https://files.pythonhosted.org/packages/ef/9a/4699b0c4fcf89936d2bfb5425f55f1a8b86dff4237cfcc104946c9cd9858/audioop_lts-0.2.1-cp313-abi3-win32.whl", hash = "sha256:6e899eb8874dc2413b11926b5fb3857ec0ab55222840e38016a6ba2ea9b7d5e3", size = 26059 }, - { url = "https://files.pythonhosted.org/packages/3a/1c/1f88e9c5dd4785a547ce5fd1eb83fff832c00cc0e15c04c1119b02582d06/audioop_lts-0.2.1-cp313-abi3-win_amd64.whl", hash = "sha256:64562c5c771fb0a8b6262829b9b4f37a7b886c01b4d3ecdbae1d629717db08b4", size = 30412 }, - { url = "https://files.pythonhosted.org/packages/c4/e9/c123fd29d89a6402ad261516f848437472ccc602abb59bba522af45e281b/audioop_lts-0.2.1-cp313-abi3-win_arm64.whl", hash = "sha256:c45317debeb64002e980077642afbd977773a25fa3dfd7ed0c84dccfc1fafcb0", size = 23578 }, - { url = "https://files.pythonhosted.org/packages/7a/99/bb664a99561fd4266687e5cb8965e6ec31ba4ff7002c3fce3dc5ef2709db/audioop_lts-0.2.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:3827e3fce6fee4d69d96a3d00cd2ab07f3c0d844cb1e44e26f719b34a5b15455", size = 46827 }, - { url = "https://files.pythonhosted.org/packages/c4/e3/f664171e867e0768ab982715e744430cf323f1282eb2e11ebfb6ee4c4551/audioop_lts-0.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:161249db9343b3c9780ca92c0be0d1ccbfecdbccac6844f3d0d44b9c4a00a17f", size = 27479 }, - { url = "https://files.pythonhosted.org/packages/a6/0d/2a79231ff54eb20e83b47e7610462ad6a2bea4e113fae5aa91c6547e7764/audioop_lts-0.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5b7b4ff9de7a44e0ad2618afdc2ac920b91f4a6d3509520ee65339d4acde5abf", size = 27056 }, - { url = "https://files.pythonhosted.org/packages/86/46/342471398283bb0634f5a6df947806a423ba74b2e29e250c7ec0e3720e4f/audioop_lts-0.2.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:72e37f416adb43b0ced93419de0122b42753ee74e87070777b53c5d2241e7fab", size = 87802 }, - { url = "https://files.pythonhosted.org/packages/56/44/7a85b08d4ed55517634ff19ddfbd0af05bf8bfd39a204e4445cd0e6f0cc9/audioop_lts-0.2.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:534ce808e6bab6adb65548723c8cbe189a3379245db89b9d555c4210b4aaa9b6", size = 95016 }, - { url = "https://files.pythonhosted.org/packages/a8/2a/45edbca97ea9ee9e6bbbdb8d25613a36e16a4d1e14ae01557392f15cc8d3/audioop_lts-0.2.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2de9b6fb8b1cf9f03990b299a9112bfdf8b86b6987003ca9e8a6c4f56d39543", size = 87394 }, - { url = "https://files.pythonhosted.org/packages/14/ae/832bcbbef2c510629593bf46739374174606e25ac7d106b08d396b74c964/audioop_lts-0.2.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f24865991b5ed4b038add5edbf424639d1358144f4e2a3e7a84bc6ba23e35074", size = 84874 }, - { url = "https://files.pythonhosted.org/packages/26/1c/8023c3490798ed2f90dfe58ec3b26d7520a243ae9c0fc751ed3c9d8dbb69/audioop_lts-0.2.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bdb3b7912ccd57ea53197943f1bbc67262dcf29802c4a6df79ec1c715d45a78", size = 88698 }, - { url = "https://files.pythonhosted.org/packages/2c/db/5379d953d4918278b1f04a5a64b2c112bd7aae8f81021009da0dcb77173c/audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:120678b208cca1158f0a12d667af592e067f7a50df9adc4dc8f6ad8d065a93fb", size = 90401 }, - { url = "https://files.pythonhosted.org/packages/99/6e/3c45d316705ab1aec2e69543a5b5e458d0d112a93d08994347fafef03d50/audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:54cd4520fc830b23c7d223693ed3e1b4d464997dd3abc7c15dce9a1f9bd76ab2", size = 91864 }, - { url = "https://files.pythonhosted.org/packages/08/58/6a371d8fed4f34debdb532c0b00942a84ebf3e7ad368e5edc26931d0e251/audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:d6bd20c7a10abcb0fb3d8aaa7508c0bf3d40dfad7515c572014da4b979d3310a", size = 98796 }, - { url = "https://files.pythonhosted.org/packages/ee/77/d637aa35497e0034ff846fd3330d1db26bc6fd9dd79c406e1341188b06a2/audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:f0ed1ad9bd862539ea875fb339ecb18fcc4148f8d9908f4502df28f94d23491a", size = 94116 }, - { url = "https://files.pythonhosted.org/packages/1a/60/7afc2abf46bbcf525a6ebc0305d85ab08dc2d1e2da72c48dbb35eee5b62c/audioop_lts-0.2.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e1af3ff32b8c38a7d900382646e91f2fc515fd19dea37e9392275a5cbfdbff63", size = 91520 }, - { url = "https://files.pythonhosted.org/packages/65/6d/42d40da100be1afb661fd77c2b1c0dfab08af1540df57533621aea3db52a/audioop_lts-0.2.1-cp313-cp313t-win32.whl", hash = "sha256:f51bb55122a89f7a0817d7ac2319744b4640b5b446c4c3efcea5764ea99ae509", size = 26482 }, - { url = "https://files.pythonhosted.org/packages/01/09/f08494dca79f65212f5b273aecc5a2f96691bf3307cac29acfcf84300c01/audioop_lts-0.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f0f2f336aa2aee2bce0b0dcc32bbba9178995454c7b979cf6ce086a8801e14c7", size = 30780 }, - { url = "https://files.pythonhosted.org/packages/5d/35/be73b6015511aa0173ec595fc579133b797ad532996f2998fd6b8d1bbe6b/audioop_lts-0.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:78bfb3703388c780edf900be66e07de5a3d4105ca8e8720c5c4d67927e0b15d0", size = 23918 }, + { url = "https://files.pythonhosted.org/packages/89/aa/ab0f7891a01eeb2d2e338ae8fecbe57fcebea1a24dbb64d45801bfab481d/attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308", size = 63397 }, ] [[package]] name = "babel" -version = "2.17.0" +version = "2.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d", size = 9951852 } +sdist = { url = "https://files.pythonhosted.org/packages/2a/74/f1bc80f23eeba13393b7222b11d95ca3af2c1e28edca18af487137eefed9/babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316", size = 9348104 } wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2", size = 10182537 }, -] - -[[package]] -name = "backrefs" -version = "5.8" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6c/46/caba1eb32fa5784428ab401a5487f73db4104590ecd939ed9daaf18b47e0/backrefs-5.8.tar.gz", hash = "sha256:2cab642a205ce966af3dd4b38ee36009b31fa9502a35fd61d59ccc116e40a6bd", size = 6773994 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/cb/d019ab87fe70e0fe3946196d50d6a4428623dc0c38a6669c8cae0320fbf3/backrefs-5.8-py310-none-any.whl", hash = "sha256:c67f6638a34a5b8730812f5101376f9d41dc38c43f1fdc35cb54700f6ed4465d", size = 380337 }, - { url = "https://files.pythonhosted.org/packages/a9/86/abd17f50ee21b2248075cb6924c6e7f9d23b4925ca64ec660e869c2633f1/backrefs-5.8-py311-none-any.whl", hash = "sha256:2e1c15e4af0e12e45c8701bd5da0902d326b2e200cafcd25e49d9f06d44bb61b", size = 392142 }, - { url = "https://files.pythonhosted.org/packages/b3/04/7b415bd75c8ab3268cc138c76fa648c19495fcc7d155508a0e62f3f82308/backrefs-5.8-py312-none-any.whl", hash = "sha256:bbef7169a33811080d67cdf1538c8289f76f0942ff971222a16034da88a73486", size = 398021 }, - { url = "https://files.pythonhosted.org/packages/04/b8/60dcfb90eb03a06e883a92abbc2ab95c71f0d8c9dd0af76ab1d5ce0b1402/backrefs-5.8-py313-none-any.whl", hash = "sha256:e3a63b073867dbefd0536425f43db618578528e3896fb77be7141328642a1585", size = 399915 }, - { url = "https://files.pythonhosted.org/packages/0c/37/fb6973edeb700f6e3d6ff222400602ab1830446c25c7b4676d8de93e65b8/backrefs-5.8-py39-none-any.whl", hash = "sha256:a66851e4533fb5b371aa0628e1fee1af05135616b86140c9d787a2ffdf4b8fdc", size = 380336 }, + { url = "https://files.pythonhosted.org/packages/ed/20/bc79bc575ba2e2a7f70e8a1155618bb1301eaa5132a8271373a6903f73f8/babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", size = 9587599 }, ] [[package]] name = "beautifulsoup4" -version = "4.13.3" +version = "4.12.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "soupsieve" }, - { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f0/3c/adaf39ce1fb4afdd21b611e3d530b183bb7759c9b673d60db0e347fd4439/beautifulsoup4-4.13.3.tar.gz", hash = "sha256:1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b", size = 619516 } +sdist = { url = "https://files.pythonhosted.org/packages/b3/ca/824b1195773ce6166d388573fc106ce56d4a805bd7427b624e063596ec58/beautifulsoup4-4.12.3.tar.gz", hash = "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051", size = 581181 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f9/49/6abb616eb3cbab6a7cca303dc02fdf3836de2e0b834bf966a7f5271a34d8/beautifulsoup4-4.13.3-py3-none-any.whl", hash = "sha256:99045d7d3f08f91f0d656bc9b7efbae189426cd913d830294a15eefa0ea4df16", size = 186015 }, + { url = "https://files.pythonhosted.org/packages/b1/fe/e8c672695b37eecc5cbf43e1d0638d88d66ba3a44c4d321c796f4e59167f/beautifulsoup4-4.12.3-py3-none-any.whl", hash = "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed", size = 147925 }, ] [[package]] name = "blinker" -version = "1.9.0" +version = "1.8.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460 } +sdist = { url = "https://files.pythonhosted.org/packages/1e/57/a6a1721eff09598fb01f3c7cda070c1b6a0f12d63c83236edf79a440abcc/blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83", size = 23161 } wheels = [ - { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458 }, + { url = "https://files.pythonhosted.org/packages/bb/2a/10164ed1f31196a2f7f3799368a821765c62851ead0e630ab52b8e14b4d0/blinker-1.8.2-py3-none-any.whl", hash = "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01", size = 9456 }, ] [[package]] @@ -330,11 +275,11 @@ wheels = [ [[package]] name = "certifi" -version = "2025.1.31" +version = "2024.8.30" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz", hash = "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", size = 167577 } +sdist = { url = "https://files.pythonhosted.org/packages/b0/ee/9b19140fe824b367c04c5e1b369942dd754c4c5462d5674002f75c4dedc1/certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9", size = 168507 } wheels = [ - { url = "https://files.pythonhosted.org/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl", hash = "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe", size = 166393 }, + { url = "https://files.pythonhosted.org/packages/12/90/3c9ff0512038035f59d279fddeb79f5f1eccd8859f06d6163c58798b9487/certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8", size = 167321 }, ] [[package]] @@ -384,50 +329,56 @@ wheels = [ [[package]] name = "charset-normalizer" -version = "3.4.1" +version = "3.4.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3", size = 123188 } +sdist = { url = "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e", size = 106620 } wheels = [ - { url = "https://files.pythonhosted.org/packages/72/80/41ef5d5a7935d2d3a773e3eaebf0a9350542f2cab4eac59a7a4741fbbbbe/charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125", size = 194995 }, - { url = "https://files.pythonhosted.org/packages/7a/28/0b9fefa7b8b080ec492110af6d88aa3dea91c464b17d53474b6e9ba5d2c5/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1", size = 139471 }, - { url = "https://files.pythonhosted.org/packages/71/64/d24ab1a997efb06402e3fc07317e94da358e2585165930d9d59ad45fcae2/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3", size = 149831 }, - { url = "https://files.pythonhosted.org/packages/37/ed/be39e5258e198655240db5e19e0b11379163ad7070962d6b0c87ed2c4d39/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd", size = 142335 }, - { url = "https://files.pythonhosted.org/packages/88/83/489e9504711fa05d8dde1574996408026bdbdbd938f23be67deebb5eca92/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00", size = 143862 }, - { url = "https://files.pythonhosted.org/packages/c6/c7/32da20821cf387b759ad24627a9aca289d2822de929b8a41b6241767b461/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12", size = 145673 }, - { url = "https://files.pythonhosted.org/packages/68/85/f4288e96039abdd5aeb5c546fa20a37b50da71b5cf01e75e87f16cd43304/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77", size = 140211 }, - { url = "https://files.pythonhosted.org/packages/28/a3/a42e70d03cbdabc18997baf4f0227c73591a08041c149e710045c281f97b/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146", size = 148039 }, - { url = "https://files.pythonhosted.org/packages/85/e4/65699e8ab3014ecbe6f5c71d1a55d810fb716bbfd74f6283d5c2aa87febf/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd", size = 151939 }, - { url = "https://files.pythonhosted.org/packages/b1/82/8e9fe624cc5374193de6860aba3ea8070f584c8565ee77c168ec13274bd2/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6", size = 149075 }, - { url = "https://files.pythonhosted.org/packages/3d/7b/82865ba54c765560c8433f65e8acb9217cb839a9e32b42af4aa8e945870f/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8", size = 144340 }, - { url = "https://files.pythonhosted.org/packages/b5/b6/9674a4b7d4d99a0d2df9b215da766ee682718f88055751e1e5e753c82db0/charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b", size = 95205 }, - { url = "https://files.pythonhosted.org/packages/1e/ab/45b180e175de4402dcf7547e4fb617283bae54ce35c27930a6f35b6bef15/charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76", size = 102441 }, - { url = "https://files.pythonhosted.org/packages/0a/9a/dd1e1cdceb841925b7798369a09279bd1cf183cef0f9ddf15a3a6502ee45/charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545", size = 196105 }, - { url = "https://files.pythonhosted.org/packages/d3/8c/90bfabf8c4809ecb648f39794cf2a84ff2e7d2a6cf159fe68d9a26160467/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7", size = 140404 }, - { url = "https://files.pythonhosted.org/packages/ad/8f/e410d57c721945ea3b4f1a04b74f70ce8fa800d393d72899f0a40526401f/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757", size = 150423 }, - { url = "https://files.pythonhosted.org/packages/f0/b8/e6825e25deb691ff98cf5c9072ee0605dc2acfca98af70c2d1b1bc75190d/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa", size = 143184 }, - { url = "https://files.pythonhosted.org/packages/3e/a2/513f6cbe752421f16d969e32f3583762bfd583848b763913ddab8d9bfd4f/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d", size = 145268 }, - { url = "https://files.pythonhosted.org/packages/74/94/8a5277664f27c3c438546f3eb53b33f5b19568eb7424736bdc440a88a31f/charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616", size = 147601 }, - { url = "https://files.pythonhosted.org/packages/7c/5f/6d352c51ee763623a98e31194823518e09bfa48be2a7e8383cf691bbb3d0/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b", size = 141098 }, - { url = "https://files.pythonhosted.org/packages/78/d4/f5704cb629ba5ab16d1d3d741396aec6dc3ca2b67757c45b0599bb010478/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d", size = 149520 }, - { url = "https://files.pythonhosted.org/packages/c5/96/64120b1d02b81785f222b976c0fb79a35875457fa9bb40827678e54d1bc8/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a", size = 152852 }, - { url = "https://files.pythonhosted.org/packages/84/c9/98e3732278a99f47d487fd3468bc60b882920cef29d1fa6ca460a1fdf4e6/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9", size = 150488 }, - { url = "https://files.pythonhosted.org/packages/13/0e/9c8d4cb99c98c1007cc11eda969ebfe837bbbd0acdb4736d228ccaabcd22/charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1", size = 146192 }, - { url = "https://files.pythonhosted.org/packages/b2/21/2b6b5b860781a0b49427309cb8670785aa543fb2178de875b87b9cc97746/charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35", size = 95550 }, - { url = "https://files.pythonhosted.org/packages/21/5b/1b390b03b1d16c7e382b561c5329f83cc06623916aab983e8ab9239c7d5c/charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f", size = 102785 }, - { url = "https://files.pythonhosted.org/packages/38/94/ce8e6f63d18049672c76d07d119304e1e2d7c6098f0841b51c666e9f44a0/charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda", size = 195698 }, - { url = "https://files.pythonhosted.org/packages/24/2e/dfdd9770664aae179a96561cc6952ff08f9a8cd09a908f259a9dfa063568/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313", size = 140162 }, - { url = "https://files.pythonhosted.org/packages/24/4e/f646b9093cff8fc86f2d60af2de4dc17c759de9d554f130b140ea4738ca6/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9", size = 150263 }, - { url = "https://files.pythonhosted.org/packages/5e/67/2937f8d548c3ef6e2f9aab0f6e21001056f692d43282b165e7c56023e6dd/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b", size = 142966 }, - { url = "https://files.pythonhosted.org/packages/52/ed/b7f4f07de100bdb95c1756d3a4d17b90c1a3c53715c1a476f8738058e0fa/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11", size = 144992 }, - { url = "https://files.pythonhosted.org/packages/96/2c/d49710a6dbcd3776265f4c923bb73ebe83933dfbaa841c5da850fe0fd20b/charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f", size = 147162 }, - { url = "https://files.pythonhosted.org/packages/b4/41/35ff1f9a6bd380303dea55e44c4933b4cc3c4850988927d4082ada230273/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd", size = 140972 }, - { url = "https://files.pythonhosted.org/packages/fb/43/c6a0b685fe6910d08ba971f62cd9c3e862a85770395ba5d9cad4fede33ab/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2", size = 149095 }, - { url = "https://files.pythonhosted.org/packages/4c/ff/a9a504662452e2d2878512115638966e75633519ec11f25fca3d2049a94a/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886", size = 152668 }, - { url = "https://files.pythonhosted.org/packages/6c/71/189996b6d9a4b932564701628af5cee6716733e9165af1d5e1b285c530ed/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601", size = 150073 }, - { url = "https://files.pythonhosted.org/packages/e4/93/946a86ce20790e11312c87c75ba68d5f6ad2208cfb52b2d6a2c32840d922/charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd", size = 145732 }, - { url = "https://files.pythonhosted.org/packages/cd/e5/131d2fb1b0dddafc37be4f3a2fa79aa4c037368be9423061dccadfd90091/charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407", size = 95391 }, - { url = "https://files.pythonhosted.org/packages/27/f2/4f9a69cc7712b9b5ad8fdb87039fd89abba997ad5cbe690d1835d40405b0/charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971", size = 102702 }, - { url = "https://files.pythonhosted.org/packages/0e/f6/65ecc6878a89bb1c23a086ea335ad4bf21a588990c3f535a227b9eea9108/charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85", size = 49767 }, + { url = "https://files.pythonhosted.org/packages/9c/61/73589dcc7a719582bf56aae309b6103d2762b526bffe189d635a7fcfd998/charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c", size = 193339 }, + { url = "https://files.pythonhosted.org/packages/77/d5/8c982d58144de49f59571f940e329ad6e8615e1e82ef84584c5eeb5e1d72/charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944", size = 124366 }, + { url = "https://files.pythonhosted.org/packages/bf/19/411a64f01ee971bed3231111b69eb56f9331a769072de479eae7de52296d/charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee", size = 118874 }, + { url = "https://files.pythonhosted.org/packages/4c/92/97509850f0d00e9f14a46bc751daabd0ad7765cff29cdfb66c68b6dad57f/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c", size = 138243 }, + { url = "https://files.pythonhosted.org/packages/e2/29/d227805bff72ed6d6cb1ce08eec707f7cfbd9868044893617eb331f16295/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6", size = 148676 }, + { url = "https://files.pythonhosted.org/packages/13/bc/87c2c9f2c144bedfa62f894c3007cd4530ba4b5351acb10dc786428a50f0/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea", size = 141289 }, + { url = "https://files.pythonhosted.org/packages/eb/5b/6f10bad0f6461fa272bfbbdf5d0023b5fb9bc6217c92bf068fa5a99820f5/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc", size = 142585 }, + { url = "https://files.pythonhosted.org/packages/3b/a0/a68980ab8a1f45a36d9745d35049c1af57d27255eff8c907e3add84cf68f/charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5", size = 144408 }, + { url = "https://files.pythonhosted.org/packages/d7/a1/493919799446464ed0299c8eef3c3fad0daf1c3cd48bff9263c731b0d9e2/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594", size = 139076 }, + { url = "https://files.pythonhosted.org/packages/fb/9d/9c13753a5a6e0db4a0a6edb1cef7aee39859177b64e1a1e748a6e3ba62c2/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c", size = 146874 }, + { url = "https://files.pythonhosted.org/packages/75/d2/0ab54463d3410709c09266dfb416d032a08f97fd7d60e94b8c6ef54ae14b/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365", size = 150871 }, + { url = "https://files.pythonhosted.org/packages/8d/c9/27e41d481557be53d51e60750b85aa40eaf52b841946b3cdeff363105737/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129", size = 148546 }, + { url = "https://files.pythonhosted.org/packages/ee/44/4f62042ca8cdc0cabf87c0fc00ae27cd8b53ab68be3605ba6d071f742ad3/charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236", size = 143048 }, + { url = "https://files.pythonhosted.org/packages/01/f8/38842422988b795220eb8038745d27a675ce066e2ada79516c118f291f07/charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99", size = 94389 }, + { url = "https://files.pythonhosted.org/packages/0b/6e/b13bd47fa9023b3699e94abf565b5a2f0b0be6e9ddac9812182596ee62e4/charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27", size = 101752 }, + { url = "https://files.pythonhosted.org/packages/d3/0b/4b7a70987abf9b8196845806198975b6aab4ce016632f817ad758a5aa056/charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6", size = 194445 }, + { url = "https://files.pythonhosted.org/packages/50/89/354cc56cf4dd2449715bc9a0f54f3aef3dc700d2d62d1fa5bbea53b13426/charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf", size = 125275 }, + { url = "https://files.pythonhosted.org/packages/fa/44/b730e2a2580110ced837ac083d8ad222343c96bb6b66e9e4e706e4d0b6df/charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db", size = 119020 }, + { url = "https://files.pythonhosted.org/packages/9d/e4/9263b8240ed9472a2ae7ddc3e516e71ef46617fe40eaa51221ccd4ad9a27/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1", size = 139128 }, + { url = "https://files.pythonhosted.org/packages/6b/e3/9f73e779315a54334240353eaea75854a9a690f3f580e4bd85d977cb2204/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03", size = 149277 }, + { url = "https://files.pythonhosted.org/packages/1a/cf/f1f50c2f295312edb8a548d3fa56a5c923b146cd3f24114d5adb7e7be558/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284", size = 142174 }, + { url = "https://files.pythonhosted.org/packages/16/92/92a76dc2ff3a12e69ba94e7e05168d37d0345fa08c87e1fe24d0c2a42223/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15", size = 143838 }, + { url = "https://files.pythonhosted.org/packages/a4/01/2117ff2b1dfc61695daf2babe4a874bca328489afa85952440b59819e9d7/charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8", size = 146149 }, + { url = "https://files.pythonhosted.org/packages/f6/9b/93a332b8d25b347f6839ca0a61b7f0287b0930216994e8bf67a75d050255/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2", size = 140043 }, + { url = "https://files.pythonhosted.org/packages/ab/f6/7ac4a01adcdecbc7a7587767c776d53d369b8b971382b91211489535acf0/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719", size = 148229 }, + { url = "https://files.pythonhosted.org/packages/9d/be/5708ad18161dee7dc6a0f7e6cf3a88ea6279c3e8484844c0590e50e803ef/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631", size = 151556 }, + { url = "https://files.pythonhosted.org/packages/5a/bb/3d8bc22bacb9eb89785e83e6723f9888265f3a0de3b9ce724d66bd49884e/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b", size = 149772 }, + { url = "https://files.pythonhosted.org/packages/f7/fa/d3fc622de05a86f30beea5fc4e9ac46aead4731e73fd9055496732bcc0a4/charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565", size = 144800 }, + { url = "https://files.pythonhosted.org/packages/9a/65/bdb9bc496d7d190d725e96816e20e2ae3a6fa42a5cac99c3c3d6ff884118/charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7", size = 94836 }, + { url = "https://files.pythonhosted.org/packages/3e/67/7b72b69d25b89c0b3cea583ee372c43aa24df15f0e0f8d3982c57804984b/charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9", size = 102187 }, + { url = "https://files.pythonhosted.org/packages/f3/89/68a4c86f1a0002810a27f12e9a7b22feb198c59b2f05231349fbce5c06f4/charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114", size = 194617 }, + { url = "https://files.pythonhosted.org/packages/4f/cd/8947fe425e2ab0aa57aceb7807af13a0e4162cd21eee42ef5b053447edf5/charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed", size = 125310 }, + { url = "https://files.pythonhosted.org/packages/5b/f0/b5263e8668a4ee9becc2b451ed909e9c27058337fda5b8c49588183c267a/charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250", size = 119126 }, + { url = "https://files.pythonhosted.org/packages/ff/6e/e445afe4f7fda27a533f3234b627b3e515a1b9429bc981c9a5e2aa5d97b6/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920", size = 139342 }, + { url = "https://files.pythonhosted.org/packages/a1/b2/4af9993b532d93270538ad4926c8e37dc29f2111c36f9c629840c57cd9b3/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64", size = 149383 }, + { url = "https://files.pythonhosted.org/packages/fb/6f/4e78c3b97686b871db9be6f31d64e9264e889f8c9d7ab33c771f847f79b7/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23", size = 142214 }, + { url = "https://files.pythonhosted.org/packages/2b/c9/1c8fe3ce05d30c87eff498592c89015b19fade13df42850aafae09e94f35/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc", size = 144104 }, + { url = "https://files.pythonhosted.org/packages/ee/68/efad5dcb306bf37db7db338338e7bb8ebd8cf38ee5bbd5ceaaaa46f257e6/charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d", size = 146255 }, + { url = "https://files.pythonhosted.org/packages/0c/75/1ed813c3ffd200b1f3e71121c95da3f79e6d2a96120163443b3ad1057505/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88", size = 140251 }, + { url = "https://files.pythonhosted.org/packages/7d/0d/6f32255c1979653b448d3c709583557a4d24ff97ac4f3a5be156b2e6a210/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90", size = 148474 }, + { url = "https://files.pythonhosted.org/packages/ac/a0/c1b5298de4670d997101fef95b97ac440e8c8d8b4efa5a4d1ef44af82f0d/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b", size = 151849 }, + { url = "https://files.pythonhosted.org/packages/04/4f/b3961ba0c664989ba63e30595a3ed0875d6790ff26671e2aae2fdc28a399/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d", size = 149781 }, + { url = "https://files.pythonhosted.org/packages/d8/90/6af4cd042066a4adad58ae25648a12c09c879efa4849c705719ba1b23d8c/charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482", size = 144970 }, + { url = "https://files.pythonhosted.org/packages/cc/67/e5e7e0cbfefc4ca79025238b43cdf8a2037854195b37d6417f3d0895c4c2/charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67", size = 94973 }, + { url = "https://files.pythonhosted.org/packages/65/97/fc9bbc54ee13d33dc54a7fcf17b26368b18505500fc01e228c27b5222d80/charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b", size = 102308 }, + { url = "https://files.pythonhosted.org/packages/bf/9b/08c0432272d77b04803958a4598a51e2a4b51c06640af8b8f0f908c18bf2/charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079", size = 49446 }, ] [[package]] @@ -465,15 +416,15 @@ wheels = [ [[package]] name = "cssselect2" -version = "0.8.0" +version = "0.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "tinycss2" }, { name = "webencodings" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9f/86/fd7f58fc498b3166f3a7e8e0cddb6e620fe1da35b02248b1bd59e95dbaaa/cssselect2-0.8.0.tar.gz", hash = "sha256:7674ffb954a3b46162392aee2a3a0aedb2e14ecf99fcc28644900f4e6e3e9d3a", size = 35716 } +sdist = { url = "https://files.pythonhosted.org/packages/e7/fc/326cb6f988905998f09bb54a3f5d98d4462ba119363c0dfad29750d48c09/cssselect2-0.7.0.tar.gz", hash = "sha256:1ccd984dab89fc68955043aca4e1b03e0cf29cad9880f6e28e3ba7a74b14aa5a", size = 35888 } wheels = [ - { url = "https://files.pythonhosted.org/packages/0f/e7/aa315e6a749d9b96c2504a1ba0ba031ba2d0517e972ce22682e3fccecb09/cssselect2-0.8.0-py3-none-any.whl", hash = "sha256:46fc70ebc41ced7a32cd42d58b1884d72ade23d21e5a4eaaf022401c13f0e76e", size = 15454 }, + { url = "https://files.pythonhosted.org/packages/9d/3a/e39436efe51894243ff145a37c4f9a030839b97779ebcc4f13b3ba21c54e/cssselect2-0.7.0-py3-none-any.whl", hash = "sha256:fd23a65bfd444595913f02fc71f6b286c29261e354c41d722ca7a261a49b5969", size = 15586 }, ] [[package]] @@ -496,15 +447,14 @@ wheels = [ [[package]] name = "discord-py" -version = "2.5.2" +version = "2.4.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohttp" }, - { name = "audioop-lts", marker = "python_full_version >= '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7f/dd/5817c7af5e614e45cdf38cbf6c3f4597590c442822a648121a34dee7fa0f/discord_py-2.5.2.tar.gz", hash = "sha256:01cd362023bfea1a4a1d43f5280b5ef00cad2c7eba80098909f98bf28e578524", size = 1054879 } +sdist = { url = "https://files.pythonhosted.org/packages/39/af/80cab4015722d3bee175509b7249a11d5adf77b5ff4c27f268558079d149/discord_py-2.4.0.tar.gz", hash = "sha256:d07cb2a223a185873a1d0ee78b9faa9597e45b3f6186df21a95cec1e9bcdc9a5", size = 1027707 } wheels = [ - { url = "https://files.pythonhosted.org/packages/57/a8/dc908a0fe4cd7e3950c9fa6906f7bf2e5d92d36b432f84897185e1b77138/discord_py-2.5.2-py3-none-any.whl", hash = "sha256:81f23a17c50509ffebe0668441cb80c139e74da5115305f70e27ce821361295a", size = 1155105 }, + { url = "https://files.pythonhosted.org/packages/23/10/3c44e9331a5ec3bae8b2919d51f611a5b94e179563b1b89eb6423a8f43eb/discord.py-2.4.0-py3-none-any.whl", hash = "sha256:b8af6711c70f7e62160bfbecb55be699b5cb69d007426759ab8ab06b1bd77d1d", size = 1125988 }, ] [[package]] @@ -518,7 +468,7 @@ wheels = [ [[package]] name = "flask" -version = "3.1.0" +version = "3.0.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "blinker" }, @@ -527,9 +477,9 @@ dependencies = [ { name = "jinja2" }, { name = "werkzeug" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/89/50/dff6380f1c7f84135484e176e0cac8690af72fa90e932ad2a0a60e28c69b/flask-3.1.0.tar.gz", hash = "sha256:5f873c5184c897c8d9d1b05df1e3d01b14910ce69607a117bd3277098a5836ac", size = 680824 } +sdist = { url = "https://files.pythonhosted.org/packages/41/e1/d104c83026f8d35dfd2c261df7d64738341067526406b40190bc063e829a/flask-3.0.3.tar.gz", hash = "sha256:ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842", size = 676315 } wheels = [ - { url = "https://files.pythonhosted.org/packages/af/47/93213ee66ef8fae3b93b3e29206f6b251e65c97bd91d8e1c5596ef15af0a/flask-3.1.0-py3-none-any.whl", hash = "sha256:d667207822eb83f1c4b50949b1623c8fc8d51f2341d65f72e1a1815397551136", size = 102979 }, + { url = "https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl", hash = "sha256:34e815dfaa43340d1d15a5c3a02b8476004037eb4840b34910c6e21679d288f3", size = 101735 }, ] [[package]] @@ -600,38 +550,38 @@ wheels = [ [[package]] name = "gitdb" -version = "4.0.12" +version = "4.0.11" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "smmap" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/72/94/63b0fc47eb32792c7ba1fe1b694daec9a63620db1e313033d18140c2320a/gitdb-4.0.12.tar.gz", hash = "sha256:5ef71f855d191a3326fcfbc0d5da835f26b13fbcba60c32c21091c349ffdb571", size = 394684 } +sdist = { url = "https://files.pythonhosted.org/packages/19/0d/bbb5b5ee188dec84647a4664f3e11b06ade2bde568dbd489d9d64adef8ed/gitdb-4.0.11.tar.gz", hash = "sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b", size = 394469 } wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/61/5c78b91c3143ed5c14207f463aecfc8f9dbb5092fb2869baf37c273b2705/gitdb-4.0.12-py3-none-any.whl", hash = "sha256:67073e15955400952c6565cc3e707c554a4eea2e428946f7a4c162fab9bd9bcf", size = 62794 }, + { url = "https://files.pythonhosted.org/packages/fd/5b/8f0c4a5bb9fd491c277c21eff7ccae71b47d43c4446c9d0c6cff2fe8c2c4/gitdb-4.0.11-py3-none-any.whl", hash = "sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4", size = 62721 }, ] [[package]] name = "gitpython" -version = "3.1.44" +version = "3.1.43" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "gitdb" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c0/89/37df0b71473153574a5cdef8f242de422a0f5d26d7a9e231e6f169b4ad14/gitpython-3.1.44.tar.gz", hash = "sha256:c87e30b26253bf5418b01b0660f818967f3c503193838337fe5e573331249269", size = 214196 } +sdist = { url = "https://files.pythonhosted.org/packages/b6/a1/106fd9fa2dd989b6fb36e5893961f82992cf676381707253e0bf93eb1662/GitPython-3.1.43.tar.gz", hash = "sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c", size = 214149 } wheels = [ - { url = "https://files.pythonhosted.org/packages/1d/9a/4114a9057db2f1462d5c8f8390ab7383925fe1ac012eaa42402ad65c2963/GitPython-3.1.44-py3-none-any.whl", hash = "sha256:9e0e10cda9bed1ee64bc9a6de50e7e38a9c9943241cd7f585f6df3ed28011110", size = 207599 }, + { url = "https://files.pythonhosted.org/packages/e9/bd/cc3a402a6439c15c3d4294333e13042b915bbeab54edc457c723931fed3f/GitPython-3.1.43-py3-none-any.whl", hash = "sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff", size = 207337 }, ] [[package]] name = "griffe" -version = "1.7.1" +version = "1.3.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/30/1b/fe7a3a33a2fb7ad7807f71957e6108a50d93271ab718d9a56080415f66de/griffe-1.7.1.tar.gz", hash = "sha256:464730d0e95d0afd038e699a5f7276d7438d0712db0c489a17e761f70e011507", size = 394522 } +sdist = { url = "https://files.pythonhosted.org/packages/c2/37/813e72a3458fa3d996cf6bcc6a0caa919d16540f873366b0d328d51d684a/griffe-1.3.2.tar.gz", hash = "sha256:1ec50335aa507ed2445f2dd45a15c9fa3a45f52c9527e880571dfc61912fd60c", size = 382540 } wheels = [ - { url = "https://files.pythonhosted.org/packages/1d/94/48e28b1c7402f750200e9e3ef4834c862ea85c64f426a231a6dc312f61a9/griffe-1.7.1-py3-none-any.whl", hash = "sha256:37a7f15233937d723ddc969fa4117fdd03988885c16938dc43bccdfe8fa4d02d", size = 129134 }, + { url = "https://files.pythonhosted.org/packages/2a/49/39967633dd3c5f06fde83fec140228671a7344289ece0cfdd3cbe4798d69/griffe-1.3.2-py3-none-any.whl", hash = "sha256:2e34b5e46507d615915c8e6288bb1a2234bd35dee44d01e40a2bc2f25bd4d10c", size = 126992 }, ] [[package]] @@ -648,7 +598,7 @@ name = "importlib-metadata" version = "8.5.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "zipp" }, + { name = "zipp", marker = "python_full_version >= '3.12'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/cd/12/33e59336dca5be0c398a7482335911a33aa0e20776128f038019f1a95f1b/importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7", size = 55304 } wheels = [ @@ -657,11 +607,11 @@ wheels = [ [[package]] name = "isort" -version = "6.0.1" +version = "5.13.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b8/21/1e2a441f74a653a144224d7d21afe8f4169e6c7c20bb13aec3a2dc3815e0/isort-6.0.1.tar.gz", hash = "sha256:1cb5df28dfbc742e490c5e41bad6da41b805b0a8be7bc93cd0fb2a8a890ac450", size = 821955 } +sdist = { url = "https://files.pythonhosted.org/packages/87/f9/c1eb8635a24e87ade2efce21e3ce8cd6b8630bb685ddc9cdaca1349b2eb5/isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109", size = 175303 } wheels = [ - { url = "https://files.pythonhosted.org/packages/c1/11/114d0a5f4dabbdcedc1125dee0888514c3c3b16d3e9facad87ed96fad97c/isort-6.0.1-py3-none-any.whl", hash = "sha256:2dc5d7f65c9678d94c88dfc29161a320eec67328bc97aad576874cb4be1e9615", size = 94186 }, + { url = "https://files.pythonhosted.org/packages/d1/b3/8def84f539e7d2289a02f0524b944b15d7c75dab7628bedf1c4f0992029c/isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6", size = 92310 }, ] [[package]] @@ -675,14 +625,14 @@ wheels = [ [[package]] name = "jinja2" -version = "3.1.6" +version = "3.1.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115 } +sdist = { url = "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", size = 240245 } wheels = [ - { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899 }, + { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d", size = 133271 }, ] [[package]] @@ -708,63 +658,63 @@ wheels = [ [[package]] name = "markdownify" -version = "1.1.0" +version = "0.13.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "beautifulsoup4" }, { name = "six" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/2f/78/c48fed23c7aebc2c16049062e72de1da3220c274de59d28c942acdc9ffb2/markdownify-1.1.0.tar.gz", hash = "sha256:449c0bbbf1401c5112379619524f33b63490a8fa479456d41de9dc9e37560ebd", size = 17127 } +sdist = { url = "https://files.pythonhosted.org/packages/19/5a/bd1b685ee9efbfb0b22774a30188dfb4048c64e8a6c80a65a7f207af4ea1/markdownify-0.13.1.tar.gz", hash = "sha256:ab257f9e6bd4075118828a28c9d02f8a4bfeb7421f558834aa79b2dfeb32a098", size = 13609 } wheels = [ - { url = "https://files.pythonhosted.org/packages/64/11/b751af7ad41b254a802cf52f7bc1fca7cabe2388132f2ce60a1a6b9b9622/markdownify-1.1.0-py3-none-any.whl", hash = "sha256:32a5a08e9af02c8a6528942224c91b933b4bd2c7d078f9012943776fc313eeef", size = 13901 }, + { url = "https://files.pythonhosted.org/packages/6c/e9/6e2757a670b8c48bc48eff1c20cb9d71f1476e844038bdbdb76f17e6a12b/markdownify-0.13.1-py3-none-any.whl", hash = "sha256:1d181d43d20902bcc69d7be85b5316ed174d0dda72ff56e14ae4c95a4a407d22", size = 10800 }, ] [[package]] name = "markupsafe" -version = "3.0.2" +version = "3.0.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537 } +sdist = { url = "https://files.pythonhosted.org/packages/b4/d2/38ff920762f2247c3af5cbbbbc40756f575d9692d381d7c520f45deb9b8f/markupsafe-3.0.1.tar.gz", hash = "sha256:3e683ee4f5d0fa2dde4db77ed8dd8a876686e3fc417655c2ece9a90576905344", size = 20249 } wheels = [ - { url = "https://files.pythonhosted.org/packages/6b/28/bbf83e3f76936960b850435576dd5e67034e200469571be53f69174a2dfd/MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", size = 14353 }, - { url = "https://files.pythonhosted.org/packages/6c/30/316d194b093cde57d448a4c3209f22e3046c5bb2fb0820b118292b334be7/MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", size = 12392 }, - { url = "https://files.pythonhosted.org/packages/f2/96/9cdafba8445d3a53cae530aaf83c38ec64c4d5427d975c974084af5bc5d2/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", size = 23984 }, - { url = "https://files.pythonhosted.org/packages/f1/a4/aefb044a2cd8d7334c8a47d3fb2c9f328ac48cb349468cc31c20b539305f/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", size = 23120 }, - { url = "https://files.pythonhosted.org/packages/8d/21/5e4851379f88f3fad1de30361db501300d4f07bcad047d3cb0449fc51f8c/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", size = 23032 }, - { url = "https://files.pythonhosted.org/packages/00/7b/e92c64e079b2d0d7ddf69899c98842f3f9a60a1ae72657c89ce2655c999d/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", size = 24057 }, - { url = "https://files.pythonhosted.org/packages/f9/ac/46f960ca323037caa0a10662ef97d0a4728e890334fc156b9f9e52bcc4ca/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", size = 23359 }, - { url = "https://files.pythonhosted.org/packages/69/84/83439e16197337b8b14b6a5b9c2105fff81d42c2a7c5b58ac7b62ee2c3b1/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", size = 23306 }, - { url = "https://files.pythonhosted.org/packages/9a/34/a15aa69f01e2181ed8d2b685c0d2f6655d5cca2c4db0ddea775e631918cd/MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", size = 15094 }, - { url = "https://files.pythonhosted.org/packages/da/b8/3a3bd761922d416f3dc5d00bfbed11f66b1ab89a0c2b6e887240a30b0f6b/MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", size = 15521 }, - { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274 }, - { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348 }, - { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149 }, - { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118 }, - { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993 }, - { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178 }, - { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319 }, - { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352 }, - { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097 }, - { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601 }, - { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274 }, - { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352 }, - { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122 }, - { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085 }, - { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978 }, - { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208 }, - { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357 }, - { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344 }, - { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101 }, - { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603 }, - { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510 }, - { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486 }, - { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480 }, - { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914 }, - { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796 }, - { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473 }, - { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114 }, - { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098 }, - { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208 }, - { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739 }, + { url = "https://files.pythonhosted.org/packages/ce/af/2f5d88a7fc7226bd34c6e15f6061246ad8cff979da9f19d11bdd0addd8e2/MarkupSafe-3.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:26627785a54a947f6d7336ce5963569b5d75614619e75193bdb4e06e21d447ad", size = 14387 }, + { url = "https://files.pythonhosted.org/packages/8d/43/fd588ef5d192308c5e05974bac659bf6ae29c202b7ea2c4194bcf01eacee/MarkupSafe-3.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b954093679d5750495725ea6f88409946d69cfb25ea7b4c846eef5044194f583", size = 12410 }, + { url = "https://files.pythonhosted.org/packages/58/26/78f161d602fb03804118905e5faacafc0ec592bbad71aaee62537529813a/MarkupSafe-3.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:973a371a55ce9ed333a3a0f8e0bcfae9e0d637711534bcb11e130af2ab9334e7", size = 24006 }, + { url = "https://files.pythonhosted.org/packages/ae/1d/7d5ec8bcfd9c2db235d720fa51d818b7e2abc45250ce5f53dd6cb60409ca/MarkupSafe-3.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:244dbe463d5fb6d7ce161301a03a6fe744dac9072328ba9fc82289238582697b", size = 23303 }, + { url = "https://files.pythonhosted.org/packages/26/ce/703ca3b03a709e3bd1fbffa407789e56b9fa664456538092617dd665fc1d/MarkupSafe-3.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d98e66a24497637dd31ccab090b34392dddb1f2f811c4b4cd80c230205c074a3", size = 23205 }, + { url = "https://files.pythonhosted.org/packages/88/60/40be0493decabc2344b12d3a709fd6ccdd15a5ebaee1e8d878315d107ad3/MarkupSafe-3.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ad91738f14eb8da0ff82f2acd0098b6257621410dcbd4df20aaa5b4233d75a50", size = 23684 }, + { url = "https://files.pythonhosted.org/packages/6d/f8/8fd52a66e8f62a9add62b4a0b5a3ab4092027437f2ef027f812d94ae91cf/MarkupSafe-3.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7044312a928a66a4c2a22644147bc61a199c1709712069a344a3fb5cfcf16915", size = 23472 }, + { url = "https://files.pythonhosted.org/packages/d4/0b/998b17b9e06ea45ad1646fea586f1b83d02dfdb14d47dd2fd81fba5a08c9/MarkupSafe-3.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a4792d3b3a6dfafefdf8e937f14906a51bd27025a36f4b188728a73382231d91", size = 23388 }, + { url = "https://files.pythonhosted.org/packages/5a/57/b6b7aa23b2e26d68d601718f8ce3161fbdaf967b31752c7dec52bef828c9/MarkupSafe-3.0.1-cp311-cp311-win32.whl", hash = "sha256:fa7d686ed9883f3d664d39d5a8e74d3c5f63e603c2e3ff0abcba23eac6542635", size = 15106 }, + { url = "https://files.pythonhosted.org/packages/fc/b5/20cb1d714596acb553c810009c8004c809823947da63e13c19a7decfcb6c/MarkupSafe-3.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:9ba25a71ebf05b9bb0e2ae99f8bc08a07ee8e98c612175087112656ca0f5c8bf", size = 15542 }, + { url = "https://files.pythonhosted.org/packages/45/6d/72ed58d42a12bd9fc288dbff6dd8d03ea973a232ac0538d7f88d105b5251/MarkupSafe-3.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:8ae369e84466aa70f3154ee23c1451fda10a8ee1b63923ce76667e3077f2b0c4", size = 14322 }, + { url = "https://files.pythonhosted.org/packages/86/f5/241238f89cdd6461ac9f521af8389f9a48fab97e4f315c69e9e0d52bc919/MarkupSafe-3.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40f1e10d51c92859765522cbd79c5c8989f40f0419614bcdc5015e7b6bf97fc5", size = 12380 }, + { url = "https://files.pythonhosted.org/packages/27/94/79751928bca5841416d8ca02e22198672e021d5c7120338e2a6e3771f8fc/MarkupSafe-3.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a4cb365cb49b750bdb60b846b0c0bc49ed62e59a76635095a179d440540c346", size = 24099 }, + { url = "https://files.pythonhosted.org/packages/10/6e/1b8070bbfc467429c7983cd5ffd4ec57e1d501763d974c7caaa0a9a79f4c/MarkupSafe-3.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ee3941769bd2522fe39222206f6dd97ae83c442a94c90f2b7a25d847d40f4729", size = 23249 }, + { url = "https://files.pythonhosted.org/packages/66/50/9389ae6cdff78d7481a2a2641830b5eb1d1f62177550e73355a810a889c9/MarkupSafe-3.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62fada2c942702ef8952754abfc1a9f7658a4d5460fabe95ac7ec2cbe0d02abc", size = 23149 }, + { url = "https://files.pythonhosted.org/packages/16/02/5dddff5366fde47133186efb847fa88bddef85914bbe623e25cfeccb3517/MarkupSafe-3.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4c2d64fdba74ad16138300815cfdc6ab2f4647e23ced81f59e940d7d4a1469d9", size = 23864 }, + { url = "https://files.pythonhosted.org/packages/f3/f1/700ee6655561cfda986e03f7afc309e3738918551afa7dedd99225586227/MarkupSafe-3.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:fb532dd9900381d2e8f48172ddc5a59db4c445a11b9fab40b3b786da40d3b56b", size = 23440 }, + { url = "https://files.pythonhosted.org/packages/fb/3e/d26623ac7f16709823b4c80e0b4a1c9196eeb46182a6c1d47b5e0c8434f4/MarkupSafe-3.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0f84af7e813784feb4d5e4ff7db633aba6c8ca64a833f61d8e4eade234ef0c38", size = 23610 }, + { url = "https://files.pythonhosted.org/packages/51/04/1f8da0810c39cb9fcff96b6baed62272c97065e9cf11471965a161439e20/MarkupSafe-3.0.1-cp312-cp312-win32.whl", hash = "sha256:cbf445eb5628981a80f54087f9acdbf84f9b7d862756110d172993b9a5ae81aa", size = 15113 }, + { url = "https://files.pythonhosted.org/packages/eb/24/a36dc37365bdd358b1e583cc40475593e36ab02cb7da6b3d0b9c05b0da7a/MarkupSafe-3.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:a10860e00ded1dd0a65b83e717af28845bb7bd16d8ace40fe5531491de76b79f", size = 15611 }, + { url = "https://files.pythonhosted.org/packages/b1/60/4572a8aa1beccbc24b133aa0670781a5d2697f4fa3fecf0a87b46383174b/MarkupSafe-3.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e81c52638315ff4ac1b533d427f50bc0afc746deb949210bc85f05d4f15fd772", size = 14325 }, + { url = "https://files.pythonhosted.org/packages/38/42/849915b99a765ec104bfd07ee933de5fc9c58fa9570efa7db81717f495d8/MarkupSafe-3.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:312387403cd40699ab91d50735ea7a507b788091c416dd007eac54434aee51da", size = 12373 }, + { url = "https://files.pythonhosted.org/packages/ef/82/4caaebd963c6d60b28e4445f38841d24f8b49bc10594a09956c9d73bfc08/MarkupSafe-3.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ae99f31f47d849758a687102afdd05bd3d3ff7dbab0a8f1587981b58a76152a", size = 24059 }, + { url = "https://files.pythonhosted.org/packages/20/15/6b319be2f79fcfa3173f479d69f4e950b5c9b642db4f22cf73ae5ade745f/MarkupSafe-3.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c97ff7fedf56d86bae92fa0a646ce1a0ec7509a7578e1ed238731ba13aabcd1c", size = 23211 }, + { url = "https://files.pythonhosted.org/packages/9d/3f/8963bdf4962feb2154475acb7dc350f04217b5e0be7763a39b432291e229/MarkupSafe-3.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7420ceda262dbb4b8d839a4ec63d61c261e4e77677ed7c66c99f4e7cb5030dd", size = 23095 }, + { url = "https://files.pythonhosted.org/packages/af/93/f770bc70953d32de0c6ce4bcb76271512123a1ead91aaef625a020c5bfaf/MarkupSafe-3.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:45d42d132cff577c92bfba536aefcfea7e26efb975bd455db4e6602f5c9f45e7", size = 23901 }, + { url = "https://files.pythonhosted.org/packages/11/92/1e5a33aa0a1190161238628fb68eb1bc5e67b56a5c89f0636328704b463a/MarkupSafe-3.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:4c8817557d0de9349109acb38b9dd570b03cc5014e8aabf1cbddc6e81005becd", size = 23463 }, + { url = "https://files.pythonhosted.org/packages/0d/fe/657efdfe385d2a3a701f2c4fcc9577c63c438aeefdd642d0d956c4ecd225/MarkupSafe-3.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6a54c43d3ec4cf2a39f4387ad044221c66a376e58c0d0e971d47c475ba79c6b5", size = 23569 }, + { url = "https://files.pythonhosted.org/packages/cf/24/587dea40304046ace60f846cedaebc0d33d967a3ce46c11395a10e7a78ba/MarkupSafe-3.0.1-cp313-cp313-win32.whl", hash = "sha256:c91b394f7601438ff79a4b93d16be92f216adb57d813a78be4446fe0f6bc2d8c", size = 15117 }, + { url = "https://files.pythonhosted.org/packages/32/8f/d8961d633f26a011b4fe054f3bfff52f673423b8c431553268741dfb089e/MarkupSafe-3.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:fe32482b37b4b00c7a52a07211b479653b7fe4f22b2e481b9a9b099d8a430f2f", size = 15613 }, + { url = "https://files.pythonhosted.org/packages/9e/93/d6367ffbcd0c5c371370767f768eaa32af60bc411245b8517e383c6a2b12/MarkupSafe-3.0.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:17b2aea42a7280db02ac644db1d634ad47dcc96faf38ab304fe26ba2680d359a", size = 14563 }, + { url = "https://files.pythonhosted.org/packages/4a/37/f813c3835747dec08fe19ac9b9eced01fdf93a4b3e626521675dc7f423a9/MarkupSafe-3.0.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:852dc840f6d7c985603e60b5deaae1d89c56cb038b577f6b5b8c808c97580f1d", size = 12505 }, + { url = "https://files.pythonhosted.org/packages/72/bf/800b4d1580298ca91ccd6c95915bbd147142dad1b8cf91d57b93b28670dd/MarkupSafe-3.0.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0778de17cff1acaeccc3ff30cd99a3fd5c50fc58ad3d6c0e0c4c58092b859396", size = 25358 }, + { url = "https://files.pythonhosted.org/packages/fd/78/26e209abc8f0a379f031f0acc151231974e5b153d7eda5759d17d8f329f2/MarkupSafe-3.0.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:800100d45176652ded796134277ecb13640c1a537cad3b8b53da45aa96330453", size = 23797 }, + { url = "https://files.pythonhosted.org/packages/09/e1/918496a9390891756efee818880e71c1bbaf587f4dc8ede3f3852357310a/MarkupSafe-3.0.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d06b24c686a34c86c8c1fba923181eae6b10565e4d80bdd7bc1c8e2f11247aa4", size = 23743 }, + { url = "https://files.pythonhosted.org/packages/cd/c6/26f576cd58d6c2decd9045e4e3f3c5dbc01ea6cb710916e7bbb6ebd95b6b/MarkupSafe-3.0.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:33d1c36b90e570ba7785dacd1faaf091203d9942bc036118fab8110a401eb1a8", size = 25076 }, + { url = "https://files.pythonhosted.org/packages/b5/fa/10b24fb3b0e15fe5389dc88ecc6226ede08297e0ba7130610efbe0cdfb27/MarkupSafe-3.0.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:beeebf760a9c1f4c07ef6a53465e8cfa776ea6a2021eda0d0417ec41043fe984", size = 24037 }, + { url = "https://files.pythonhosted.org/packages/c8/81/4b3f5537d9f6cc4f5c80d6c4b78af9a5247fd37b5aba95807b2cbc336b9a/MarkupSafe-3.0.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:bbde71a705f8e9e4c3e9e33db69341d040c827c7afa6789b14c6e16776074f5a", size = 24015 }, + { url = "https://files.pythonhosted.org/packages/5f/07/8e8dcecd53216c5e01a51e84c32a2bce166690ed19c184774b38cd41921d/MarkupSafe-3.0.1-cp313-cp313t-win32.whl", hash = "sha256:82b5dba6eb1bcc29cc305a18a3c5365d2af06ee71b123216416f7e20d2a84e5b", size = 15213 }, + { url = "https://files.pythonhosted.org/packages/0d/87/4c364e0f109eea2402079abecbe33fef4f347b551a11423d1f4e187ea497/MarkupSafe-3.0.1-cp313-cp313t-win_amd64.whl", hash = "sha256:730d86af59e0e43ce277bb83970530dd223bf7f2a838e086b50affa6ec5f9295", size = 15741 }, ] [[package]] @@ -820,16 +770,16 @@ wheels = [ [[package]] name = "mkdocs-autorefs" -version = "1.4.1" +version = "1.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown" }, { name = "markupsafe" }, { name = "mkdocs" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c2/44/140469d87379c02f1e1870315f3143718036a983dd0416650827b8883192/mkdocs_autorefs-1.4.1.tar.gz", hash = "sha256:4b5b6235a4becb2b10425c2fa191737e415b37aa3418919db33e5d774c9db079", size = 4131355 } +sdist = { url = "https://files.pythonhosted.org/packages/fb/ae/0f1154c614d6a8b8a36fff084e5b82af3a15f7d2060cf0dcdb1c53297a71/mkdocs_autorefs-1.2.0.tar.gz", hash = "sha256:a86b93abff653521bda71cf3fc5596342b7a23982093915cb74273f67522190f", size = 40262 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f8/29/1125f7b11db63e8e32bcfa0752a4eea30abff3ebd0796f808e14571ddaa2/mkdocs_autorefs-1.4.1-py3-none-any.whl", hash = "sha256:9793c5ac06a6ebbe52ec0f8439256e66187badf4b5334b5fde0b128ec134df4f", size = 5782047 }, + { url = "https://files.pythonhosted.org/packages/71/26/4d39d52ea2219604053a4d05b98e90d6a335511cc01806436ec4886b1028/mkdocs_autorefs-1.2.0-py3-none-any.whl", hash = "sha256:d588754ae89bd0ced0c70c06f58566a4ee43471eeeee5202427da7de9ef85a2f", size = 16522 }, ] [[package]] @@ -848,19 +798,19 @@ wheels = [ [[package]] name = "mkdocs-git-authors-plugin" -version = "0.9.4" +version = "0.9.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mkdocs" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/87/9a/063c4a3688e4669eb2054e4bf6e9cc582f6c1d85674e3f5b836ceff97c3b/mkdocs_git_authors_plugin-0.9.4.tar.gz", hash = "sha256:f5cfaf93d08981ce25591bbaf642051ed168c3886bb96ecd2dca53f0ef1973b8", size = 21914 } +sdist = { url = "https://files.pythonhosted.org/packages/ac/03/99e18d62964d268eb9a866f42c9d53b43cde903a7fb436da85e396945a02/mkdocs_git_authors_plugin-0.9.0.tar.gz", hash = "sha256:6161f63b87064481a48d9ad01c23e43c3e758930c3a9cc167fe482909ceb9eac", size = 20268 } wheels = [ - { url = "https://files.pythonhosted.org/packages/5c/ac/2b5bae4047276fda2bdd14a6d4af59288fb4d5de54151ae4e6ba17611ceb/mkdocs_git_authors_plugin-0.9.4-py3-none-any.whl", hash = "sha256:84b9b56c703841189c64d8ff6947034fe0a9c14a0a8f1f6255edfcfe3a56825f", size = 20752 }, + { url = "https://files.pythonhosted.org/packages/46/ad/a6e0ce34a1d9abe35844cdc3a64028d3df7bfe24b143021f7fcaa26adfdd/mkdocs_git_authors_plugin-0.9.0-py3-none-any.whl", hash = "sha256:380730a05eeb947a7e84be05fdb1c5ae2a7bc70fd9f6eda941f187c87ae37052", size = 19204 }, ] [[package]] name = "mkdocs-git-revision-date-localized-plugin" -version = "1.4.5" +version = "1.2.9" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "babel" }, @@ -868,18 +818,17 @@ dependencies = [ { name = "mkdocs" }, { name = "pytz" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3c/93/3987505121a9b596b05c8a38054b587cfe0d78a1a3e92144204f2c45722b/mkdocs_git_revision_date_localized_plugin-1.4.5.tar.gz", hash = "sha256:9e37f1343d314c9cd8f9cbbf117c4bdc1d2d24a0653c5bbd7059d072f2cd0972", size = 450263 } +sdist = { url = "https://files.pythonhosted.org/packages/05/79/56c755035c893af33c3ba29c5100835d10cd98b4b6943f8d1c22a7d56936/mkdocs_git_revision_date_localized_plugin-1.2.9.tar.gz", hash = "sha256:df9a50873fba3a42ce9123885f8c53d589e90ef6c2443fe3280ef1e8d33c8f65", size = 384360 } wheels = [ - { url = "https://files.pythonhosted.org/packages/da/c0/b63cb3008564242a3d1ba7a6dd6dc29d7fb297e65bda93cef655780757af/mkdocs_git_revision_date_localized_plugin-1.4.5-py3-none-any.whl", hash = "sha256:395ae0b9eec565c78a76fffc938b70f52774bf2971245482d31aba47018c5fa9", size = 25284 }, + { url = "https://files.pythonhosted.org/packages/bb/05/0edbbd3a0be3033c44d5cd9f1ac7646da2e7e3911513cc56a25aac9266a4/mkdocs_git_revision_date_localized_plugin-1.2.9-py3-none-any.whl", hash = "sha256:dea5c8067c23df30275702a1708885500fadf0abfb595b60e698bffc79c7a423", size = 22475 }, ] [[package]] name = "mkdocs-material" -version = "9.6.10" +version = "9.5.40" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "babel" }, - { name = "backrefs" }, { name = "colorama" }, { name = "jinja2" }, { name = "markdown" }, @@ -888,11 +837,12 @@ dependencies = [ { name = "paginate" }, { name = "pygments" }, { name = "pymdown-extensions" }, + { name = "regex" }, { name = "requests" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e6/fc/f42c09e3fe13d48193edf22a63484186b0be67a73fc006eab389bf47d66f/mkdocs_material-9.6.10.tar.gz", hash = "sha256:25a453c1f24f34fcf1f53680c03d2c1421b52ce5247f4468153c87a70cd5f1fc", size = 3951725 } +sdist = { url = "https://files.pythonhosted.org/packages/b8/2b/6f9e0b9573a4acfa15834a30eca48ad578fe6ab46afa072df5ff05103a86/mkdocs_material-9.5.40.tar.gz", hash = "sha256:b69d70e667ec51fc41f65e006a3184dd00d95b2439d982cb1586e4c018943156", size = 3963129 } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/2f/e210215a3c2918739096ff7bf71a3cf32b7d8d1dfd5ceff8a82e2741dc16/mkdocs_material-9.6.10-py3-none-any.whl", hash = "sha256:36168548df4e2ddeb9a334ddae4ab9c388ccfea4dd50ffee657d22b93dcb1c3e", size = 8703722 }, + { url = "https://files.pythonhosted.org/packages/2c/ad/f8039114a23cfb02213f133a1dc8865522128a0b2cb251a7e717de8aa979/mkdocs_material-9.5.40-py3-none-any.whl", hash = "sha256:8e7a16ada34e79a7b6459ff2602584222f522c738b6a023d1bea853d5049da6f", size = 8670419 }, ] [package.optional-dependencies] @@ -912,31 +862,33 @@ wheels = [ [[package]] name = "mkdocs-redirects" -version = "1.2.2" +version = "1.2.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mkdocs" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f1/a8/6d44a6cf07e969c7420cb36ab287b0669da636a2044de38a7d2208d5a758/mkdocs_redirects-1.2.2.tar.gz", hash = "sha256:3094981b42ffab29313c2c1b8ac3969861109f58b2dd58c45fc81cd44bfa0095", size = 7162 } +sdist = { url = "https://files.pythonhosted.org/packages/04/6a/50edd7ad78042b25c379aac7e8fa9cc34c6f55e3d2c03eb28814a9446617/mkdocs-redirects-1.2.1.tar.gz", hash = "sha256:9420066d70e2a6bb357adf86e67023dcdca1857f97f07c7fe450f8f1fb42f861", size = 6653 } wheels = [ - { url = "https://files.pythonhosted.org/packages/c4/ec/38443b1f2a3821bbcb24e46cd8ba979154417794d54baf949fefde1c2146/mkdocs_redirects-1.2.2-py3-none-any.whl", hash = "sha256:7dbfa5647b79a3589da4401403d69494bd1f4ad03b9c15136720367e1f340ed5", size = 6142 }, + { url = "https://files.pythonhosted.org/packages/d3/9d/93a881fc5a23c50a4dd4a41dfd3d2a8403aa1dac52370ef43b7b336577a0/mkdocs_redirects-1.2.1-py3-none-any.whl", hash = "sha256:497089f9e0219e7389304cffefccdfa1cac5ff9509f2cb706f4c9b221726dffb", size = 6024 }, ] [[package]] name = "mkdocstrings" -version = "0.29.0" +version = "0.26.1" source = { registry = "https://pypi.org/simple" } dependencies = [ + { name = "click" }, { name = "jinja2" }, { name = "markdown" }, { name = "markupsafe" }, { name = "mkdocs" }, { name = "mkdocs-autorefs" }, + { name = "platformdirs" }, { name = "pymdown-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8e/4d/a9484dc5d926295bdf308f1f6c4f07fcc99735b970591edc414d401fcc91/mkdocstrings-0.29.0.tar.gz", hash = "sha256:3657be1384543ce0ee82112c3e521bbf48e41303aa0c229b9ffcccba057d922e", size = 1212185 } +sdist = { url = "https://files.pythonhosted.org/packages/e6/bf/170ff04de72227f715d67da32950c7b8434449f3805b2ec3dd1085db4d7c/mkdocstrings-0.26.1.tar.gz", hash = "sha256:bb8b8854d6713d5348ad05b069a09f3b79edbc6a0f33a34c6821141adb03fe33", size = 92677 } wheels = [ - { url = "https://files.pythonhosted.org/packages/15/47/eb876dfd84e48f31ff60897d161b309cf6a04ca270155b0662aae562b3fb/mkdocstrings-0.29.0-py3-none-any.whl", hash = "sha256:8ea98358d2006f60befa940fdebbbc88a26b37ecbcded10be726ba359284f73d", size = 1630824 }, + { url = "https://files.pythonhosted.org/packages/23/cc/8ba127aaee5d1e9046b0d33fa5b3d17da95a9d705d44902792e0569257fd/mkdocstrings-0.26.1-py3-none-any.whl", hash = "sha256:29738bfb72b4608e8e55cc50fb8a54f325dc7ebd2014e4e3881a49892d5983cf", size = 29643 }, ] [package.optional-dependencies] @@ -946,16 +898,16 @@ python = [ [[package]] name = "mkdocstrings-python" -version = "1.16.8" +version = "1.11.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "griffe" }, { name = "mkdocs-autorefs" }, { name = "mkdocstrings" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8e/b8/62190ea298fdb1e84670ef548590748c633ab4e05b35bcf902e89f2f28c6/mkdocstrings_python-1.16.8.tar.gz", hash = "sha256:9453ccae69be103810c1cf6435ce71c8f714ae37fef4d87d16aa92a7c800fe1d", size = 205119 } +sdist = { url = "https://files.pythonhosted.org/packages/fc/ba/534c934cd0a809f51c91332d6ed278782ee4126b8ba8db02c2003f162b47/mkdocstrings_python-1.11.1.tar.gz", hash = "sha256:8824b115c5359304ab0b5378a91f6202324a849e1da907a3485b59208b797322", size = 166890 } wheels = [ - { url = "https://files.pythonhosted.org/packages/67/d0/ef6e82f7a68c7ac02e1a01815fbe88773f4f9e40728ed35bd1664a5d76f2/mkdocstrings_python-1.16.8-py3-none-any.whl", hash = "sha256:211b7aaf776cd45578ecb531e5ad0d3a35a8be9101a6bfa10de38a69af9d8fd8", size = 124116 }, + { url = "https://files.pythonhosted.org/packages/2f/f2/2a2c48fda645ac6bbe73bcc974587a579092b6868e6ff8bc6d177f4db38a/mkdocstrings_python-1.11.1-py3-none-any.whl", hash = "sha256:a21a1c05acef129a618517bb5aae3e33114f569b11588b1e7af3e9d4061a71af", size = 109297 }, ] [[package]] @@ -1014,97 +966,91 @@ wheels = [ [[package]] name = "numpy" -version = "2.2.4" +version = "2.1.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e1/78/31103410a57bc2c2b93a3597340a8119588571f6a4539067546cb9a0bfac/numpy-2.2.4.tar.gz", hash = "sha256:9ba03692a45d3eef66559efe1d1096c4b9b75c0986b5dff5530c378fb8331d4f", size = 20270701 } +sdist = { url = "https://files.pythonhosted.org/packages/4b/d1/8a730ea07f4a37d94f9172f4ce1d81064b7a64766b460378be278952de75/numpy-2.1.2.tar.gz", hash = "sha256:13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c", size = 18878063 } wheels = [ - { url = "https://files.pythonhosted.org/packages/16/fb/09e778ee3a8ea0d4dc8329cca0a9c9e65fed847d08e37eba74cb7ed4b252/numpy-2.2.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e9e0a277bb2eb5d8a7407e14688b85fd8ad628ee4e0c7930415687b6564207a4", size = 21254989 }, - { url = "https://files.pythonhosted.org/packages/a2/0a/1212befdbecab5d80eca3cde47d304cad986ad4eec7d85a42e0b6d2cc2ef/numpy-2.2.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9eeea959168ea555e556b8188da5fa7831e21d91ce031e95ce23747b7609f8a4", size = 14425910 }, - { url = "https://files.pythonhosted.org/packages/2b/3e/e7247c1d4f15086bb106c8d43c925b0b2ea20270224f5186fa48d4fb5cbd/numpy-2.2.4-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:bd3ad3b0a40e713fc68f99ecfd07124195333f1e689387c180813f0e94309d6f", size = 5426490 }, - { url = "https://files.pythonhosted.org/packages/5d/fa/aa7cd6be51419b894c5787a8a93c3302a1ed4f82d35beb0613ec15bdd0e2/numpy-2.2.4-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:cf28633d64294969c019c6df4ff37f5698e8326db68cc2b66576a51fad634880", size = 6967754 }, - { url = "https://files.pythonhosted.org/packages/d5/ee/96457c943265de9fadeb3d2ffdbab003f7fba13d971084a9876affcda095/numpy-2.2.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fa8fa7697ad1646b5c93de1719965844e004fcad23c91228aca1cf0800044a1", size = 14373079 }, - { url = "https://files.pythonhosted.org/packages/c5/5c/ceefca458559f0ccc7a982319f37ed07b0d7b526964ae6cc61f8ad1b6119/numpy-2.2.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4162988a360a29af158aeb4a2f4f09ffed6a969c9776f8f3bdee9b06a8ab7e5", size = 16428819 }, - { url = "https://files.pythonhosted.org/packages/22/31/9b2ac8eee99e001eb6add9fa27514ef5e9faf176169057a12860af52704c/numpy-2.2.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:892c10d6a73e0f14935c31229e03325a7b3093fafd6ce0af704be7f894d95687", size = 15881470 }, - { url = "https://files.pythonhosted.org/packages/f0/dc/8569b5f25ff30484b555ad8a3f537e0225d091abec386c9420cf5f7a2976/numpy-2.2.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db1f1c22173ac1c58db249ae48aa7ead29f534b9a948bc56828337aa84a32ed6", size = 18218144 }, - { url = "https://files.pythonhosted.org/packages/5e/05/463c023a39bdeb9bb43a99e7dee2c664cb68d5bb87d14f92482b9f6011cc/numpy-2.2.4-cp311-cp311-win32.whl", hash = "sha256:ea2bb7e2ae9e37d96835b3576a4fa4b3a97592fbea8ef7c3587078b0068b8f09", size = 6606368 }, - { url = "https://files.pythonhosted.org/packages/8b/72/10c1d2d82101c468a28adc35de6c77b308f288cfd0b88e1070f15b98e00c/numpy-2.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:f7de08cbe5551911886d1ab60de58448c6df0f67d9feb7d1fb21e9875ef95e91", size = 12947526 }, - { url = "https://files.pythonhosted.org/packages/a2/30/182db21d4f2a95904cec1a6f779479ea1ac07c0647f064dea454ec650c42/numpy-2.2.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a7b9084668aa0f64e64bd00d27ba5146ef1c3a8835f3bd912e7a9e01326804c4", size = 20947156 }, - { url = "https://files.pythonhosted.org/packages/24/6d/9483566acfbda6c62c6bc74b6e981c777229d2af93c8eb2469b26ac1b7bc/numpy-2.2.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:dbe512c511956b893d2dacd007d955a3f03d555ae05cfa3ff1c1ff6df8851854", size = 14133092 }, - { url = "https://files.pythonhosted.org/packages/27/f6/dba8a258acbf9d2bed2525cdcbb9493ef9bae5199d7a9cb92ee7e9b2aea6/numpy-2.2.4-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:bb649f8b207ab07caebba230d851b579a3c8711a851d29efe15008e31bb4de24", size = 5163515 }, - { url = "https://files.pythonhosted.org/packages/62/30/82116199d1c249446723c68f2c9da40d7f062551036f50b8c4caa42ae252/numpy-2.2.4-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:f34dc300df798742b3d06515aa2a0aee20941c13579d7a2f2e10af01ae4901ee", size = 6696558 }, - { url = "https://files.pythonhosted.org/packages/0e/b2/54122b3c6df5df3e87582b2e9430f1bdb63af4023c739ba300164c9ae503/numpy-2.2.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3f7ac96b16955634e223b579a3e5798df59007ca43e8d451a0e6a50f6bfdfba", size = 14084742 }, - { url = "https://files.pythonhosted.org/packages/02/e2/e2cbb8d634151aab9528ef7b8bab52ee4ab10e076509285602c2a3a686e0/numpy-2.2.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f92084defa704deadd4e0a5ab1dc52d8ac9e8a8ef617f3fbb853e79b0ea3592", size = 16134051 }, - { url = "https://files.pythonhosted.org/packages/8e/21/efd47800e4affc993e8be50c1b768de038363dd88865920439ef7b422c60/numpy-2.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7a4e84a6283b36632e2a5b56e121961f6542ab886bc9e12f8f9818b3c266bfbb", size = 15578972 }, - { url = "https://files.pythonhosted.org/packages/04/1e/f8bb88f6157045dd5d9b27ccf433d016981032690969aa5c19e332b138c0/numpy-2.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:11c43995255eb4127115956495f43e9343736edb7fcdb0d973defd9de14cd84f", size = 17898106 }, - { url = "https://files.pythonhosted.org/packages/2b/93/df59a5a3897c1f036ae8ff845e45f4081bb06943039ae28a3c1c7c780f22/numpy-2.2.4-cp312-cp312-win32.whl", hash = "sha256:65ef3468b53269eb5fdb3a5c09508c032b793da03251d5f8722b1194f1790c00", size = 6311190 }, - { url = "https://files.pythonhosted.org/packages/46/69/8c4f928741c2a8efa255fdc7e9097527c6dc4e4df147e3cadc5d9357ce85/numpy-2.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:2aad3c17ed2ff455b8eaafe06bcdae0062a1db77cb99f4b9cbb5f4ecb13c5146", size = 12644305 }, - { url = "https://files.pythonhosted.org/packages/2a/d0/bd5ad792e78017f5decfb2ecc947422a3669a34f775679a76317af671ffc/numpy-2.2.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cf4e5c6a278d620dee9ddeb487dc6a860f9b199eadeecc567f777daace1e9e7", size = 20933623 }, - { url = "https://files.pythonhosted.org/packages/c3/bc/2b3545766337b95409868f8e62053135bdc7fa2ce630aba983a2aa60b559/numpy-2.2.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1974afec0b479e50438fc3648974268f972e2d908ddb6d7fb634598cdb8260a0", size = 14148681 }, - { url = "https://files.pythonhosted.org/packages/6a/70/67b24d68a56551d43a6ec9fe8c5f91b526d4c1a46a6387b956bf2d64744e/numpy-2.2.4-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:79bd5f0a02aa16808fcbc79a9a376a147cc1045f7dfe44c6e7d53fa8b8a79392", size = 5148759 }, - { url = "https://files.pythonhosted.org/packages/1c/8b/e2fc8a75fcb7be12d90b31477c9356c0cbb44abce7ffb36be39a0017afad/numpy-2.2.4-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:3387dd7232804b341165cedcb90694565a6015433ee076c6754775e85d86f1fc", size = 6683092 }, - { url = "https://files.pythonhosted.org/packages/13/73/41b7b27f169ecf368b52533edb72e56a133f9e86256e809e169362553b49/numpy-2.2.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f527d8fdb0286fd2fd97a2a96c6be17ba4232da346931d967a0630050dfd298", size = 14081422 }, - { url = "https://files.pythonhosted.org/packages/4b/04/e208ff3ae3ddfbafc05910f89546382f15a3f10186b1f56bd99f159689c2/numpy-2.2.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bce43e386c16898b91e162e5baaad90c4b06f9dcbe36282490032cec98dc8ae7", size = 16132202 }, - { url = "https://files.pythonhosted.org/packages/fe/bc/2218160574d862d5e55f803d88ddcad88beff94791f9c5f86d67bd8fbf1c/numpy-2.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:31504f970f563d99f71a3512d0c01a645b692b12a63630d6aafa0939e52361e6", size = 15573131 }, - { url = "https://files.pythonhosted.org/packages/a5/78/97c775bc4f05abc8a8426436b7cb1be806a02a2994b195945600855e3a25/numpy-2.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:81413336ef121a6ba746892fad881a83351ee3e1e4011f52e97fba79233611fd", size = 17894270 }, - { url = "https://files.pythonhosted.org/packages/b9/eb/38c06217a5f6de27dcb41524ca95a44e395e6a1decdc0c99fec0832ce6ae/numpy-2.2.4-cp313-cp313-win32.whl", hash = "sha256:f486038e44caa08dbd97275a9a35a283a8f1d2f0ee60ac260a1790e76660833c", size = 6308141 }, - { url = "https://files.pythonhosted.org/packages/52/17/d0dd10ab6d125c6d11ffb6dfa3423c3571befab8358d4f85cd4471964fcd/numpy-2.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:207a2b8441cc8b6a2a78c9ddc64d00d20c303d79fba08c577752f080c4007ee3", size = 12636885 }, - { url = "https://files.pythonhosted.org/packages/fa/e2/793288ede17a0fdc921172916efb40f3cbc2aa97e76c5c84aba6dc7e8747/numpy-2.2.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:8120575cb4882318c791f839a4fd66161a6fa46f3f0a5e613071aae35b5dd8f8", size = 20961829 }, - { url = "https://files.pythonhosted.org/packages/3a/75/bb4573f6c462afd1ea5cbedcc362fe3e9bdbcc57aefd37c681be1155fbaa/numpy-2.2.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a761ba0fa886a7bb33c6c8f6f20213735cb19642c580a931c625ee377ee8bd39", size = 14161419 }, - { url = "https://files.pythonhosted.org/packages/03/68/07b4cd01090ca46c7a336958b413cdbe75002286295f2addea767b7f16c9/numpy-2.2.4-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:ac0280f1ba4a4bfff363a99a6aceed4f8e123f8a9b234c89140f5e894e452ecd", size = 5196414 }, - { url = "https://files.pythonhosted.org/packages/a5/fd/d4a29478d622fedff5c4b4b4cedfc37a00691079623c0575978d2446db9e/numpy-2.2.4-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:879cf3a9a2b53a4672a168c21375166171bc3932b7e21f622201811c43cdd3b0", size = 6709379 }, - { url = "https://files.pythonhosted.org/packages/41/78/96dddb75bb9be730b87c72f30ffdd62611aba234e4e460576a068c98eff6/numpy-2.2.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f05d4198c1bacc9124018109c5fba2f3201dbe7ab6e92ff100494f236209c960", size = 14051725 }, - { url = "https://files.pythonhosted.org/packages/00/06/5306b8199bffac2a29d9119c11f457f6c7d41115a335b78d3f86fad4dbe8/numpy-2.2.4-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2f085ce2e813a50dfd0e01fbfc0c12bbe5d2063d99f8b29da30e544fb6483b8", size = 16101638 }, - { url = "https://files.pythonhosted.org/packages/fa/03/74c5b631ee1ded596945c12027649e6344614144369fd3ec1aaced782882/numpy-2.2.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:92bda934a791c01d6d9d8e038363c50918ef7c40601552a58ac84c9613a665bc", size = 15571717 }, - { url = "https://files.pythonhosted.org/packages/cb/dc/4fc7c0283abe0981e3b89f9b332a134e237dd476b0c018e1e21083310c31/numpy-2.2.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ee4d528022f4c5ff67332469e10efe06a267e32f4067dc76bb7e2cddf3cd25ff", size = 17879998 }, - { url = "https://files.pythonhosted.org/packages/e5/2b/878576190c5cfa29ed896b518cc516aecc7c98a919e20706c12480465f43/numpy-2.2.4-cp313-cp313t-win32.whl", hash = "sha256:05c076d531e9998e7e694c36e8b349969c56eadd2cdcd07242958489d79a7286", size = 6366896 }, - { url = "https://files.pythonhosted.org/packages/3e/05/eb7eec66b95cf697f08c754ef26c3549d03ebd682819f794cb039574a0a6/numpy-2.2.4-cp313-cp313t-win_amd64.whl", hash = "sha256:188dcbca89834cc2e14eb2f106c96d6d46f200fe0200310fc29089657379c58d", size = 12739119 }, + { url = "https://files.pythonhosted.org/packages/aa/9c/9a6ec3ae89cd0648d419781284308f2956d2a61d932b5ac9682c956a171b/numpy-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b42a1a511c81cc78cbc4539675713bbcf9d9c3913386243ceff0e9429ca892fe", size = 21154845 }, + { url = "https://files.pythonhosted.org/packages/02/69/9f05c4ecc75fabf297b17743996371b4c3dfc4d92e15c5c38d8bb3db8d74/numpy-2.1.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:faa88bc527d0f097abdc2c663cddf37c05a1c2f113716601555249805cf573f1", size = 13789409 }, + { url = "https://files.pythonhosted.org/packages/34/4e/f95c99217bf77bbfaaf660d693c10bd0dc03b6032d19316d316088c9e479/numpy-2.1.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:c82af4b2ddd2ee72d1fc0c6695048d457e00b3582ccde72d8a1c991b808bb20f", size = 5352097 }, + { url = "https://files.pythonhosted.org/packages/06/13/f5d87a497c16658e9af8920449b0b5692b469586b8231340c672962071c5/numpy-2.1.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:13602b3174432a35b16c4cfb5de9a12d229727c3dd47a6ce35111f2ebdf66ff4", size = 6891195 }, + { url = "https://files.pythonhosted.org/packages/6c/89/691ac07429ac061b344d5e37fa8e94be51a6017734aea15f2d9d7c6d119a/numpy-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ebec5fd716c5a5b3d8dfcc439be82a8407b7b24b230d0ad28a81b61c2f4659a", size = 13895153 }, + { url = "https://files.pythonhosted.org/packages/23/69/538317f0d925095537745f12aced33be1570bbdc4acde49b33748669af96/numpy-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2b49c3c0804e8ecb05d59af8386ec2f74877f7ca8fd9c1e00be2672e4d399b1", size = 16338306 }, + { url = "https://files.pythonhosted.org/packages/af/03/863fe7062c2106d3c151f7df9353f2ae2237c1dd6900f127a3eb1f24cb1b/numpy-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2cbba4b30bf31ddbe97f1c7205ef976909a93a66bb1583e983adbd155ba72ac2", size = 16710893 }, + { url = "https://files.pythonhosted.org/packages/70/77/0ad9efe25482009873f9660d29a40a8c41a6f0e8b541195e3c95c70684c5/numpy-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8e00ea6fc82e8a804433d3e9cedaa1051a1422cb6e443011590c14d2dea59146", size = 14398048 }, + { url = "https://files.pythonhosted.org/packages/3e/0f/e785fe75544db9f2b0bb1c181e13ceff349ce49753d807fd9672916aa06d/numpy-2.1.2-cp311-cp311-win32.whl", hash = "sha256:5006b13a06e0b38d561fab5ccc37581f23c9511879be7693bd33c7cd15ca227c", size = 6533458 }, + { url = "https://files.pythonhosted.org/packages/d4/96/450054662295125af861d48d2c4bc081dadcf1974a879b2104613157aa62/numpy-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:f1eb068ead09f4994dec71c24b2844f1e4e4e013b9629f812f292f04bd1510d9", size = 12870896 }, + { url = "https://files.pythonhosted.org/packages/a0/7d/554a6838f37f3ada5a55f25173c619d556ae98092a6e01afb6e710501d70/numpy-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7bf0a4f9f15b32b5ba53147369e94296f5fffb783db5aacc1be15b4bf72f43b", size = 20848077 }, + { url = "https://files.pythonhosted.org/packages/b0/29/cb48a402ea879e645b16218718f3f7d9588a77d674a9dcf22e4c43487636/numpy-2.1.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b1d0fcae4f0949f215d4632be684a539859b295e2d0cb14f78ec231915d644db", size = 13493242 }, + { url = "https://files.pythonhosted.org/packages/56/44/f899b0581766c230da42f751b7b8896d096640b19b312164c267e48d36cb/numpy-2.1.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:f751ed0a2f250541e19dfca9f1eafa31a392c71c832b6bb9e113b10d050cb0f1", size = 5089219 }, + { url = "https://files.pythonhosted.org/packages/79/8f/b987070d45161a7a4504afc67ed38544ed2c0ed5576263599a0402204a9c/numpy-2.1.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:bd33f82e95ba7ad632bc57837ee99dba3d7e006536200c4e9124089e1bf42426", size = 6620167 }, + { url = "https://files.pythonhosted.org/packages/c4/a7/af3329fda3c3ec31d9b650e42bbcd3422fc62a765cbb1405fde4177a0996/numpy-2.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b8cde4f11f0a975d1fd59373b32e2f5a562ade7cde4f85b7137f3de8fbb29a0", size = 13604905 }, + { url = "https://files.pythonhosted.org/packages/9b/b4/e3c7e6fab0f77fff6194afa173d1f2342073d91b1d3b4b30b17c3fb4407a/numpy-2.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d95f286b8244b3649b477ac066c6906fbb2905f8ac19b170e2175d3d799f4df", size = 16041825 }, + { url = "https://files.pythonhosted.org/packages/e9/50/6828e66a78aa03147c111f84d55f33ce2dde547cb578d6744a3b06a0124b/numpy-2.1.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ab4754d432e3ac42d33a269c8567413bdb541689b02d93788af4131018cbf366", size = 16409541 }, + { url = "https://files.pythonhosted.org/packages/bf/72/66af7916d9c3c6dbfbc8acdd4930c65461e1953374a2bc43d00f948f004a/numpy-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e585c8ae871fd38ac50598f4763d73ec5497b0de9a0ab4ef5b69f01c6a046142", size = 14081134 }, + { url = "https://files.pythonhosted.org/packages/dc/5a/59a67d84f33fe00ae74f0b5b69dd4f93a586a4aba7f7e19b54b2133db038/numpy-2.1.2-cp312-cp312-win32.whl", hash = "sha256:9c6c754df29ce6a89ed23afb25550d1c2d5fdb9901d9c67a16e0b16eaf7e2550", size = 6237784 }, + { url = "https://files.pythonhosted.org/packages/4c/79/73735a6a5dad6059c085f240a4e74c9270feccd2bc66e4d31b5ca01d329c/numpy-2.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:456e3b11cb79ac9946c822a56346ec80275eaf2950314b249b512896c0d2505e", size = 12568254 }, + { url = "https://files.pythonhosted.org/packages/16/72/716fa1dbe92395a9a623d5049203ff8ddb0cfce65b9df9117c3696ccc011/numpy-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a84498e0d0a1174f2b3ed769b67b656aa5460c92c9554039e11f20a05650f00d", size = 20834690 }, + { url = "https://files.pythonhosted.org/packages/1e/fb/3e85a39511586053b5c6a59a643879e376fae22230ebfef9cfabb0e032e2/numpy-2.1.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4d6ec0d4222e8ffdab1744da2560f07856421b367928026fb540e1945f2eeeaf", size = 13507474 }, + { url = "https://files.pythonhosted.org/packages/35/eb/5677556d9ba13436dab51e129f98d4829d95cd1b6bd0e199c14485a4bdb9/numpy-2.1.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:259ec80d54999cc34cd1eb8ded513cb053c3bf4829152a2e00de2371bd406f5e", size = 5074742 }, + { url = "https://files.pythonhosted.org/packages/3e/c5/6c5ef5ba41b65a7e51bed50dbf3e1483eb578055633dd013e811a28e96a1/numpy-2.1.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:675c741d4739af2dc20cd6c6a5c4b7355c728167845e3c6b0e824e4e5d36a6c3", size = 6606787 }, + { url = "https://files.pythonhosted.org/packages/08/ac/f2f29dd4fd325b379c7dc932a0ebab22f0e031dbe80b2f6019b291a3a544/numpy-2.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b2d4e667895cc55e3ff2b56077e4c8a5604361fc21a042845ea3ad67465aa8", size = 13601333 }, + { url = "https://files.pythonhosted.org/packages/44/26/63f5f4e5089654dfb858f4892215ed968cd1a68e6f4a83f9961f84f855cb/numpy-2.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:43cca367bf94a14aca50b89e9bc2061683116cfe864e56740e083392f533ce7a", size = 16038090 }, + { url = "https://files.pythonhosted.org/packages/1d/21/015e0594de9c3a8d5edd24943d2bd23f102ec71aec026083f822f86497e2/numpy-2.1.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:76322dcdb16fccf2ac56f99048af32259dcc488d9b7e25b51e5eca5147a3fb98", size = 16410865 }, + { url = "https://files.pythonhosted.org/packages/df/01/c1bcf9e6025d79077fbf3f3ee503b50aa7bfabfcd8f4b54f5829f4c00f3f/numpy-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:32e16a03138cabe0cb28e1007ee82264296ac0983714094380b408097a418cfe", size = 14078077 }, + { url = "https://files.pythonhosted.org/packages/ba/06/db9d127d63bd11591770ba9f3d960f8041e0f895184b9351d4b1b5b56983/numpy-2.1.2-cp313-cp313-win32.whl", hash = "sha256:242b39d00e4944431a3cd2db2f5377e15b5785920421993770cddb89992c3f3a", size = 6234904 }, + { url = "https://files.pythonhosted.org/packages/a9/96/9f61f8f95b6e0ea0aa08633b704c75d1882bdcb331bdf8bfd63263b25b00/numpy-2.1.2-cp313-cp313-win_amd64.whl", hash = "sha256:f2ded8d9b6f68cc26f8425eda5d3877b47343e68ca23d0d0846f4d312ecaa445", size = 12561910 }, + { url = "https://files.pythonhosted.org/packages/36/b8/033f627821784a48e8f75c218033471eebbaacdd933f8979c79637a1b44b/numpy-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ffef621c14ebb0188a8633348504a35c13680d6da93ab5cb86f4e54b7e922b5", size = 20857719 }, + { url = "https://files.pythonhosted.org/packages/96/46/af5726fde5b74ed83f2f17a73386d399319b7ed4d51279fb23b721d0816d/numpy-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:ad369ed238b1959dfbade9018a740fb9392c5ac4f9b5173f420bd4f37ba1f7a0", size = 13518826 }, + { url = "https://files.pythonhosted.org/packages/db/6e/8ce677edf36da1c4dae80afe5529f47690697eb55b4864673af260ccea7b/numpy-2.1.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d82075752f40c0ddf57e6e02673a17f6cb0f8eb3f587f63ca1eaab5594da5b17", size = 5115036 }, + { url = "https://files.pythonhosted.org/packages/6a/ba/3cce44fb1b8438042c11847048812a776f75ee0e7070179c22e4cfbf420c/numpy-2.1.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:1600068c262af1ca9580a527d43dc9d959b0b1d8e56f8a05d830eea39b7c8af6", size = 6628641 }, + { url = "https://files.pythonhosted.org/packages/59/c8/e722998720ccbd35ffbcf1d1b8ed0aa2304af88d3f1c38e06ebf983599b3/numpy-2.1.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a26ae94658d3ba3781d5e103ac07a876b3e9b29db53f68ed7df432fd033358a8", size = 13574803 }, + { url = "https://files.pythonhosted.org/packages/7c/8e/fc1fdd83a55476765329ac2913321c4aed5b082a7915095628c4ca30ea72/numpy-2.1.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13311c2db4c5f7609b462bc0f43d3c465424d25c626d95040f073e30f7570e35", size = 16021174 }, + { url = "https://files.pythonhosted.org/packages/2a/b6/a790742aa88067adb4bd6c89a946778c1417d4deaeafce3ca928f26d4c52/numpy-2.1.2-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:2abbf905a0b568706391ec6fa15161fad0fb5d8b68d73c461b3c1bab6064dd62", size = 16400117 }, + { url = "https://files.pythonhosted.org/packages/48/6f/129e3c17e3befe7fefdeaa6890f4c4df3f3cf0831aa053802c3862da67aa/numpy-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:ef444c57d664d35cac4e18c298c47d7b504c66b17c2ea91312e979fcfbdfb08a", size = 14066202 }, ] [[package]] name = "orjson" -version = "3.10.15" +version = "3.10.12" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ae/f9/5dea21763eeff8c1590076918a446ea3d6140743e0e36f58f369928ed0f4/orjson-3.10.15.tar.gz", hash = "sha256:05ca7fe452a2e9d8d9d706a2984c95b9c2ebc5db417ce0b7a49b91d50642a23e", size = 5282482 } +sdist = { url = "https://files.pythonhosted.org/packages/e0/04/bb9f72987e7f62fb591d6c880c0caaa16238e4e530cbc3bdc84a7372d75f/orjson-3.10.12.tar.gz", hash = "sha256:0a78bbda3aea0f9f079057ee1ee8a1ecf790d4f1af88dd67493c6b8ee52506ff", size = 5438647 } wheels = [ - { url = "https://files.pythonhosted.org/packages/7a/a2/21b25ce4a2c71dbb90948ee81bd7a42b4fbfc63162e57faf83157d5540ae/orjson-3.10.15-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:c4cc83960ab79a4031f3119cc4b1a1c627a3dc09df125b27c4201dff2af7eaa6", size = 249533 }, - { url = "https://files.pythonhosted.org/packages/b2/85/2076fc12d8225698a51278009726750c9c65c846eda741e77e1761cfef33/orjson-3.10.15-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddbeef2481d895ab8be5185f2432c334d6dec1f5d1933a9c83014d188e102cef", size = 125230 }, - { url = "https://files.pythonhosted.org/packages/06/df/a85a7955f11274191eccf559e8481b2be74a7c6d43075d0a9506aa80284d/orjson-3.10.15-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9e590a0477b23ecd5b0ac865b1b907b01b3c5535f5e8a8f6ab0e503efb896334", size = 150148 }, - { url = "https://files.pythonhosted.org/packages/37/b3/94c55625a29b8767c0eed194cb000b3787e3c23b4cdd13be17bae6ccbb4b/orjson-3.10.15-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a6be38bd103d2fd9bdfa31c2720b23b5d47c6796bcb1d1b598e3924441b4298d", size = 139749 }, - { url = "https://files.pythonhosted.org/packages/53/ba/c608b1e719971e8ddac2379f290404c2e914cf8e976369bae3cad88768b1/orjson-3.10.15-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ff4f6edb1578960ed628a3b998fa54d78d9bb3e2eb2cfc5c2a09732431c678d0", size = 154558 }, - { url = "https://files.pythonhosted.org/packages/b2/c4/c1fb835bb23ad788a39aa9ebb8821d51b1c03588d9a9e4ca7de5b354fdd5/orjson-3.10.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0482b21d0462eddd67e7fce10b89e0b6ac56570424662b685a0d6fccf581e13", size = 130349 }, - { url = "https://files.pythonhosted.org/packages/78/14/bb2b48b26ab3c570b284eb2157d98c1ef331a8397f6c8bd983b270467f5c/orjson-3.10.15-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bb5cc3527036ae3d98b65e37b7986a918955f85332c1ee07f9d3f82f3a6899b5", size = 138513 }, - { url = "https://files.pythonhosted.org/packages/4a/97/d5b353a5fe532e92c46467aa37e637f81af8468aa894cd77d2ec8a12f99e/orjson-3.10.15-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d569c1c462912acdd119ccbf719cf7102ea2c67dd03b99edcb1a3048651ac96b", size = 130942 }, - { url = "https://files.pythonhosted.org/packages/b5/5d/a067bec55293cca48fea8b9928cfa84c623be0cce8141d47690e64a6ca12/orjson-3.10.15-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:1e6d33efab6b71d67f22bf2962895d3dc6f82a6273a965fab762e64fa90dc399", size = 414717 }, - { url = "https://files.pythonhosted.org/packages/6f/9a/1485b8b05c6b4c4db172c438cf5db5dcfd10e72a9bc23c151a1137e763e0/orjson-3.10.15-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:c33be3795e299f565681d69852ac8c1bc5c84863c0b0030b2b3468843be90388", size = 141033 }, - { url = "https://files.pythonhosted.org/packages/f8/d2/fc67523656e43a0c7eaeae9007c8b02e86076b15d591e9be11554d3d3138/orjson-3.10.15-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:eea80037b9fae5339b214f59308ef0589fc06dc870578b7cce6d71eb2096764c", size = 129720 }, - { url = "https://files.pythonhosted.org/packages/79/42/f58c7bd4e5b54da2ce2ef0331a39ccbbaa7699b7f70206fbf06737c9ed7d/orjson-3.10.15-cp311-cp311-win32.whl", hash = "sha256:d5ac11b659fd798228a7adba3e37c010e0152b78b1982897020a8e019a94882e", size = 142473 }, - { url = "https://files.pythonhosted.org/packages/00/f8/bb60a4644287a544ec81df1699d5b965776bc9848d9029d9f9b3402ac8bb/orjson-3.10.15-cp311-cp311-win_amd64.whl", hash = "sha256:cf45e0214c593660339ef63e875f32ddd5aa3b4adc15e662cdb80dc49e194f8e", size = 133570 }, - { url = "https://files.pythonhosted.org/packages/66/85/22fe737188905a71afcc4bf7cc4c79cd7f5bbe9ed1fe0aac4ce4c33edc30/orjson-3.10.15-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:9d11c0714fc85bfcf36ada1179400862da3288fc785c30e8297844c867d7505a", size = 249504 }, - { url = "https://files.pythonhosted.org/packages/48/b7/2622b29f3afebe938a0a9037e184660379797d5fd5234e5998345d7a5b43/orjson-3.10.15-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dba5a1e85d554e3897fa9fe6fbcff2ed32d55008973ec9a2b992bd9a65d2352d", size = 125080 }, - { url = "https://files.pythonhosted.org/packages/ce/8f/0b72a48f4403d0b88b2a41450c535b3e8989e8a2d7800659a967efc7c115/orjson-3.10.15-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7723ad949a0ea502df656948ddd8b392780a5beaa4c3b5f97e525191b102fff0", size = 150121 }, - { url = "https://files.pythonhosted.org/packages/06/ec/acb1a20cd49edb2000be5a0404cd43e3c8aad219f376ac8c60b870518c03/orjson-3.10.15-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6fd9bc64421e9fe9bd88039e7ce8e58d4fead67ca88e3a4014b143cec7684fd4", size = 139796 }, - { url = "https://files.pythonhosted.org/packages/33/e1/f7840a2ea852114b23a52a1c0b2bea0a1ea22236efbcdb876402d799c423/orjson-3.10.15-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dadba0e7b6594216c214ef7894c4bd5f08d7c0135f4dd0145600be4fbcc16767", size = 154636 }, - { url = "https://files.pythonhosted.org/packages/fa/da/31543337febd043b8fa80a3b67de627669b88c7b128d9ad4cc2ece005b7a/orjson-3.10.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b48f59114fe318f33bbaee8ebeda696d8ccc94c9e90bc27dbe72153094e26f41", size = 130621 }, - { url = "https://files.pythonhosted.org/packages/ed/78/66115dc9afbc22496530d2139f2f4455698be444c7c2475cb48f657cefc9/orjson-3.10.15-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:035fb83585e0f15e076759b6fedaf0abb460d1765b6a36f48018a52858443514", size = 138516 }, - { url = "https://files.pythonhosted.org/packages/22/84/cd4f5fb5427ffcf823140957a47503076184cb1ce15bcc1165125c26c46c/orjson-3.10.15-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d13b7fe322d75bf84464b075eafd8e7dd9eae05649aa2a5354cfa32f43c59f17", size = 130762 }, - { url = "https://files.pythonhosted.org/packages/93/1f/67596b711ba9f56dd75d73b60089c5c92057f1130bb3a25a0f53fb9a583b/orjson-3.10.15-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:7066b74f9f259849629e0d04db6609db4cf5b973248f455ba5d3bd58a4daaa5b", size = 414700 }, - { url = "https://files.pythonhosted.org/packages/7c/0c/6a3b3271b46443d90efb713c3e4fe83fa8cd71cda0d11a0f69a03f437c6e/orjson-3.10.15-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:88dc3f65a026bd3175eb157fea994fca6ac7c4c8579fc5a86fc2114ad05705b7", size = 141077 }, - { url = "https://files.pythonhosted.org/packages/3b/9b/33c58e0bfc788995eccd0d525ecd6b84b40d7ed182dd0751cd4c1322ac62/orjson-3.10.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b342567e5465bd99faa559507fe45e33fc76b9fb868a63f1642c6bc0735ad02a", size = 129898 }, - { url = "https://files.pythonhosted.org/packages/01/c1/d577ecd2e9fa393366a1ea0a9267f6510d86e6c4bb1cdfb9877104cac44c/orjson-3.10.15-cp312-cp312-win32.whl", hash = "sha256:0a4f27ea5617828e6b58922fdbec67b0aa4bb844e2d363b9244c47fa2180e665", size = 142566 }, - { url = "https://files.pythonhosted.org/packages/ed/eb/a85317ee1732d1034b92d56f89f1de4d7bf7904f5c8fb9dcdd5b1c83917f/orjson-3.10.15-cp312-cp312-win_amd64.whl", hash = "sha256:ef5b87e7aa9545ddadd2309efe6824bd3dd64ac101c15dae0f2f597911d46eaa", size = 133732 }, - { url = "https://files.pythonhosted.org/packages/06/10/fe7d60b8da538e8d3d3721f08c1b7bff0491e8fa4dd3bf11a17e34f4730e/orjson-3.10.15-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:bae0e6ec2b7ba6895198cd981b7cca95d1487d0147c8ed751e5632ad16f031a6", size = 249399 }, - { url = "https://files.pythonhosted.org/packages/6b/83/52c356fd3a61abd829ae7e4366a6fe8e8863c825a60d7ac5156067516edf/orjson-3.10.15-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f93ce145b2db1252dd86af37d4165b6faa83072b46e3995ecc95d4b2301b725a", size = 125044 }, - { url = "https://files.pythonhosted.org/packages/55/b2/d06d5901408e7ded1a74c7c20d70e3a127057a6d21355f50c90c0f337913/orjson-3.10.15-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7c203f6f969210128af3acae0ef9ea6aab9782939f45f6fe02d05958fe761ef9", size = 150066 }, - { url = "https://files.pythonhosted.org/packages/75/8c/60c3106e08dc593a861755781c7c675a566445cc39558677d505878d879f/orjson-3.10.15-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8918719572d662e18b8af66aef699d8c21072e54b6c82a3f8f6404c1f5ccd5e0", size = 139737 }, - { url = "https://files.pythonhosted.org/packages/6a/8c/ae00d7d0ab8a4490b1efeb01ad4ab2f1982e69cc82490bf8093407718ff5/orjson-3.10.15-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f71eae9651465dff70aa80db92586ad5b92df46a9373ee55252109bb6b703307", size = 154804 }, - { url = "https://files.pythonhosted.org/packages/22/86/65dc69bd88b6dd254535310e97bc518aa50a39ef9c5a2a5d518e7a223710/orjson-3.10.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e117eb299a35f2634e25ed120c37c641398826c2f5a3d3cc39f5993b96171b9e", size = 130583 }, - { url = "https://files.pythonhosted.org/packages/bb/00/6fe01ededb05d52be42fabb13d93a36e51f1fd9be173bd95707d11a8a860/orjson-3.10.15-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:13242f12d295e83c2955756a574ddd6741c81e5b99f2bef8ed8d53e47a01e4b7", size = 138465 }, - { url = "https://files.pythonhosted.org/packages/db/2f/4cc151c4b471b0cdc8cb29d3eadbce5007eb0475d26fa26ed123dca93b33/orjson-3.10.15-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7946922ada8f3e0b7b958cc3eb22cfcf6c0df83d1fe5521b4a100103e3fa84c8", size = 130742 }, - { url = "https://files.pythonhosted.org/packages/9f/13/8a6109e4b477c518498ca37963d9c0eb1508b259725553fb53d53b20e2ea/orjson-3.10.15-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b7155eb1623347f0f22c38c9abdd738b287e39b9982e1da227503387b81b34ca", size = 414669 }, - { url = "https://files.pythonhosted.org/packages/22/7b/1d229d6d24644ed4d0a803de1b0e2df832032d5beda7346831c78191b5b2/orjson-3.10.15-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:208beedfa807c922da4e81061dafa9c8489c6328934ca2a562efa707e049e561", size = 141043 }, - { url = "https://files.pythonhosted.org/packages/cc/d3/6dc91156cf12ed86bed383bcb942d84d23304a1e57b7ab030bf60ea130d6/orjson-3.10.15-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eca81f83b1b8c07449e1d6ff7074e82e3fd6777e588f1a6632127f286a968825", size = 129826 }, - { url = "https://files.pythonhosted.org/packages/b3/38/c47c25b86f6996f1343be721b6ea4367bc1c8bc0fc3f6bbcd995d18cb19d/orjson-3.10.15-cp313-cp313-win32.whl", hash = "sha256:c03cd6eea1bd3b949d0d007c8d57049aa2b39bd49f58b4b2af571a5d3833d890", size = 142542 }, - { url = "https://files.pythonhosted.org/packages/27/f1/1d7ec15b20f8ce9300bc850de1e059132b88990e46cd0ccac29cbf11e4f9/orjson-3.10.15-cp313-cp313-win_amd64.whl", hash = "sha256:fd56a26a04f6ba5fb2045b0acc487a63162a958ed837648c5781e1fe3316cfbf", size = 133444 }, + { url = "https://files.pythonhosted.org/packages/d3/48/7c3cd094488f5a3bc58488555244609a8c4d105bc02f2b77e509debf0450/orjson-3.10.12-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:a734c62efa42e7df94926d70fe7d37621c783dea9f707a98cdea796964d4cf74", size = 248687 }, + { url = "https://files.pythonhosted.org/packages/ff/90/e55f0e25c7fdd1f82551fe787f85df6f378170caca863c04c810cd8f2730/orjson-3.10.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:750f8b27259d3409eda8350c2919a58b0cfcd2054ddc1bd317a643afc646ef23", size = 136953 }, + { url = "https://files.pythonhosted.org/packages/2a/b3/109c020cf7fee747d400de53b43b183ca9d3ebda3906ad0b858eb5479718/orjson-3.10.12-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb52c22bfffe2857e7aa13b4622afd0dd9d16ea7cc65fd2bf318d3223b1b6252", size = 149090 }, + { url = "https://files.pythonhosted.org/packages/96/d4/35c0275dc1350707d182a1b5da16d1184b9439848060af541285407f18f9/orjson-3.10.12-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:440d9a337ac8c199ff8251e100c62e9488924c92852362cd27af0e67308c16ef", size = 140480 }, + { url = "https://files.pythonhosted.org/packages/3b/79/f863ff460c291ad2d882cc3b580cc444bd4ec60c9df55f6901e6c9a3f519/orjson-3.10.12-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9e15c06491c69997dfa067369baab3bf094ecb74be9912bdc4339972323f252", size = 156564 }, + { url = "https://files.pythonhosted.org/packages/98/7e/8d5835449ddd873424ee7b1c4ba73a0369c1055750990d824081652874d6/orjson-3.10.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:362d204ad4b0b8724cf370d0cd917bb2dc913c394030da748a3bb632445ce7c4", size = 131279 }, + { url = "https://files.pythonhosted.org/packages/46/f5/d34595b6d7f4f984c6fef289269a7f98abcdc2445ebdf90e9273487dda6b/orjson-3.10.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2b57cbb4031153db37b41622eac67329c7810e5f480fda4cfd30542186f006ae", size = 139764 }, + { url = "https://files.pythonhosted.org/packages/b3/5b/ee6e9ddeab54a7b7806768151c2090a2d36025bc346a944f51cf172ef7f7/orjson-3.10.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:165c89b53ef03ce0d7c59ca5c82fa65fe13ddf52eeb22e859e58c237d4e33b9b", size = 131915 }, + { url = "https://files.pythonhosted.org/packages/c4/45/febee5951aef6db5cd8cdb260548101d7ece0ca9d4ddadadf1766306b7a4/orjson-3.10.12-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:5dee91b8dfd54557c1a1596eb90bcd47dbcd26b0baaed919e6861f076583e9da", size = 415783 }, + { url = "https://files.pythonhosted.org/packages/27/a5/5a8569e49f3a6c093bee954a3de95062a231196f59e59df13a48e2420081/orjson-3.10.12-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:77a4e1cfb72de6f905bdff061172adfb3caf7a4578ebf481d8f0530879476c07", size = 142387 }, + { url = "https://files.pythonhosted.org/packages/6e/05/02550fb38c5bf758f3994f55401233a2ef304e175f473f2ac6dbf464cc8b/orjson-3.10.12-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:038d42c7bc0606443459b8fe2d1f121db474c49067d8d14c6a075bbea8bf14dd", size = 130664 }, + { url = "https://files.pythonhosted.org/packages/8c/f4/ba31019d0646ce51f7ac75af6dabf98fd89dbf8ad87a9086da34710738e7/orjson-3.10.12-cp311-none-win32.whl", hash = "sha256:03b553c02ab39bed249bedd4abe37b2118324d1674e639b33fab3d1dafdf4d79", size = 143623 }, + { url = "https://files.pythonhosted.org/packages/83/fe/babf08842b989acf4c46103fefbd7301f026423fab47e6f3ba07b54d7837/orjson-3.10.12-cp311-none-win_amd64.whl", hash = "sha256:8b8713b9e46a45b2af6b96f559bfb13b1e02006f4242c156cbadef27800a55a8", size = 135074 }, + { url = "https://files.pythonhosted.org/packages/a1/2f/989adcafad49afb535da56b95d8f87d82e748548b2a86003ac129314079c/orjson-3.10.12-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:53206d72eb656ca5ac7d3a7141e83c5bbd3ac30d5eccfe019409177a57634b0d", size = 248678 }, + { url = "https://files.pythonhosted.org/packages/69/b9/8c075e21a50c387649db262b618ebb7e4d40f4197b949c146fc225dd23da/orjson-3.10.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac8010afc2150d417ebda810e8df08dd3f544e0dd2acab5370cfa6bcc0662f8f", size = 136763 }, + { url = "https://files.pythonhosted.org/packages/87/d3/78edf10b4ab14c19f6d918cf46a145818f4aca2b5a1773c894c5490d3a4c/orjson-3.10.12-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed459b46012ae950dd2e17150e838ab08215421487371fa79d0eced8d1461d70", size = 149137 }, + { url = "https://files.pythonhosted.org/packages/16/81/5db8852bdf990a0ddc997fa8f16b80895b8cc77c0fe3701569ed2b4b9e78/orjson-3.10.12-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8dcb9673f108a93c1b52bfc51b0af422c2d08d4fc710ce9c839faad25020bb69", size = 140567 }, + { url = "https://files.pythonhosted.org/packages/fa/a6/9ce1e3e3db918512efadad489630c25841eb148513d21dab96f6b4157fa1/orjson-3.10.12-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:22a51ae77680c5c4652ebc63a83d5255ac7d65582891d9424b566fb3b5375ee9", size = 156620 }, + { url = "https://files.pythonhosted.org/packages/47/d4/05133d6bea24e292d2f7628b1e19986554f7d97b6412b3e51d812e38db2d/orjson-3.10.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:910fdf2ac0637b9a77d1aad65f803bac414f0b06f720073438a7bd8906298192", size = 131555 }, + { url = "https://files.pythonhosted.org/packages/b9/7a/b3fbffda8743135c7811e95dc2ab7cdbc5f04999b83c2957d046f1b3fac9/orjson-3.10.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:24ce85f7100160936bc2116c09d1a8492639418633119a2224114f67f63a4559", size = 139743 }, + { url = "https://files.pythonhosted.org/packages/b5/13/95bbcc9a6584aa083da5ce5004ce3d59ea362a542a0b0938d884fd8790b6/orjson-3.10.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8a76ba5fc8dd9c913640292df27bff80a685bed3a3c990d59aa6ce24c352f8fc", size = 131733 }, + { url = "https://files.pythonhosted.org/packages/e8/29/dddbb2ea6e7af426fcc3da65a370618a88141de75c6603313d70768d1df1/orjson-3.10.12-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ff70ef093895fd53f4055ca75f93f047e088d1430888ca1229393a7c0521100f", size = 415788 }, + { url = "https://files.pythonhosted.org/packages/53/df/4aea59324ac539975919b4705ee086aced38e351a6eb3eea0f5071dd5661/orjson-3.10.12-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:f4244b7018b5753ecd10a6d324ec1f347da130c953a9c88432c7fbc8875d13be", size = 142347 }, + { url = "https://files.pythonhosted.org/packages/55/55/a52d83d7c49f8ff44e0daab10554490447d6c658771569e1c662aa7057fe/orjson-3.10.12-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:16135ccca03445f37921fa4b585cff9a58aa8d81ebcb27622e69bfadd220b32c", size = 130829 }, + { url = "https://files.pythonhosted.org/packages/a1/8b/b1beb1624dd4adf7d72e2d9b73c4b529e7851c0c754f17858ea13e368b33/orjson-3.10.12-cp312-none-win32.whl", hash = "sha256:2d879c81172d583e34153d524fcba5d4adafbab8349a7b9f16ae511c2cee8708", size = 143659 }, + { url = "https://files.pythonhosted.org/packages/13/91/634c9cd0bfc6a857fc8fab9bf1a1bd9f7f3345e0d6ca5c3d4569ceb6dcfa/orjson-3.10.12-cp312-none-win_amd64.whl", hash = "sha256:fc23f691fa0f5c140576b8c365bc942d577d861a9ee1142e4db468e4e17094fb", size = 135221 }, + { url = "https://files.pythonhosted.org/packages/1b/bb/3f560735f46fa6f875a9d7c4c2171a58cfb19f56a633d5ad5037a924f35f/orjson-3.10.12-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:47962841b2a8aa9a258b377f5188db31ba49af47d4003a32f55d6f8b19006543", size = 248662 }, + { url = "https://files.pythonhosted.org/packages/a3/df/54817902350636cc9270db20486442ab0e4db33b38555300a1159b439d16/orjson-3.10.12-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6334730e2532e77b6054e87ca84f3072bee308a45a452ea0bffbbbc40a67e296", size = 126055 }, + { url = "https://files.pythonhosted.org/packages/2e/77/55835914894e00332601a74540840f7665e81f20b3e2b9a97614af8565ed/orjson-3.10.12-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:accfe93f42713c899fdac2747e8d0d5c659592df2792888c6c5f829472e4f85e", size = 131507 }, + { url = "https://files.pythonhosted.org/packages/33/9e/b91288361898e3158062a876b5013c519a5d13e692ac7686e3486c4133ab/orjson-3.10.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a7974c490c014c48810d1dede6c754c3cc46598da758c25ca3b4001ac45b703f", size = 131686 }, + { url = "https://files.pythonhosted.org/packages/b2/15/08ce117d60a4d2d3fd24e6b21db463139a658e9f52d22c9c30af279b4187/orjson-3.10.12-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3f250ce7727b0b2682f834a3facff88e310f52f07a5dcfd852d99637d386e79e", size = 415710 }, + { url = "https://files.pythonhosted.org/packages/71/af/c09da5ed58f9c002cf83adff7a4cdf3e6cee742aa9723395f8dcdb397233/orjson-3.10.12-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:f31422ff9486ae484f10ffc51b5ab2a60359e92d0716fcce1b3593d7bb8a9af6", size = 142305 }, + { url = "https://files.pythonhosted.org/packages/17/d1/8612038d44f33fae231e9ba480d273bac2b0383ce9e77cb06bede1224ae3/orjson-3.10.12-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5f29c5d282bb2d577c2a6bbde88d8fdcc4919c593f806aac50133f01b733846e", size = 130815 }, + { url = "https://files.pythonhosted.org/packages/67/2c/d5f87834be3591555cfaf9aecdf28f480a6f0b4afeaac53bad534bf9518f/orjson-3.10.12-cp313-none-win32.whl", hash = "sha256:f45653775f38f63dc0e6cd4f14323984c3149c05d6007b58cb154dd080ddc0dc", size = 143664 }, + { url = "https://files.pythonhosted.org/packages/6a/05/7d768fa3ca23c9b3e1e09117abeded1501119f1d8de0ab722938c91ab25d/orjson-3.10.12-cp313-none-win_amd64.whl", hash = "sha256:229994d0c376d5bdc91d92b3c9e6be2f1fbabd4cc1b59daae1443a46ee5e9825", size = 134944 }, ] [[package]] @@ -1136,17 +1082,17 @@ wheels = [ [[package]] name = "peewee" -version = "3.17.9" +version = "3.17.6" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/57/09/4393bd378e70b7fc3163ee83353cc27bb520010a5c2b3c924121e7e7e068/peewee-3.17.9.tar.gz", hash = "sha256:fe15cd001758e324c8e3ca8c8ed900e7397c2907291789e1efc383e66b9bc7a8", size = 3026085 } +sdist = { url = "https://files.pythonhosted.org/packages/bd/be/e9c886b4601a19f4c34a1b75c5fe8b98a2115dd964251a76b24c977c369d/peewee-3.17.6.tar.gz", hash = "sha256:cea5592c6f4da1592b7cff8eaf655be6648a1f5857469e30037bf920c03fb8fb", size = 2954075 } [[package]] name = "phx-class-registry" -version = "5.1.1" +version = "5.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ad/e1/4038dc8b09e66b1f850913c05fe1c039f8d9c0ef61347af37c75bbe77e3f/phx_class_registry-5.1.1.tar.gz", hash = "sha256:06c9af198b846a7530406314f63f8d83441daf42d29ee25d8c0b19a9dbc37939", size = 32115 } +sdist = { url = "https://files.pythonhosted.org/packages/d4/b0/dfe7eee3715a522e0507c5d81daab52d4348ee2672fa77c721617dbb6319/phx_class_registry-5.0.0.tar.gz", hash = "sha256:a57ab8c2eca03e0daf06e0dd840ea26b72e2e51b7b7509015b3df7c0d537ee73", size = 32284 } wheels = [ - { url = "https://files.pythonhosted.org/packages/7d/85/67eb86f25b1857a7669c4ad7a46b439e55c5301cbcb08b9ce8fa9125700d/phx_class_registry-5.1.1-py3-none-any.whl", hash = "sha256:b093ecc1dad34c5dc6eda2530046d956f2303a5cfaa543bf7fba35ce3c7b1672", size = 15732 }, + { url = "https://files.pythonhosted.org/packages/41/e5/9384dd7f575ade7a14ae4371d6b4eafd997f18577d3e93ccd0e055389b0b/phx_class_registry-5.0.0-py3-none-any.whl", hash = "sha256:6e0644f779c7d793a96090d938fe4c396f3274dd57563dc1c57ea245b5c07f89", size = 14850 }, ] [[package]] @@ -1192,11 +1138,11 @@ wheels = [ [[package]] name = "pip" -version = "25.0.1" +version = "24.3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/70/53/b309b4a497b09655cb7e07088966881a57d082f48ac3cb54ea729fd2c6cf/pip-25.0.1.tar.gz", hash = "sha256:88f96547ea48b940a3a385494e181e29fb8637898f88d88737c5049780f196ea", size = 1950850 } +sdist = { url = "https://files.pythonhosted.org/packages/f4/b1/b422acd212ad7eedddaf7981eee6e5de085154ff726459cf2da7c5a184c1/pip-24.3.1.tar.gz", hash = "sha256:ebcb60557f2aefabc2e0f918751cd24ea0d56d8ec5445fe1807f1d2109660b99", size = 1931073 } wheels = [ - { url = "https://files.pythonhosted.org/packages/c9/bc/b7db44f5f39f9d0494071bddae6880eb645970366d0a200022a1a93d57f5/pip-25.0.1-py3-none-any.whl", hash = "sha256:c46efd13b6aa8279f33f2864459c8ce587ea6a1a59ee20de055868d8f7688f7f", size = 1841526 }, + { url = "https://files.pythonhosted.org/packages/ef/7d/500c9ad20238fcfcb4cb9243eede163594d7020ce87bd9610c9e02771876/pip-24.3.1-py3-none-any.whl", hash = "sha256:3790624780082365f47549d032f3770eeb2b1e8bd1f7b2e02dace1afa361b4ed", size = 1822182 }, ] [[package]] @@ -1267,23 +1213,23 @@ wheels = [ [[package]] name = "psutil" -version = "7.0.0" +version = "6.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2a/80/336820c1ad9286a4ded7e845b2eccfcb27851ab8ac6abece774a6ff4d3de/psutil-7.0.0.tar.gz", hash = "sha256:7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456", size = 497003 } +sdist = { url = "https://files.pythonhosted.org/packages/1f/5a/07871137bb752428aa4b659f910b399ba6f291156bdea939be3e96cae7cb/psutil-6.1.1.tar.gz", hash = "sha256:cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5", size = 508502 } wheels = [ - { url = "https://files.pythonhosted.org/packages/ed/e6/2d26234410f8b8abdbf891c9da62bee396583f713fb9f3325a4760875d22/psutil-7.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:101d71dc322e3cffd7cea0650b09b3d08b8e7c4109dd6809fe452dfd00e58b25", size = 238051 }, - { url = "https://files.pythonhosted.org/packages/04/8b/30f930733afe425e3cbfc0e1468a30a18942350c1a8816acfade80c005c4/psutil-7.0.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:39db632f6bb862eeccf56660871433e111b6ea58f2caea825571951d4b6aa3da", size = 239535 }, - { url = "https://files.pythonhosted.org/packages/2a/ed/d362e84620dd22876b55389248e522338ed1bf134a5edd3b8231d7207f6d/psutil-7.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1fcee592b4c6f146991ca55919ea3d1f8926497a713ed7faaf8225e174581e91", size = 275004 }, - { url = "https://files.pythonhosted.org/packages/bf/b9/b0eb3f3cbcb734d930fdf839431606844a825b23eaf9a6ab371edac8162c/psutil-7.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b1388a4f6875d7e2aff5c4ca1cc16c545ed41dd8bb596cefea80111db353a34", size = 277986 }, - { url = "https://files.pythonhosted.org/packages/eb/a2/709e0fe2f093556c17fbafda93ac032257242cabcc7ff3369e2cb76a97aa/psutil-7.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5f098451abc2828f7dc6b58d44b532b22f2088f4999a937557b603ce72b1993", size = 279544 }, - { url = "https://files.pythonhosted.org/packages/50/e6/eecf58810b9d12e6427369784efe814a1eec0f492084ce8eb8f4d89d6d61/psutil-7.0.0-cp37-abi3-win32.whl", hash = "sha256:ba3fcef7523064a6c9da440fc4d6bd07da93ac726b5733c29027d7dc95b39d99", size = 241053 }, - { url = "https://files.pythonhosted.org/packages/50/1b/6921afe68c74868b4c9fa424dad3be35b095e16687989ebbb50ce4fceb7c/psutil-7.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:4cf3d4eb1aa9b348dec30105c55cd9b7d4629285735a102beb4441e38db90553", size = 244885 }, + { url = "https://files.pythonhosted.org/packages/61/99/ca79d302be46f7bdd8321089762dd4476ee725fce16fc2b2e1dbba8cac17/psutil-6.1.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed7fe2231a444fc219b9c42d0376e0a9a1a72f16c5cfa0f68d19f1a0663e8", size = 247511 }, + { url = "https://files.pythonhosted.org/packages/0b/6b/73dbde0dd38f3782905d4587049b9be64d76671042fdcaf60e2430c6796d/psutil-6.1.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0bdd4eab935276290ad3cb718e9809412895ca6b5b334f5a9111ee6d9aff9377", size = 248985 }, + { url = "https://files.pythonhosted.org/packages/17/38/c319d31a1d3f88c5b79c68b3116c129e5133f1822157dd6da34043e32ed6/psutil-6.1.1-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6e06c20c05fe95a3d7302d74e7097756d4ba1247975ad6905441ae1b5b66003", size = 284488 }, + { url = "https://files.pythonhosted.org/packages/9c/39/0f88a830a1c8a3aba27fededc642da37613c57cbff143412e3536f89784f/psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97f7cb9921fbec4904f522d972f0c0e1f4fabbdd4e0287813b21215074a0f160", size = 287477 }, + { url = "https://files.pythonhosted.org/packages/47/da/99f4345d4ddf2845cb5b5bd0d93d554e84542d116934fde07a0c50bd4e9f/psutil-6.1.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33431e84fee02bc84ea36d9e2c4a6d395d479c9dd9bba2376c1f6ee8f3a4e0b3", size = 289017 }, + { url = "https://files.pythonhosted.org/packages/38/53/bd755c2896f4461fd4f36fa6a6dcb66a88a9e4b9fd4e5b66a77cf9d4a584/psutil-6.1.1-cp37-abi3-win32.whl", hash = "sha256:eaa912e0b11848c4d9279a93d7e2783df352b082f40111e078388701fd479e53", size = 250602 }, + { url = "https://files.pythonhosted.org/packages/7b/d7/7831438e6c3ebbfa6e01a927127a6cb42ad3ab844247f3c5b96bea25d73d/psutil-6.1.1-cp37-abi3-win_amd64.whl", hash = "sha256:f35cfccb065fff93529d2afb4a2e89e363fe63ca1e4a5da22b603a85833c2649", size = 254444 }, ] [[package]] name = "py-dactyl" -version = "2.0.5" -source = { git = "https://github.com/iamkubi/pydactyl?tag=v2.0.5#ef5d8b9b807f67067dc1214097abf01ddb7e551f" } +version = "2.0.4" +source = { git = "https://github.com/cswimr/pydactyl#a8ad40c21b3fe2248451fd85a1146b32d29f10df" } dependencies = [ { name = "requests" }, ] @@ -1299,96 +1245,77 @@ wheels = [ [[package]] name = "pydantic" -version = "2.11.1" +version = "2.9.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-types" }, { name = "pydantic-core" }, { name = "typing-extensions" }, - { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/93/a3/698b87a4d4d303d7c5f62ea5fbf7a79cab236ccfbd0a17847b7f77f8163e/pydantic-2.11.1.tar.gz", hash = "sha256:442557d2910e75c991c39f4b4ab18963d57b9b55122c8b2a9cd176d8c29ce968", size = 782817 } +sdist = { url = "https://files.pythonhosted.org/packages/a9/b7/d9e3f12af310e1120c21603644a1cd86f59060e040ec5c3a80b8f05fae30/pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f", size = 769917 } wheels = [ - { url = "https://files.pythonhosted.org/packages/cc/12/f9221a949f2419e2e23847303c002476c26fbcfd62dc7f3d25d0bec5ca99/pydantic-2.11.1-py3-none-any.whl", hash = "sha256:5b6c415eee9f8123a14d859be0c84363fec6b1feb6b688d6435801230b56e0b8", size = 442648 }, + { url = "https://files.pythonhosted.org/packages/df/e4/ba44652d562cbf0bf320e0f3810206149c8a4e99cdbf66da82e97ab53a15/pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12", size = 434928 }, ] [[package]] name = "pydantic-core" -version = "2.33.0" +version = "2.23.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b9/05/91ce14dfd5a3a99555fce436318cc0fd1f08c4daa32b3248ad63669ea8b4/pydantic_core-2.33.0.tar.gz", hash = "sha256:40eb8af662ba409c3cbf4a8150ad32ae73514cd7cb1f1a2113af39763dd616b3", size = 434080 } +sdist = { url = "https://files.pythonhosted.org/packages/e2/aa/6b6a9b9f8537b872f552ddd46dd3da230367754b6f707b8e1e963f515ea3/pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863", size = 402156 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f0/93/9e97af2619b4026596487a79133e425c7d3c374f0a7f100f3d76bcdf9c83/pydantic_core-2.33.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a608a75846804271cf9c83e40bbb4dab2ac614d33c6fd5b0c6187f53f5c593ef", size = 2042784 }, - { url = "https://files.pythonhosted.org/packages/42/b4/0bba8412fd242729feeb80e7152e24f0e1a1c19f4121ca3d4a307f4e6222/pydantic_core-2.33.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e1c69aa459f5609dec2fa0652d495353accf3eda5bdb18782bc5a2ae45c9273a", size = 1858179 }, - { url = "https://files.pythonhosted.org/packages/69/1f/c1c40305d929bd08af863df64b0a26203b70b352a1962d86f3bcd52950fe/pydantic_core-2.33.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9ec80eb5a5f45a2211793f1c4aeddff0c3761d1c70d684965c1807e923a588b", size = 1909396 }, - { url = "https://files.pythonhosted.org/packages/0f/99/d2e727375c329c1e652b5d450fbb9d56e8c3933a397e4bd46e67c68c2cd5/pydantic_core-2.33.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e925819a98318d17251776bd3d6aa9f3ff77b965762155bdad15d1a9265c4cfd", size = 1998264 }, - { url = "https://files.pythonhosted.org/packages/9c/2e/3119a33931278d96ecc2e9e1b9d50c240636cfeb0c49951746ae34e4de74/pydantic_core-2.33.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bf68bb859799e9cec3d9dd8323c40c00a254aabb56fe08f907e437005932f2b", size = 2140588 }, - { url = "https://files.pythonhosted.org/packages/35/bd/9267bd1ba55f17c80ef6cb7e07b3890b4acbe8eb6014f3102092d53d9300/pydantic_core-2.33.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1b2ea72dea0825949a045fa4071f6d5b3d7620d2a208335207793cf29c5a182d", size = 2746296 }, - { url = "https://files.pythonhosted.org/packages/6f/ed/ef37de6478a412ee627cbebd73e7b72a680f45bfacce9ff1199de6e17e88/pydantic_core-2.33.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1583539533160186ac546b49f5cde9ffc928062c96920f58bd95de32ffd7bffd", size = 2005555 }, - { url = "https://files.pythonhosted.org/packages/dd/84/72c8d1439585d8ee7bc35eb8f88a04a4d302ee4018871f1f85ae1b0c6625/pydantic_core-2.33.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:23c3e77bf8a7317612e5c26a3b084c7edeb9552d645742a54a5867635b4f2453", size = 2124452 }, - { url = "https://files.pythonhosted.org/packages/a7/8f/cb13de30c6a3e303423751a529a3d1271c2effee4b98cf3e397a66ae8498/pydantic_core-2.33.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a7a7f2a3f628d2f7ef11cb6188bcf0b9e1558151d511b974dfea10a49afe192b", size = 2087001 }, - { url = "https://files.pythonhosted.org/packages/83/d0/e93dc8884bf288a63fedeb8040ac8f29cb71ca52e755f48e5170bb63e55b/pydantic_core-2.33.0-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:f1fb026c575e16f673c61c7b86144517705865173f3d0907040ac30c4f9f5915", size = 2261663 }, - { url = "https://files.pythonhosted.org/packages/4c/ba/4b7739c95efa0b542ee45fd872c8f6b1884ab808cf04ce7ac6621b6df76e/pydantic_core-2.33.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:635702b2fed997e0ac256b2cfbdb4dd0bf7c56b5d8fba8ef03489c03b3eb40e2", size = 2257786 }, - { url = "https://files.pythonhosted.org/packages/cc/98/73cbca1d2360c27752cfa2fcdcf14d96230e92d7d48ecd50499865c56bf7/pydantic_core-2.33.0-cp311-cp311-win32.whl", hash = "sha256:07b4ced28fccae3f00626eaa0c4001aa9ec140a29501770a88dbbb0966019a86", size = 1925697 }, - { url = "https://files.pythonhosted.org/packages/9a/26/d85a40edeca5d8830ffc33667d6fef329fd0f4bc0c5181b8b0e206cfe488/pydantic_core-2.33.0-cp311-cp311-win_amd64.whl", hash = "sha256:4927564be53239a87770a5f86bdc272b8d1fbb87ab7783ad70255b4ab01aa25b", size = 1949859 }, - { url = "https://files.pythonhosted.org/packages/7e/0b/5a381605f0b9870465b805f2c86c06b0a7c191668ebe4117777306c2c1e5/pydantic_core-2.33.0-cp311-cp311-win_arm64.whl", hash = "sha256:69297418ad644d521ea3e1aa2e14a2a422726167e9ad22b89e8f1130d68e1e9a", size = 1907978 }, - { url = "https://files.pythonhosted.org/packages/a9/c4/c9381323cbdc1bb26d352bc184422ce77c4bc2f2312b782761093a59fafc/pydantic_core-2.33.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:6c32a40712e3662bebe524abe8abb757f2fa2000028d64cc5a1006016c06af43", size = 2025127 }, - { url = "https://files.pythonhosted.org/packages/6f/bd/af35278080716ecab8f57e84515c7dc535ed95d1c7f52c1c6f7b313a9dab/pydantic_core-2.33.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8ec86b5baa36f0a0bfb37db86c7d52652f8e8aa076ab745ef7725784183c3fdd", size = 1851687 }, - { url = "https://files.pythonhosted.org/packages/12/e4/a01461225809c3533c23bd1916b1e8c2e21727f0fea60ab1acbffc4e2fca/pydantic_core-2.33.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4deac83a8cc1d09e40683be0bc6d1fa4cde8df0a9bf0cda5693f9b0569ac01b6", size = 1892232 }, - { url = "https://files.pythonhosted.org/packages/51/17/3d53d62a328fb0a49911c2962036b9e7a4f781b7d15e9093c26299e5f76d/pydantic_core-2.33.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:175ab598fb457a9aee63206a1993874badf3ed9a456e0654273e56f00747bbd6", size = 1977896 }, - { url = "https://files.pythonhosted.org/packages/30/98/01f9d86e02ec4a38f4b02086acf067f2c776b845d43f901bd1ee1c21bc4b/pydantic_core-2.33.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f36afd0d56a6c42cf4e8465b6441cf546ed69d3a4ec92724cc9c8c61bd6ecf4", size = 2127717 }, - { url = "https://files.pythonhosted.org/packages/3c/43/6f381575c61b7c58b0fd0b92134c5a1897deea4cdfc3d47567b3ff460a4e/pydantic_core-2.33.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0a98257451164666afafc7cbf5fb00d613e33f7e7ebb322fbcd99345695a9a61", size = 2680287 }, - { url = "https://files.pythonhosted.org/packages/01/42/c0d10d1451d161a9a0da9bbef023b8005aa26e9993a8cc24dc9e3aa96c93/pydantic_core-2.33.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecc6d02d69b54a2eb83ebcc6f29df04957f734bcf309d346b4f83354d8376862", size = 2008276 }, - { url = "https://files.pythonhosted.org/packages/20/ca/e08df9dba546905c70bae44ced9f3bea25432e34448d95618d41968f40b7/pydantic_core-2.33.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a69b7596c6603afd049ce7f3835bcf57dd3892fc7279f0ddf987bebed8caa5a", size = 2115305 }, - { url = "https://files.pythonhosted.org/packages/03/1f/9b01d990730a98833113581a78e595fd40ed4c20f9693f5a658fb5f91eff/pydantic_core-2.33.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ea30239c148b6ef41364c6f51d103c2988965b643d62e10b233b5efdca8c0099", size = 2068999 }, - { url = "https://files.pythonhosted.org/packages/20/18/fe752476a709191148e8b1e1139147841ea5d2b22adcde6ee6abb6c8e7cf/pydantic_core-2.33.0-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:abfa44cf2f7f7d7a199be6c6ec141c9024063205545aa09304349781b9a125e6", size = 2241488 }, - { url = "https://files.pythonhosted.org/packages/81/22/14738ad0a0bf484b928c9e52004f5e0b81dd8dabbdf23b843717b37a71d1/pydantic_core-2.33.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:20d4275f3c4659d92048c70797e5fdc396c6e4446caf517ba5cad2db60cd39d3", size = 2248430 }, - { url = "https://files.pythonhosted.org/packages/e8/27/be7571e215ac8d321712f2433c445b03dbcd645366a18f67b334df8912bc/pydantic_core-2.33.0-cp312-cp312-win32.whl", hash = "sha256:918f2013d7eadea1d88d1a35fd4a1e16aaf90343eb446f91cb091ce7f9b431a2", size = 1908353 }, - { url = "https://files.pythonhosted.org/packages/be/3a/be78f28732f93128bd0e3944bdd4b3970b389a1fbd44907c97291c8dcdec/pydantic_core-2.33.0-cp312-cp312-win_amd64.whl", hash = "sha256:aec79acc183865bad120b0190afac467c20b15289050648b876b07777e67ea48", size = 1955956 }, - { url = "https://files.pythonhosted.org/packages/21/26/b8911ac74faa994694b76ee6a22875cc7a4abea3c381fdba4edc6c6bef84/pydantic_core-2.33.0-cp312-cp312-win_arm64.whl", hash = "sha256:5461934e895968655225dfa8b3be79e7e927e95d4bd6c2d40edd2fa7052e71b6", size = 1903259 }, - { url = "https://files.pythonhosted.org/packages/79/20/de2ad03ce8f5b3accf2196ea9b44f31b0cd16ac6e8cfc6b21976ed45ec35/pydantic_core-2.33.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f00e8b59e1fc8f09d05594aa7d2b726f1b277ca6155fc84c0396db1b373c4555", size = 2032214 }, - { url = "https://files.pythonhosted.org/packages/f9/af/6817dfda9aac4958d8b516cbb94af507eb171c997ea66453d4d162ae8948/pydantic_core-2.33.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1a73be93ecef45786d7d95b0c5e9b294faf35629d03d5b145b09b81258c7cd6d", size = 1852338 }, - { url = "https://files.pythonhosted.org/packages/44/f3/49193a312d9c49314f2b953fb55740b7c530710977cabe7183b8ef111b7f/pydantic_core-2.33.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ff48a55be9da6930254565ff5238d71d5e9cd8c5487a191cb85df3bdb8c77365", size = 1896913 }, - { url = "https://files.pythonhosted.org/packages/06/e0/c746677825b2e29a2fa02122a8991c83cdd5b4c5f638f0664d4e35edd4b2/pydantic_core-2.33.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:26a4ea04195638dcd8c53dadb545d70badba51735b1594810e9768c2c0b4a5da", size = 1986046 }, - { url = "https://files.pythonhosted.org/packages/11/ec/44914e7ff78cef16afb5e5273d480c136725acd73d894affdbe2a1bbaad5/pydantic_core-2.33.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:41d698dcbe12b60661f0632b543dbb119e6ba088103b364ff65e951610cb7ce0", size = 2128097 }, - { url = "https://files.pythonhosted.org/packages/fe/f5/c6247d424d01f605ed2e3802f338691cae17137cee6484dce9f1ac0b872b/pydantic_core-2.33.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ae62032ef513fe6281ef0009e30838a01057b832dc265da32c10469622613885", size = 2681062 }, - { url = "https://files.pythonhosted.org/packages/f0/85/114a2113b126fdd7cf9a9443b1b1fe1b572e5bd259d50ba9d5d3e1927fa9/pydantic_core-2.33.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f225f3a3995dbbc26affc191d0443c6c4aa71b83358fd4c2b7d63e2f6f0336f9", size = 2007487 }, - { url = "https://files.pythonhosted.org/packages/e6/40/3c05ed28d225c7a9acd2b34c5c8010c279683a870219b97e9f164a5a8af0/pydantic_core-2.33.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5bdd36b362f419c78d09630cbaebc64913f66f62bda6d42d5fbb08da8cc4f181", size = 2121382 }, - { url = "https://files.pythonhosted.org/packages/8a/22/e70c086f41eebd323e6baa92cc906c3f38ddce7486007eb2bdb3b11c8f64/pydantic_core-2.33.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:2a0147c0bef783fd9abc9f016d66edb6cac466dc54a17ec5f5ada08ff65caf5d", size = 2072473 }, - { url = "https://files.pythonhosted.org/packages/3e/84/d1614dedd8fe5114f6a0e348bcd1535f97d76c038d6102f271433cd1361d/pydantic_core-2.33.0-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:c860773a0f205926172c6644c394e02c25421dc9a456deff16f64c0e299487d3", size = 2249468 }, - { url = "https://files.pythonhosted.org/packages/b0/c0/787061eef44135e00fddb4b56b387a06c303bfd3884a6df9bea5cb730230/pydantic_core-2.33.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:138d31e3f90087f42aa6286fb640f3c7a8eb7bdae829418265e7e7474bd2574b", size = 2254716 }, - { url = "https://files.pythonhosted.org/packages/ae/e2/27262eb04963201e89f9c280f1e10c493a7a37bc877e023f31aa72d2f911/pydantic_core-2.33.0-cp313-cp313-win32.whl", hash = "sha256:d20cbb9d3e95114325780f3cfe990f3ecae24de7a2d75f978783878cce2ad585", size = 1916450 }, - { url = "https://files.pythonhosted.org/packages/13/8d/25ff96f1e89b19e0b70b3cd607c9ea7ca27e1dcb810a9cd4255ed6abf869/pydantic_core-2.33.0-cp313-cp313-win_amd64.whl", hash = "sha256:ca1103d70306489e3d006b0f79db8ca5dd3c977f6f13b2c59ff745249431a606", size = 1956092 }, - { url = "https://files.pythonhosted.org/packages/1b/64/66a2efeff657b04323ffcd7b898cb0354d36dae3a561049e092134a83e9c/pydantic_core-2.33.0-cp313-cp313-win_arm64.whl", hash = "sha256:6291797cad239285275558e0a27872da735b05c75d5237bbade8736f80e4c225", size = 1908367 }, - { url = "https://files.pythonhosted.org/packages/52/54/295e38769133363d7ec4a5863a4d579f331728c71a6644ff1024ee529315/pydantic_core-2.33.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:7b79af799630af263eca9ec87db519426d8c9b3be35016eddad1832bac812d87", size = 1813331 }, - { url = "https://files.pythonhosted.org/packages/4c/9c/0c8ea02db8d682aa1ef48938abae833c1d69bdfa6e5ec13b21734b01ae70/pydantic_core-2.33.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eabf946a4739b5237f4f56d77fa6668263bc466d06a8036c055587c130a46f7b", size = 1986653 }, - { url = "https://files.pythonhosted.org/packages/8e/4f/3fb47d6cbc08c7e00f92300e64ba655428c05c56b8ab6723bd290bae6458/pydantic_core-2.33.0-cp313-cp313t-win_amd64.whl", hash = "sha256:8a1d581e8cdbb857b0e0e81df98603376c1a5c34dc5e54039dcc00f043df81e7", size = 1931234 }, - { url = "https://files.pythonhosted.org/packages/2b/b2/553e42762e7b08771fca41c0230c1ac276f9e79e78f57628e1b7d328551d/pydantic_core-2.33.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5d8dc9f63a26f7259b57f46a7aab5af86b2ad6fbe48487500bb1f4b27e051e4c", size = 2041207 }, - { url = "https://files.pythonhosted.org/packages/85/81/a91a57bbf3efe53525ab75f65944b8950e6ef84fe3b9a26c1ec173363263/pydantic_core-2.33.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:30369e54d6d0113d2aa5aee7a90d17f225c13d87902ace8fcd7bbf99b19124db", size = 1873736 }, - { url = "https://files.pythonhosted.org/packages/9c/d2/5ab52e9f551cdcbc1ee99a0b3ef595f56d031f66f88e5ca6726c49f9ce65/pydantic_core-2.33.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f3eb479354c62067afa62f53bb387827bee2f75c9c79ef25eef6ab84d4b1ae3b", size = 1903794 }, - { url = "https://files.pythonhosted.org/packages/2f/5f/a81742d3f3821b16f1265f057d6e0b68a3ab13a814fe4bffac536a1f26fd/pydantic_core-2.33.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0310524c833d91403c960b8a3cf9f46c282eadd6afd276c8c5edc617bd705dc9", size = 2083457 }, - { url = "https://files.pythonhosted.org/packages/b5/2f/e872005bc0fc47f9c036b67b12349a8522d32e3bda928e82d676e2a594d1/pydantic_core-2.33.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:eddb18a00bbb855325db27b4c2a89a4ba491cd6a0bd6d852b225172a1f54b36c", size = 2119537 }, - { url = "https://files.pythonhosted.org/packages/d3/13/183f13ce647202eaf3dada9e42cdfc59cbb95faedd44d25f22b931115c7f/pydantic_core-2.33.0-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:ade5dbcf8d9ef8f4b28e682d0b29f3008df9842bb5ac48ac2c17bc55771cc976", size = 2080069 }, - { url = "https://files.pythonhosted.org/packages/23/8b/b6be91243da44a26558d9c3a9007043b3750334136c6550551e8092d6d96/pydantic_core-2.33.0-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:2c0afd34f928383e3fd25740f2050dbac9d077e7ba5adbaa2227f4d4f3c8da5c", size = 2251618 }, - { url = "https://files.pythonhosted.org/packages/aa/c5/fbcf1977035b834f63eb542e74cd6c807177f383386175b468f0865bcac4/pydantic_core-2.33.0-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:7da333f21cd9df51d5731513a6d39319892947604924ddf2e24a4612975fb936", size = 2255374 }, - { url = "https://files.pythonhosted.org/packages/2f/f8/66f328e411f1c9574b13c2c28ab01f308b53688bbbe6ca8fb981e6cabc42/pydantic_core-2.33.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:4b6d77c75a57f041c5ee915ff0b0bb58eabb78728b69ed967bc5b780e8f701b8", size = 2082099 }, + { url = "https://files.pythonhosted.org/packages/5d/30/890a583cd3f2be27ecf32b479d5d615710bb926d92da03e3f7838ff3e58b/pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8", size = 1865160 }, + { url = "https://files.pythonhosted.org/packages/1d/9a/b634442e1253bc6889c87afe8bb59447f106ee042140bd57680b3b113ec7/pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d", size = 1776777 }, + { url = "https://files.pythonhosted.org/packages/75/9a/7816295124a6b08c24c96f9ce73085032d8bcbaf7e5a781cd41aa910c891/pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e", size = 1799244 }, + { url = "https://files.pythonhosted.org/packages/a9/8f/89c1405176903e567c5f99ec53387449e62f1121894aa9fc2c4fdc51a59b/pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607", size = 1805307 }, + { url = "https://files.pythonhosted.org/packages/d5/a5/1a194447d0da1ef492e3470680c66048fef56fc1f1a25cafbea4bc1d1c48/pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd", size = 2000663 }, + { url = "https://files.pythonhosted.org/packages/13/a5/1df8541651de4455e7d587cf556201b4f7997191e110bca3b589218745a5/pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea", size = 2655941 }, + { url = "https://files.pythonhosted.org/packages/44/31/a3899b5ce02c4316865e390107f145089876dff7e1dfc770a231d836aed8/pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e", size = 2052105 }, + { url = "https://files.pythonhosted.org/packages/1b/aa/98e190f8745d5ec831f6d5449344c48c0627ac5fed4e5340a44b74878f8e/pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b", size = 1919967 }, + { url = "https://files.pythonhosted.org/packages/ae/35/b6e00b6abb2acfee3e8f85558c02a0822e9a8b2f2d812ea8b9079b118ba0/pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0", size = 1964291 }, + { url = "https://files.pythonhosted.org/packages/13/46/7bee6d32b69191cd649bbbd2361af79c472d72cb29bb2024f0b6e350ba06/pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64", size = 2109666 }, + { url = "https://files.pythonhosted.org/packages/39/ef/7b34f1b122a81b68ed0a7d0e564da9ccdc9a2924c8d6c6b5b11fa3a56970/pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f", size = 1732940 }, + { url = "https://files.pythonhosted.org/packages/2f/76/37b7e76c645843ff46c1d73e046207311ef298d3f7b2f7d8f6ac60113071/pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3", size = 1916804 }, + { url = "https://files.pythonhosted.org/packages/74/7b/8e315f80666194b354966ec84b7d567da77ad927ed6323db4006cf915f3f/pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231", size = 1856459 }, + { url = "https://files.pythonhosted.org/packages/14/de/866bdce10ed808323d437612aca1ec9971b981e1c52e5e42ad9b8e17a6f6/pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee", size = 1770007 }, + { url = "https://files.pythonhosted.org/packages/dc/69/8edd5c3cd48bb833a3f7ef9b81d7666ccddd3c9a635225214e044b6e8281/pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87", size = 1790245 }, + { url = "https://files.pythonhosted.org/packages/80/33/9c24334e3af796ce80d2274940aae38dd4e5676298b4398eff103a79e02d/pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8", size = 1801260 }, + { url = "https://files.pythonhosted.org/packages/a5/6f/e9567fd90104b79b101ca9d120219644d3314962caa7948dd8b965e9f83e/pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327", size = 1996872 }, + { url = "https://files.pythonhosted.org/packages/2d/ad/b5f0fe9e6cfee915dd144edbd10b6e9c9c9c9d7a56b69256d124b8ac682e/pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2", size = 2661617 }, + { url = "https://files.pythonhosted.org/packages/06/c8/7d4b708f8d05a5cbfda3243aad468052c6e99de7d0937c9146c24d9f12e9/pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36", size = 2071831 }, + { url = "https://files.pythonhosted.org/packages/89/4d/3079d00c47f22c9a9a8220db088b309ad6e600a73d7a69473e3a8e5e3ea3/pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126", size = 1917453 }, + { url = "https://files.pythonhosted.org/packages/e9/88/9df5b7ce880a4703fcc2d76c8c2d8eb9f861f79d0c56f4b8f5f2607ccec8/pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e", size = 1968793 }, + { url = "https://files.pythonhosted.org/packages/e3/b9/41f7efe80f6ce2ed3ee3c2dcfe10ab7adc1172f778cc9659509a79518c43/pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24", size = 2116872 }, + { url = "https://files.pythonhosted.org/packages/63/08/b59b7a92e03dd25554b0436554bf23e7c29abae7cce4b1c459cd92746811/pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84", size = 1738535 }, + { url = "https://files.pythonhosted.org/packages/88/8d/479293e4d39ab409747926eec4329de5b7129beaedc3786eca070605d07f/pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9", size = 1917992 }, + { url = "https://files.pythonhosted.org/packages/ad/ef/16ee2df472bf0e419b6bc68c05bf0145c49247a1095e85cee1463c6a44a1/pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc", size = 1856143 }, + { url = "https://files.pythonhosted.org/packages/da/fa/bc3dbb83605669a34a93308e297ab22be82dfb9dcf88c6cf4b4f264e0a42/pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd", size = 1770063 }, + { url = "https://files.pythonhosted.org/packages/4e/48/e813f3bbd257a712303ebdf55c8dc46f9589ec74b384c9f652597df3288d/pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05", size = 1790013 }, + { url = "https://files.pythonhosted.org/packages/b4/e0/56eda3a37929a1d297fcab1966db8c339023bcca0b64c5a84896db3fcc5c/pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d", size = 1801077 }, + { url = "https://files.pythonhosted.org/packages/04/be/5e49376769bfbf82486da6c5c1683b891809365c20d7c7e52792ce4c71f3/pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510", size = 1996782 }, + { url = "https://files.pythonhosted.org/packages/bc/24/e3ee6c04f1d58cc15f37bcc62f32c7478ff55142b7b3e6d42ea374ea427c/pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6", size = 2661375 }, + { url = "https://files.pythonhosted.org/packages/c1/f8/11a9006de4e89d016b8de74ebb1db727dc100608bb1e6bbe9d56a3cbbcce/pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b", size = 2071635 }, + { url = "https://files.pythonhosted.org/packages/7c/45/bdce5779b59f468bdf262a5bc9eecbae87f271c51aef628d8c073b4b4b4c/pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327", size = 1916994 }, + { url = "https://files.pythonhosted.org/packages/d8/fa/c648308fe711ee1f88192cad6026ab4f925396d1293e8356de7e55be89b5/pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6", size = 1968877 }, + { url = "https://files.pythonhosted.org/packages/16/16/b805c74b35607d24d37103007f899abc4880923b04929547ae68d478b7f4/pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f", size = 2116814 }, + { url = "https://files.pythonhosted.org/packages/d1/58/5305e723d9fcdf1c5a655e6a4cc2a07128bf644ff4b1d98daf7a9dbf57da/pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769", size = 1738360 }, + { url = "https://files.pythonhosted.org/packages/a5/ae/e14b0ff8b3f48e02394d8acd911376b7b66e164535687ef7dc24ea03072f/pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5", size = 1919411 }, ] [[package]] name = "pygments" -version = "2.19.1" +version = "2.18.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f", size = 4968581 } +sdist = { url = "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", size = 4891905 } wheels = [ - { url = "https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c", size = 1225293 }, + { url = "https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a", size = 1205513 }, ] [[package]] name = "pylint" -version = "3.3.6" +version = "3.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "astroid" }, @@ -1399,22 +1326,22 @@ dependencies = [ { name = "platformdirs" }, { name = "tomlkit" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/69/a7/113d02340afb9dcbb0c8b25454e9538cd08f0ebf3e510df4ed916caa1a89/pylint-3.3.6.tar.gz", hash = "sha256:b634a041aac33706d56a0d217e6587228c66427e20ec21a019bc4cdee48c040a", size = 1519586 } +sdist = { url = "https://files.pythonhosted.org/packages/63/3a/13e90e29777e695d90f422cf4fadb81c999e4755a9089838561bd0590cac/pylint-3.3.1.tar.gz", hash = "sha256:9f3dcc87b1203e612b78d91a896407787e708b3f189b5fa0b307712d49ff0c6e", size = 1516703 } wheels = [ - { url = "https://files.pythonhosted.org/packages/31/21/9537fc94aee9ec7316a230a49895266cf02d78aa29b0a2efbc39566e0935/pylint-3.3.6-py3-none-any.whl", hash = "sha256:8b7c2d3e86ae3f94fb27703d521dd0b9b6b378775991f504d7c3a6275aa0a6a6", size = 522462 }, + { url = "https://files.pythonhosted.org/packages/4d/11/4a3f814eee14593f3cfcf7046bc765bf1646d5c88132c08c45310fc7d85f/pylint-3.3.1-py3-none-any.whl", hash = "sha256:2f846a466dd023513240bc140ad2dd73bfc080a5d85a710afdb728c420a5a2b9", size = 521768 }, ] [[package]] name = "pymdown-extensions" -version = "10.14.3" +version = "10.11.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown" }, { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7c/44/e6de2fdc880ad0ec7547ca2e087212be815efbc9a425a8d5ba9ede602cbb/pymdown_extensions-10.14.3.tar.gz", hash = "sha256:41e576ce3f5d650be59e900e4ceff231e0aed2a88cf30acaee41e02f063a061b", size = 846846 } +sdist = { url = "https://files.pythonhosted.org/packages/f4/71/2730a20e9e3752393d78998347f8b1085ef9c417646ea9befbeef221e3c4/pymdown_extensions-10.11.2.tar.gz", hash = "sha256:bc8847ecc9e784a098efd35e20cba772bc5a1b529dfcef9dc1972db9021a1049", size = 830241 } wheels = [ - { url = "https://files.pythonhosted.org/packages/eb/f5/b9e2a42aa8f9e34d52d66de87941ecd236570c7ed2e87775ed23bbe4e224/pymdown_extensions-10.14.3-py3-none-any.whl", hash = "sha256:05e0bee73d64b9c71a4ae17c72abc2f700e8bc8403755a00580b49a4e9f189e9", size = 264467 }, + { url = "https://files.pythonhosted.org/packages/c2/35/c0edf199257ef0a7d407d29cd51c4e70d1dad4370a5f44deb65a7a5475e2/pymdown_extensions-10.11.2-py3-none-any.whl", hash = "sha256:41cdde0a77290e480cf53892f5c5e50921a7ee3e5cd60ba91bf19837b33badcf", size = 259044 }, ] [[package]] @@ -1431,11 +1358,11 @@ wheels = [ [[package]] name = "pytz" -version = "2025.2" +version = "2024.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz", hash = "sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3", size = 320884 } +sdist = { url = "https://files.pythonhosted.org/packages/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a", size = 319692 } wheels = [ - { url = "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", hash = "sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", size = 509225 }, + { url = "https://files.pythonhosted.org/packages/11/c3/005fcca25ce078d2cc29fd559379817424e94885510568bc1bc53d7d5846/pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725", size = 508002 }, ] [[package]] @@ -1549,7 +1476,7 @@ wheels = [ [[package]] name = "red-discordbot" -version = "3.5.18" +version = "3.5.14" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiohttp" }, @@ -1589,11 +1516,10 @@ dependencies = [ { name = "uvloop", marker = "platform_python_implementation == 'CPython' and sys_platform != 'win32'" }, { name = "yarl" }, { name = "zipp", marker = "python_full_version >= '3.12'" }, - { name = "zstandard" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/da/49/8926e62a2185699fa08c138181f49cb21c4bdeb6b2833c8b168aa34dc1b0/red_discordbot-3.5.18.tar.gz", hash = "sha256:bf760a35c54b57bd51f6d03eba66e77d8cedc58da0f59fc3243b0a1ed359523c", size = 3735416 } +sdist = { url = "https://files.pythonhosted.org/packages/ea/b6/b680024b91c8dbf89c66aa1f43a7599b155e6e69101641a9da66d5907011/red_discordbot-3.5.14.tar.gz", hash = "sha256:b603b59a75429fa37bf6bc303f08a95e725c339599ad044278bed8337429c110", size = 3681606 } wheels = [ - { url = "https://files.pythonhosted.org/packages/84/8f/bf3bba7fde1146564053e4131f72c2fc439221732e634f700623787a11ab/red_discordbot-3.5.18-py3-none-any.whl", hash = "sha256:51048b356003bffc17057a705d6eced538b997f770f4401731af7e0fccd8e7a3", size = 5883303 }, + { url = "https://files.pythonhosted.org/packages/9d/0a/5cb23863863ed70bc60937fe16f4626b9cb22fe0afd74ac67a0f543ed33a/Red_DiscordBot-3.5.14-py3-none-any.whl", hash = "sha256:9be0806c21cf83c0e972b331583b088786b5f3c2d8221eefab5adbf1ac9b761f", size = 5772233 }, ] [[package]] @@ -1610,6 +1536,59 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/20/01/748c284bd03e788ac2c6cf2c58f19b4d1e3ad96dae36b21e289f1bc6c5e5/Red_Lavalink-0.11.0-py3-none-any.whl", hash = "sha256:f76329eee2ec5e4d77e0e97fe6ba76207efdcc8d963a9c39913cf91057d7920a", size = 36060 }, ] +[[package]] +name = "regex" +version = "2024.9.11" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/38/148df33b4dbca3bd069b963acab5e0fa1a9dbd6820f8c322d0dd6faeff96/regex-2024.9.11.tar.gz", hash = "sha256:6c188c307e8433bcb63dc1915022deb553b4203a70722fc542c363bf120a01fd", size = 399403 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/86/a1/d526b7b6095a0019aa360948c143aacfeb029919c898701ce7763bbe4c15/regex-2024.9.11-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2cce2449e5927a0bf084d346da6cd5eb016b2beca10d0013ab50e3c226ffc0df", size = 482483 }, + { url = "https://files.pythonhosted.org/packages/32/d9/bfdd153179867c275719e381e1e8e84a97bd186740456a0dcb3e7125c205/regex-2024.9.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3b37fa423beefa44919e009745ccbf353d8c981516e807995b2bd11c2c77d268", size = 287442 }, + { url = "https://files.pythonhosted.org/packages/33/c4/60f3370735135e3a8d673ddcdb2507a8560d0e759e1398d366e43d000253/regex-2024.9.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:64ce2799bd75039b480cc0360907c4fb2f50022f030bf9e7a8705b636e408fad", size = 284561 }, + { url = "https://files.pythonhosted.org/packages/b1/51/91a5ebdff17f9ec4973cb0aa9d37635efec1c6868654bbc25d1543aca4ec/regex-2024.9.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4cc92bb6db56ab0c1cbd17294e14f5e9224f0cc6521167ef388332604e92679", size = 791779 }, + { url = "https://files.pythonhosted.org/packages/07/4a/022c5e6f0891a90cd7eb3d664d6c58ce2aba48bff107b00013f3d6167069/regex-2024.9.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d05ac6fa06959c4172eccd99a222e1fbf17b5670c4d596cb1e5cde99600674c4", size = 832605 }, + { url = "https://files.pythonhosted.org/packages/ac/1c/3793990c8c83ca04e018151ddda83b83ecc41d89964f0f17749f027fc44d/regex-2024.9.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:040562757795eeea356394a7fb13076ad4f99d3c62ab0f8bdfb21f99a1f85664", size = 818556 }, + { url = "https://files.pythonhosted.org/packages/e9/5c/8b385afbfacb853730682c57be56225f9fe275c5bf02ac1fc88edbff316d/regex-2024.9.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6113c008a7780792efc80f9dfe10ba0cd043cbf8dc9a76ef757850f51b4edc50", size = 792808 }, + { url = "https://files.pythonhosted.org/packages/9b/8b/a4723a838b53c771e9240951adde6af58c829fb6a6a28f554e8131f53839/regex-2024.9.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8e5fb5f77c8745a60105403a774fe2c1759b71d3e7b4ca237a5e67ad066c7199", size = 781115 }, + { url = "https://files.pythonhosted.org/packages/83/5f/031a04b6017033d65b261259c09043c06f4ef2d4eac841d0649d76d69541/regex-2024.9.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:54d9ff35d4515debf14bc27f1e3b38bfc453eff3220f5bce159642fa762fe5d4", size = 778155 }, + { url = "https://files.pythonhosted.org/packages/fd/cd/4660756070b03ce4a66663a43f6c6e7ebc2266cc6b4c586c167917185eb4/regex-2024.9.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:df5cbb1fbc74a8305b6065d4ade43b993be03dbe0f8b30032cced0d7740994bd", size = 784614 }, + { url = "https://files.pythonhosted.org/packages/93/8d/65b9bea7df120a7be8337c415b6d256ba786cbc9107cebba3bf8ff09da99/regex-2024.9.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:7fb89ee5d106e4a7a51bce305ac4efb981536301895f7bdcf93ec92ae0d91c7f", size = 853744 }, + { url = "https://files.pythonhosted.org/packages/96/a7/fba1eae75eb53a704475baf11bd44b3e6ccb95b316955027eb7748f24ef8/regex-2024.9.11-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a738b937d512b30bf75995c0159c0ddf9eec0775c9d72ac0202076c72f24aa96", size = 855890 }, + { url = "https://files.pythonhosted.org/packages/45/14/d864b2db80a1a3358534392373e8a281d95b28c29c87d8548aed58813910/regex-2024.9.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e28f9faeb14b6f23ac55bfbbfd3643f5c7c18ede093977f1df249f73fd22c7b1", size = 781887 }, + { url = "https://files.pythonhosted.org/packages/4d/a9/bfb29b3de3eb11dc9b412603437023b8e6c02fb4e11311863d9bf62c403a/regex-2024.9.11-cp311-cp311-win32.whl", hash = "sha256:18e707ce6c92d7282dfce370cd205098384b8ee21544e7cb29b8aab955b66fa9", size = 261644 }, + { url = "https://files.pythonhosted.org/packages/c7/ab/1ad2511cf6a208fde57fafe49829cab8ca018128ab0d0b48973d8218634a/regex-2024.9.11-cp311-cp311-win_amd64.whl", hash = "sha256:313ea15e5ff2a8cbbad96ccef6be638393041b0a7863183c2d31e0c6116688cf", size = 274033 }, + { url = "https://files.pythonhosted.org/packages/6e/92/407531450762bed778eedbde04407f68cbd75d13cee96c6f8d6903d9c6c1/regex-2024.9.11-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b0d0a6c64fcc4ef9c69bd5b3b3626cc3776520a1637d8abaa62b9edc147a58f7", size = 483590 }, + { url = "https://files.pythonhosted.org/packages/8e/a2/048acbc5ae1f615adc6cba36cc45734e679b5f1e4e58c3c77f0ed611d4e2/regex-2024.9.11-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:49b0e06786ea663f933f3710a51e9385ce0cba0ea56b67107fd841a55d56a231", size = 288175 }, + { url = "https://files.pythonhosted.org/packages/8a/ea/909d8620329ab710dfaf7b4adee41242ab7c9b95ea8d838e9bfe76244259/regex-2024.9.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5b513b6997a0b2f10e4fd3a1313568e373926e8c252bd76c960f96fd039cd28d", size = 284749 }, + { url = "https://files.pythonhosted.org/packages/ca/fa/521eb683b916389b4975337873e66954e0f6d8f91bd5774164a57b503185/regex-2024.9.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee439691d8c23e76f9802c42a95cfeebf9d47cf4ffd06f18489122dbb0a7ad64", size = 795181 }, + { url = "https://files.pythonhosted.org/packages/28/db/63047feddc3280cc242f9c74f7aeddc6ee662b1835f00046f57d5630c827/regex-2024.9.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8f877c89719d759e52783f7fe6e1c67121076b87b40542966c02de5503ace42", size = 835842 }, + { url = "https://files.pythonhosted.org/packages/e3/94/86adc259ff8ec26edf35fcca7e334566c1805c7493b192cb09679f9c3dee/regex-2024.9.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:23b30c62d0f16827f2ae9f2bb87619bc4fba2044911e2e6c2eb1af0161cdb766", size = 823533 }, + { url = "https://files.pythonhosted.org/packages/29/52/84662b6636061277cb857f658518aa7db6672bc6d1a3f503ccd5aefc581e/regex-2024.9.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85ab7824093d8f10d44330fe1e6493f756f252d145323dd17ab6b48733ff6c0a", size = 797037 }, + { url = "https://files.pythonhosted.org/packages/c3/2a/cd4675dd987e4a7505f0364a958bc41f3b84942de9efaad0ef9a2646681c/regex-2024.9.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8dee5b4810a89447151999428fe096977346cf2f29f4d5e29609d2e19e0199c9", size = 784106 }, + { url = "https://files.pythonhosted.org/packages/6f/75/3ea7ec29de0bbf42f21f812f48781d41e627d57a634f3f23947c9a46e303/regex-2024.9.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:98eeee2f2e63edae2181c886d7911ce502e1292794f4c5ee71e60e23e8d26b5d", size = 782468 }, + { url = "https://files.pythonhosted.org/packages/d3/67/15519d69b52c252b270e679cb578e22e0c02b8dd4e361f2b04efcc7f2335/regex-2024.9.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:57fdd2e0b2694ce6fc2e5ccf189789c3e2962916fb38779d3e3521ff8fe7a822", size = 790324 }, + { url = "https://files.pythonhosted.org/packages/9c/71/eff77d3fe7ba08ab0672920059ec30d63fa7e41aa0fb61c562726e9bd721/regex-2024.9.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d552c78411f60b1fdaafd117a1fca2f02e562e309223b9d44b7de8be451ec5e0", size = 860214 }, + { url = "https://files.pythonhosted.org/packages/81/11/e1bdf84a72372e56f1ea4b833dd583b822a23138a616ace7ab57a0e11556/regex-2024.9.11-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a0b2b80321c2ed3fcf0385ec9e51a12253c50f146fddb2abbb10f033fe3d049a", size = 859420 }, + { url = "https://files.pythonhosted.org/packages/ea/75/9753e9dcebfa7c3645563ef5c8a58f3a47e799c872165f37c55737dadd3e/regex-2024.9.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:18406efb2f5a0e57e3a5881cd9354c1512d3bb4f5c45d96d110a66114d84d23a", size = 787333 }, + { url = "https://files.pythonhosted.org/packages/bc/4e/ba1cbca93141f7416624b3ae63573e785d4bc1834c8be44a8f0747919eca/regex-2024.9.11-cp312-cp312-win32.whl", hash = "sha256:e464b467f1588e2c42d26814231edecbcfe77f5ac414d92cbf4e7b55b2c2a776", size = 262058 }, + { url = "https://files.pythonhosted.org/packages/6e/16/efc5f194778bf43e5888209e5cec4b258005d37c613b67ae137df3b89c53/regex-2024.9.11-cp312-cp312-win_amd64.whl", hash = "sha256:9e8719792ca63c6b8340380352c24dcb8cd7ec49dae36e963742a275dfae6009", size = 273526 }, + { url = "https://files.pythonhosted.org/packages/93/0a/d1c6b9af1ff1e36832fe38d74d5c5bab913f2bdcbbd6bc0e7f3ce8b2f577/regex-2024.9.11-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c157bb447303070f256e084668b702073db99bbb61d44f85d811025fcf38f784", size = 483376 }, + { url = "https://files.pythonhosted.org/packages/a4/42/5910a050c105d7f750a72dcb49c30220c3ae4e2654e54aaaa0e9bc0584cb/regex-2024.9.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4db21ece84dfeefc5d8a3863f101995de646c6cb0536952c321a2650aa202c36", size = 288112 }, + { url = "https://files.pythonhosted.org/packages/8d/56/0c262aff0e9224fa7ffce47b5458d373f4d3e3ff84e99b5ff0cb15e0b5b2/regex-2024.9.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:220e92a30b426daf23bb67a7962900ed4613589bab80382be09b48896d211e92", size = 284608 }, + { url = "https://files.pythonhosted.org/packages/b9/54/9fe8f9aec5007bbbbce28ba3d2e3eaca425f95387b7d1e84f0d137d25237/regex-2024.9.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb1ae19e64c14c7ec1995f40bd932448713d3c73509e82d8cd7744dc00e29e86", size = 795337 }, + { url = "https://files.pythonhosted.org/packages/b2/e7/6b2f642c3cded271c4f16cc4daa7231be544d30fe2b168e0223724b49a61/regex-2024.9.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f47cd43a5bfa48f86925fe26fbdd0a488ff15b62468abb5d2a1e092a4fb10e85", size = 835848 }, + { url = "https://files.pythonhosted.org/packages/cd/9e/187363bdf5d8c0e4662117b92aa32bf52f8f09620ae93abc7537d96d3311/regex-2024.9.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9d4a76b96f398697fe01117093613166e6aa8195d63f1b4ec3f21ab637632963", size = 823503 }, + { url = "https://files.pythonhosted.org/packages/f8/10/601303b8ee93589f879664b0cfd3127949ff32b17f9b6c490fb201106c4d/regex-2024.9.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ea51dcc0835eea2ea31d66456210a4e01a076d820e9039b04ae8d17ac11dee6", size = 797049 }, + { url = "https://files.pythonhosted.org/packages/ef/1c/ea200f61ce9f341763f2717ab4daebe4422d83e9fd4ac5e33435fd3a148d/regex-2024.9.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7aaa315101c6567a9a45d2839322c51c8d6e81f67683d529512f5bcfb99c802", size = 784144 }, + { url = "https://files.pythonhosted.org/packages/d8/5c/d2429be49ef3292def7688401d3deb11702c13dcaecdc71d2b407421275b/regex-2024.9.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c57d08ad67aba97af57a7263c2d9006d5c404d721c5f7542f077f109ec2a4a29", size = 782483 }, + { url = "https://files.pythonhosted.org/packages/12/d9/cbc30f2ff7164f3b26a7760f87c54bf8b2faed286f60efd80350a51c5b99/regex-2024.9.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:f8404bf61298bb6f8224bb9176c1424548ee1181130818fcd2cbffddc768bed8", size = 790320 }, + { url = "https://files.pythonhosted.org/packages/19/1d/43ed03a236313639da5a45e61bc553c8d41e925bcf29b0f8ecff0c2c3f25/regex-2024.9.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:dd4490a33eb909ef5078ab20f5f000087afa2a4daa27b4c072ccb3cb3050ad84", size = 860435 }, + { url = "https://files.pythonhosted.org/packages/34/4f/5d04da61c7c56e785058a46349f7285ae3ebc0726c6ea7c5c70600a52233/regex-2024.9.11-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:eee9130eaad130649fd73e5cd92f60e55708952260ede70da64de420cdcad554", size = 859571 }, + { url = "https://files.pythonhosted.org/packages/12/7f/8398c8155a3c70703a8e91c29532558186558e1aea44144b382faa2a6f7a/regex-2024.9.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6a2644a93da36c784e546de579ec1806bfd2763ef47babc1b03d765fe560c9f8", size = 787398 }, + { url = "https://files.pythonhosted.org/packages/58/3a/f5903977647a9a7e46d5535e9e96c194304aeeca7501240509bde2f9e17f/regex-2024.9.11-cp313-cp313-win32.whl", hash = "sha256:e997fd30430c57138adc06bba4c7c2968fb13d101e57dd5bb9355bf8ce3fa7e8", size = 262035 }, + { url = "https://files.pythonhosted.org/packages/ff/80/51ba3a4b7482f6011095b3a036e07374f64de180b7d870b704ed22509002/regex-2024.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:042c55879cfeb21a8adacc84ea347721d3d83a159da6acdf1116859e2427c43f", size = 273510 }, +] + [[package]] name = "requests" version = "2.32.3" @@ -1640,27 +1619,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.11.2" +version = "0.6.9" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/90/61/fb87430f040e4e577e784e325351186976516faef17d6fcd921fe28edfd7/ruff-0.11.2.tar.gz", hash = "sha256:ec47591497d5a1050175bdf4e1a4e6272cddff7da88a2ad595e1e326041d8d94", size = 3857511 } +sdist = { url = "https://files.pythonhosted.org/packages/26/0d/6148a48dab5662ca1d5a93b7c0d13c03abd3cc7e2f35db08410e47cef15d/ruff-0.6.9.tar.gz", hash = "sha256:b076ef717a8e5bc819514ee1d602bbdca5b4420ae13a9cf61a0c0a4f53a2baa2", size = 3095355 } wheels = [ - { url = "https://files.pythonhosted.org/packages/62/99/102578506f0f5fa29fd7e0df0a273864f79af044757aef73d1cae0afe6ad/ruff-0.11.2-py3-none-linux_armv6l.whl", hash = "sha256:c69e20ea49e973f3afec2c06376eb56045709f0212615c1adb0eda35e8a4e477", size = 10113146 }, - { url = "https://files.pythonhosted.org/packages/74/ad/5cd4ba58ab602a579997a8494b96f10f316e874d7c435bcc1a92e6da1b12/ruff-0.11.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:2c5424cc1c4eb1d8ecabe6d4f1b70470b4f24a0c0171356290b1953ad8f0e272", size = 10867092 }, - { url = "https://files.pythonhosted.org/packages/fc/3e/d3f13619e1d152c7b600a38c1a035e833e794c6625c9a6cea6f63dbf3af4/ruff-0.11.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:ecf20854cc73f42171eedb66f006a43d0a21bfb98a2523a809931cda569552d9", size = 10224082 }, - { url = "https://files.pythonhosted.org/packages/90/06/f77b3d790d24a93f38e3806216f263974909888fd1e826717c3ec956bbcd/ruff-0.11.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c543bf65d5d27240321604cee0633a70c6c25c9a2f2492efa9f6d4b8e4199bb", size = 10394818 }, - { url = "https://files.pythonhosted.org/packages/99/7f/78aa431d3ddebfc2418cd95b786642557ba8b3cb578c075239da9ce97ff9/ruff-0.11.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:20967168cc21195db5830b9224be0e964cc9c8ecf3b5a9e3ce19876e8d3a96e3", size = 9952251 }, - { url = "https://files.pythonhosted.org/packages/30/3e/f11186d1ddfaca438c3bbff73c6a2fdb5b60e6450cc466129c694b0ab7a2/ruff-0.11.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:955a9ce63483999d9f0b8f0b4a3ad669e53484232853054cc8b9d51ab4c5de74", size = 11563566 }, - { url = "https://files.pythonhosted.org/packages/22/6c/6ca91befbc0a6539ee133d9a9ce60b1a354db12c3c5d11cfdbf77140f851/ruff-0.11.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:86b3a27c38b8fce73bcd262b0de32e9a6801b76d52cdb3ae4c914515f0cef608", size = 12208721 }, - { url = "https://files.pythonhosted.org/packages/19/b0/24516a3b850d55b17c03fc399b681c6a549d06ce665915721dc5d6458a5c/ruff-0.11.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3b66a03b248c9fcd9d64d445bafdf1589326bee6fc5c8e92d7562e58883e30f", size = 11662274 }, - { url = "https://files.pythonhosted.org/packages/d7/65/76be06d28ecb7c6070280cef2bcb20c98fbf99ff60b1c57d2fb9b8771348/ruff-0.11.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0397c2672db015be5aa3d4dac54c69aa012429097ff219392c018e21f5085147", size = 13792284 }, - { url = "https://files.pythonhosted.org/packages/ce/d2/4ceed7147e05852876f3b5f3fdc23f878ce2b7e0b90dd6e698bda3d20787/ruff-0.11.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:869bcf3f9abf6457fbe39b5a37333aa4eecc52a3b99c98827ccc371a8e5b6f1b", size = 11327861 }, - { url = "https://files.pythonhosted.org/packages/c4/78/4935ecba13706fd60ebe0e3dc50371f2bdc3d9bc80e68adc32ff93914534/ruff-0.11.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2a2b50ca35457ba785cd8c93ebbe529467594087b527a08d487cf0ee7b3087e9", size = 10276560 }, - { url = "https://files.pythonhosted.org/packages/81/7f/1b2435c3f5245d410bb5dc80f13ec796454c21fbda12b77d7588d5cf4e29/ruff-0.11.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7c69c74bf53ddcfbc22e6eb2f31211df7f65054bfc1f72288fc71e5f82db3eab", size = 9945091 }, - { url = "https://files.pythonhosted.org/packages/39/c4/692284c07e6bf2b31d82bb8c32f8840f9d0627d92983edaac991a2b66c0a/ruff-0.11.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:6e8fb75e14560f7cf53b15bbc55baf5ecbe373dd5f3aab96ff7aa7777edd7630", size = 10977133 }, - { url = "https://files.pythonhosted.org/packages/94/cf/8ab81cb7dd7a3b0a3960c2769825038f3adcd75faf46dd6376086df8b128/ruff-0.11.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:842a472d7b4d6f5924e9297aa38149e5dcb1e628773b70e6387ae2c97a63c58f", size = 11378514 }, - { url = "https://files.pythonhosted.org/packages/d9/3a/a647fa4f316482dacf2fd68e8a386327a33d6eabd8eb2f9a0c3d291ec549/ruff-0.11.2-py3-none-win32.whl", hash = "sha256:aca01ccd0eb5eb7156b324cfaa088586f06a86d9e5314b0eb330cb48415097cc", size = 10319835 }, - { url = "https://files.pythonhosted.org/packages/86/54/3c12d3af58012a5e2cd7ebdbe9983f4834af3f8cbea0e8a8c74fa1e23b2b/ruff-0.11.2-py3-none-win_amd64.whl", hash = "sha256:3170150172a8f994136c0c66f494edf199a0bbea7a409f649e4bc8f4d7084080", size = 11373713 }, - { url = "https://files.pythonhosted.org/packages/d6/d4/dd813703af8a1e2ac33bf3feb27e8a5ad514c9f219df80c64d69807e7f71/ruff-0.11.2-py3-none-win_arm64.whl", hash = "sha256:52933095158ff328f4c77af3d74f0379e34fd52f175144cefc1b192e7ccd32b4", size = 10441990 }, + { url = "https://files.pythonhosted.org/packages/6e/8f/f7a0a0ef1818662efb32ed6df16078c95da7a0a3248d64c2410c1e27799f/ruff-0.6.9-py3-none-linux_armv6l.whl", hash = "sha256:064df58d84ccc0ac0fcd63bc3090b251d90e2a372558c0f057c3f75ed73e1ccd", size = 10440526 }, + { url = "https://files.pythonhosted.org/packages/8b/69/b179a5faf936a9e2ab45bb412a668e4661eded964ccfa19d533f29463ef6/ruff-0.6.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:140d4b5c9f5fc7a7b074908a78ab8d384dd7f6510402267bc76c37195c02a7ec", size = 10034612 }, + { url = "https://files.pythonhosted.org/packages/c7/ef/fd1b4be979c579d191eeac37b5cfc0ec906de72c8bcd8595e2c81bb700c1/ruff-0.6.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53fd8ca5e82bdee8da7f506d7b03a261f24cd43d090ea9db9a1dc59d9313914c", size = 9706197 }, + { url = "https://files.pythonhosted.org/packages/29/61/b376d775deb5851cb48d893c568b511a6d3625ef2c129ad5698b64fb523c/ruff-0.6.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645d7d8761f915e48a00d4ecc3686969761df69fb561dd914a773c1a8266e14e", size = 10751855 }, + { url = "https://files.pythonhosted.org/packages/13/d7/def9e5f446d75b9a9c19b24231a3a658c075d79163b08582e56fa5dcfa38/ruff-0.6.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eae02b700763e3847595b9d2891488989cac00214da7f845f4bcf2989007d577", size = 10200889 }, + { url = "https://files.pythonhosted.org/packages/6c/d6/7f34160818bcb6e84ce293a5966cba368d9112ff0289b273fbb689046047/ruff-0.6.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d5ccc9e58112441de8ad4b29dcb7a86dc25c5f770e3c06a9d57e0e5eba48829", size = 11038678 }, + { url = "https://files.pythonhosted.org/packages/13/34/a40ff8ae62fb1b26fb8e6fa7e64bc0e0a834b47317880de22edd6bfb54fb/ruff-0.6.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:417b81aa1c9b60b2f8edc463c58363075412866ae4e2b9ab0f690dc1e87ac1b5", size = 11808682 }, + { url = "https://files.pythonhosted.org/packages/2e/6d/25a4386ae4009fc798bd10ba48c942d1b0b3e459b5403028f1214b6dd161/ruff-0.6.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c866b631f5fbce896a74a6e4383407ba7507b815ccc52bcedabb6810fdb3ef7", size = 11330446 }, + { url = "https://files.pythonhosted.org/packages/f7/f6/bdf891a9200d692c94ebcd06ae5a2fa5894e522f2c66c2a12dd5d8cb2654/ruff-0.6.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b118afbb3202f5911486ad52da86d1d52305b59e7ef2031cea3425142b97d6f", size = 12483048 }, + { url = "https://files.pythonhosted.org/packages/a7/86/96f4252f41840e325b3fa6c48297e661abb9f564bd7dcc0572398c8daa42/ruff-0.6.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a67267654edc23c97335586774790cde402fb6bbdb3c2314f1fc087dee320bfa", size = 10936855 }, + { url = "https://files.pythonhosted.org/packages/45/87/801a52d26c8dbf73424238e9908b9ceac430d903c8ef35eab1b44fcfa2bd/ruff-0.6.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3ef0cc774b00fec123f635ce5c547dac263f6ee9fb9cc83437c5904183b55ceb", size = 10713007 }, + { url = "https://files.pythonhosted.org/packages/be/27/6f7161d90320a389695e32b6ebdbfbedde28ccbf52451e4b723d7ce744ad/ruff-0.6.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:12edd2af0c60fa61ff31cefb90aef4288ac4d372b4962c2864aeea3a1a2460c0", size = 10274594 }, + { url = "https://files.pythonhosted.org/packages/00/52/dc311775e7b5f5b19831563cb1572ecce63e62681bccc609867711fae317/ruff-0.6.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:55bb01caeaf3a60b2b2bba07308a02fca6ab56233302406ed5245180a05c5625", size = 10608024 }, + { url = "https://files.pythonhosted.org/packages/98/b6/be0a1ddcbac65a30c985cf7224c4fce786ba2c51e7efeb5178fe410ed3cf/ruff-0.6.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:925d26471fa24b0ce5a6cdfab1bb526fb4159952385f386bdcc643813d472039", size = 10982085 }, + { url = "https://files.pythonhosted.org/packages/bb/a4/c84bc13d0b573cf7bb7d17b16d6d29f84267c92d79b2f478d4ce322e8e72/ruff-0.6.9-py3-none-win32.whl", hash = "sha256:eb61ec9bdb2506cffd492e05ac40e5bc6284873aceb605503d8494180d6fc84d", size = 8522088 }, + { url = "https://files.pythonhosted.org/packages/74/be/fc352bd8ca40daae8740b54c1c3e905a7efe470d420a268cd62150248c91/ruff-0.6.9-py3-none-win_amd64.whl", hash = "sha256:785d31851c1ae91f45b3d8fe23b8ae4b5170089021fbb42402d811135f0b7117", size = 9359275 }, + { url = "https://files.pythonhosted.org/packages/3e/14/fd026bc74ded05e2351681545a5f626e78ef831f8edce064d61acd2e6ec7/ruff-0.6.9-py3-none-win_arm64.whl", hash = "sha256:a9641e31476d601f83cd602608739a0840e348bda93fec9f1ee816f8b6798b93", size = 8679879 }, ] [[package]] @@ -1688,16 +1667,10 @@ dependencies = [ { name = "py-dactyl" }, { name = "pydantic" }, { name = "red-discordbot" }, - { name = "watchdog" }, { name = "websockets" }, ] -[package.dev-dependencies] -dev = [ - { name = "pylint" }, - { name = "ruff" }, - { name = "sqlite-web" }, -] +[package.optional-dependencies] documentation = [ { name = "mkdocs" }, { name = "mkdocs-git-authors-plugin" }, @@ -1707,36 +1680,40 @@ documentation = [ { name = "mkdocstrings", extra = ["python"] }, ] +[package.dev-dependencies] +dev = [ + { name = "pylint" }, + { name = "ruff" }, + { name = "sqlite-web" }, +] + [package.metadata] requires-dist = [ - { name = "aiosqlite", specifier = "==0.21.0" }, - { name = "beautifulsoup4", specifier = "==4.13.3" }, - { name = "colorthief", specifier = "==0.2.1" }, - { name = "markdownify", specifier = "==1.1.0" }, - { name = "numpy", specifier = "==2.2.4" }, - { name = "phx-class-registry", specifier = "==5.1.1" }, - { name = "pillow", specifier = "==10.4.0" }, - { name = "pip", specifier = "==25.0.1" }, - { name = "py-dactyl", git = "https://github.com/iamkubi/pydactyl?tag=v2.0.5" }, - { name = "pydantic", specifier = "==2.11.1" }, - { name = "red-discordbot", specifier = "==3.5.18" }, - { name = "watchdog", specifier = "==6.0.0" }, - { name = "websockets", specifier = "==15.0.1" }, + { name = "aiosqlite", specifier = ">=0.20.0" }, + { name = "beautifulsoup4", specifier = ">=4.12.3" }, + { name = "colorthief", specifier = ">=0.2.1" }, + { name = "markdownify", specifier = ">=0.13.1" }, + { name = "mkdocs", marker = "extra == 'documentation'", specifier = ">=1.6.1" }, + { name = "mkdocs-git-authors-plugin", marker = "extra == 'documentation'", specifier = ">=0.9.0" }, + { name = "mkdocs-git-revision-date-localized-plugin", marker = "extra == 'documentation'", specifier = ">=1.2.9" }, + { name = "mkdocs-material", extras = ["imaging"], marker = "extra == 'documentation'", specifier = ">=9.5.40" }, + { name = "mkdocs-redirects", marker = "extra == 'documentation'", specifier = ">=1.2.1" }, + { name = "mkdocstrings", extras = ["python"], marker = "extra == 'documentation'", specifier = ">=0.26.1" }, + { name = "numpy", specifier = ">=2.1.2" }, + { name = "phx-class-registry", specifier = ">=5.0.0" }, + { name = "pillow", specifier = ">=10.4.0" }, + { name = "pip", specifier = ">=24.3.1" }, + { name = "py-dactyl", git = "https://github.com/cswimr/pydactyl" }, + { name = "pydantic", specifier = ">=2.9.2" }, + { name = "red-discordbot", specifier = ">=3.5.14" }, + { name = "websockets", specifier = ">=13.1" }, ] [package.metadata.requires-dev] dev = [ - { name = "pylint", specifier = "==3.3.6" }, - { name = "ruff", specifier = "==0.11.2" }, - { name = "sqlite-web", specifier = "==0.6.4" }, -] -documentation = [ - { name = "mkdocs", specifier = "==1.6.1" }, - { name = "mkdocs-git-authors-plugin", specifier = "==0.9.4" }, - { name = "mkdocs-git-revision-date-localized-plugin", specifier = "==1.4.5" }, - { name = "mkdocs-material", extras = ["imaging"], specifier = "==9.6.10" }, - { name = "mkdocs-redirects", specifier = "==1.2.2" }, - { name = "mkdocstrings", extras = ["python"], specifier = "==0.29.0" }, + { name = "pylint", specifier = ">=3.3.1" }, + { name = "ruff", specifier = ">=0.6.9" }, + { name = "sqlite-web", specifier = ">=0.6.4" }, ] [[package]] @@ -1750,11 +1727,11 @@ wheels = [ [[package]] name = "smmap" -version = "5.0.2" +version = "5.0.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/44/cd/a040c4b3119bbe532e5b0732286f805445375489fceaec1f48306068ee3b/smmap-5.0.2.tar.gz", hash = "sha256:26ea65a03958fa0c8a1c7e8c7a58fdc77221b8910f6be2131affade476898ad5", size = 22329 } +sdist = { url = "https://files.pythonhosted.org/packages/88/04/b5bf6d21dc4041000ccba7eb17dd3055feb237e7ffc2c20d3fae3af62baa/smmap-5.0.1.tar.gz", hash = "sha256:dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62", size = 22291 } wheels = [ - { url = "https://files.pythonhosted.org/packages/04/be/d09147ad1ec7934636ad912901c5fd7667e1c858e19d355237db0d0cd5e4/smmap-5.0.2-py3-none-any.whl", hash = "sha256:b30115f0def7d7531d22a0fb6502488d879e75b260a9db4d0819cfb25403af5e", size = 24303 }, + { url = "https://files.pythonhosted.org/packages/a7/a5/10f97f73544edcdef54409f1d839f6049a0d79df68adbc1ceb24d1aaca42/smmap-5.0.1-py3-none-any.whl", hash = "sha256:e6d8668fa5f93e706934a62d7b4db19c8d9eb8cf2adbb75ef1b675aa332b69da", size = 24282 }, ] [[package]] @@ -1779,14 +1756,14 @@ sdist = { url = "https://files.pythonhosted.org/packages/7e/ee/6748afd822a2cc26f [[package]] name = "tinycss2" -version = "1.4.0" +version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "webencodings" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7a/fd/7a5ee21fd08ff70d3d33a5781c255cbe779659bd03278feb98b19ee550f4/tinycss2-1.4.0.tar.gz", hash = "sha256:10c0972f6fc0fbee87c3edb76549357415e94548c1ae10ebccdea16fb404a9b7", size = 87085 } +sdist = { url = "https://files.pythonhosted.org/packages/44/6f/38d2335a2b70b9982d112bb177e3dbe169746423e33f718bf5e9c7b3ddd3/tinycss2-1.3.0.tar.gz", hash = "sha256:152f9acabd296a8375fbca5b84c961ff95971fcfc32e79550c8df8e29118c54d", size = 67360 } wheels = [ - { url = "https://files.pythonhosted.org/packages/e6/34/ebdc18bae6aa14fbee1a08b63c015c72b64868ff7dae68808ab500c492e2/tinycss2-1.4.0-py3-none-any.whl", hash = "sha256:3a49cf47b7675da0b15d0c6e1df8df4ebd96e9394bb905a5775adb0d884c5289", size = 26610 }, + { url = "https://files.pythonhosted.org/packages/2c/4d/0db5b8a613d2a59bbc29bc5bb44a2f8070eb9ceab11c50d477502a8a0092/tinycss2-1.3.0-py3-none-any.whl", hash = "sha256:54a8dbdffb334d536851be0226030e9505965bb2f30f21a4a82c55fb2a80fae7", size = 22532 }, ] [[package]] @@ -1800,32 +1777,20 @@ wheels = [ [[package]] name = "typing-extensions" -version = "4.13.0" +version = "4.12.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0e/3e/b00a62db91a83fff600de219b6ea9908e6918664899a2d85db222f4fbf19/typing_extensions-4.13.0.tar.gz", hash = "sha256:0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b", size = 106520 } +sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 } wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl", hash = "sha256:c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5", size = 45683 }, -] - -[[package]] -name = "typing-inspection" -version = "0.4.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/82/5c/e6082df02e215b846b4b8c0b887a64d7d08ffaba30605502639d44c06b82/typing_inspection-0.4.0.tar.gz", hash = "sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122", size = 76222 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/31/08/aa4fdfb71f7de5176385bd9e90852eaf6b5d622735020ad600f2bab54385/typing_inspection-0.4.0-py3-none-any.whl", hash = "sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f", size = 14125 }, + { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 }, ] [[package]] name = "urllib3" -version = "2.3.0" +version = "2.2.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d", size = 307268 } +sdist = { url = "https://files.pythonhosted.org/packages/ed/63/22ba4ebfe7430b76388e7cd448d5478814d3032121827c12a2cc287e2260/urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9", size = 300677 } wheels = [ - { url = "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl", hash = "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", size = 128369 }, + { url = "https://files.pythonhosted.org/packages/ce/d9/5f4c13cecde62396b0d3fe530a50ccea91e7dfc1ccf0e09c228841bb5ba8/urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac", size = 126338 }, ] [[package]] @@ -1856,29 +1821,29 @@ wheels = [ [[package]] name = "watchdog" -version = "6.0.0" +version = "5.0.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220 } +sdist = { url = "https://files.pythonhosted.org/packages/a2/48/a86139aaeab2db0a2482676f64798d8ac4d2dbb457523f50ab37bf02ce2c/watchdog-5.0.3.tar.gz", hash = "sha256:108f42a7f0345042a854d4d0ad0834b741d421330d5f575b81cb27b883500176", size = 129556 } wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393 }, - { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392 }, - { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019 }, - { url = "https://files.pythonhosted.org/packages/39/ea/3930d07dafc9e286ed356a679aa02d777c06e9bfd1164fa7c19c288a5483/watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948", size = 96471 }, - { url = "https://files.pythonhosted.org/packages/12/87/48361531f70b1f87928b045df868a9fd4e253d9ae087fa4cf3f7113be363/watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860", size = 88449 }, - { url = "https://files.pythonhosted.org/packages/5b/7e/8f322f5e600812e6f9a31b75d242631068ca8f4ef0582dd3ae6e72daecc8/watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0", size = 89054 }, - { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480 }, - { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451 }, - { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057 }, - { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079 }, - { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078 }, - { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076 }, - { url = "https://files.pythonhosted.org/packages/ab/cc/da8422b300e13cb187d2203f20b9253e91058aaf7db65b74142013478e66/watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f", size = 79077 }, - { url = "https://files.pythonhosted.org/packages/2c/3b/b8964e04ae1a025c44ba8e4291f86e97fac443bca31de8bd98d3263d2fcf/watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26", size = 79078 }, - { url = "https://files.pythonhosted.org/packages/62/ae/a696eb424bedff7407801c257d4b1afda455fe40821a2be430e173660e81/watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c", size = 79077 }, - { url = "https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2", size = 79078 }, - { url = "https://files.pythonhosted.org/packages/07/f6/d0e5b343768e8bcb4cda79f0f2f55051bf26177ecd5651f84c07567461cf/watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a", size = 79065 }, - { url = "https://files.pythonhosted.org/packages/db/d9/c495884c6e548fce18a8f40568ff120bc3a4b7b99813081c8ac0c936fa64/watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680", size = 79070 }, - { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067 }, + { url = "https://files.pythonhosted.org/packages/70/34/946f08602f8b8e6af45bc725e4a8013975a34883ab5570bd0d827a4c9829/watchdog-5.0.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f01f4a3565a387080dc49bdd1fefe4ecc77f894991b88ef927edbfa45eb10818", size = 96650 }, + { url = "https://files.pythonhosted.org/packages/96/2b/b84e35d49e8b0bad77e5d086fc1e2c6c833bbfe74d53144cfe8b26117eff/watchdog-5.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:91b522adc25614cdeaf91f7897800b82c13b4b8ac68a42ca959f992f6990c490", size = 88653 }, + { url = "https://files.pythonhosted.org/packages/d5/3f/41b5d77c10f450b79921c17b7d0b416616048867bfe63acaa072a619a0cb/watchdog-5.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d52db5beb5e476e6853da2e2d24dbbbed6797b449c8bf7ea118a4ee0d2c9040e", size = 89286 }, + { url = "https://files.pythonhosted.org/packages/1c/9b/8b206a928c188fdeb7b12e1c795199534cd44bdef223b8470129016009dd/watchdog-5.0.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:94d11b07c64f63f49876e0ab8042ae034674c8653bfcdaa8c4b32e71cfff87e8", size = 96739 }, + { url = "https://files.pythonhosted.org/packages/e1/26/129ca9cd0f8016672f37000010c2fedc0b86816e894ebdc0af9bb04a6439/watchdog-5.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:349c9488e1d85d0a58e8cb14222d2c51cbc801ce11ac3936ab4c3af986536926", size = 88708 }, + { url = "https://files.pythonhosted.org/packages/8f/b3/5e10ec32f0c429cdb55b1369066d6e83faf9985b3a53a4e37bb5c5e29aa0/watchdog-5.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:53a3f10b62c2d569e260f96e8d966463dec1a50fa4f1b22aec69e3f91025060e", size = 89309 }, + { url = "https://files.pythonhosted.org/packages/54/c4/49af4ab00bcfb688e9962eace2edda07a2cf89b9699ea536da48e8585cff/watchdog-5.0.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:950f531ec6e03696a2414b6308f5c6ff9dab7821a768c9d5788b1314e9a46ca7", size = 96740 }, + { url = "https://files.pythonhosted.org/packages/96/a4/b24de77cc9ae424c1687c9d4fb15aa560d7d7b28ba559aca72f781d0202b/watchdog-5.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ae6deb336cba5d71476caa029ceb6e88047fc1dc74b62b7c4012639c0b563906", size = 88711 }, + { url = "https://files.pythonhosted.org/packages/a4/71/3f2e9fe8403386b99d788868955b3a790f7a09721501a7e1eb58f514ffaa/watchdog-5.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1021223c08ba8d2d38d71ec1704496471ffd7be42cfb26b87cd5059323a389a1", size = 89319 }, + { url = "https://files.pythonhosted.org/packages/60/33/7cb71c9df9a77b6927ee5f48d25e1de5562ce0fa7e0c56dcf2b0472e64a2/watchdog-5.0.3-py3-none-manylinux2014_aarch64.whl", hash = "sha256:dd021efa85970bd4824acacbb922066159d0f9e546389a4743d56919b6758b91", size = 79335 }, + { url = "https://files.pythonhosted.org/packages/f6/91/320bc1496cf951a3cf93a7ffd18a581f0792c304be963d943e0e608c2919/watchdog-5.0.3-py3-none-manylinux2014_armv7l.whl", hash = "sha256:78864cc8f23dbee55be34cc1494632a7ba30263951b5b2e8fc8286b95845f82c", size = 79334 }, + { url = "https://files.pythonhosted.org/packages/8b/2c/567c5e042ed667d3544c43d48a65cf853450a2d2a9089d9523a65f195e94/watchdog-5.0.3-py3-none-manylinux2014_i686.whl", hash = "sha256:1e9679245e3ea6498494b3028b90c7b25dbb2abe65c7d07423ecfc2d6218ff7c", size = 79333 }, + { url = "https://files.pythonhosted.org/packages/c3/f0/64059fe162ef3274662e67bbdea6c45b3cd53e846d5bd1365fcdc3dc1d15/watchdog-5.0.3-py3-none-manylinux2014_ppc64.whl", hash = "sha256:9413384f26b5d050b6978e6fcd0c1e7f0539be7a4f1a885061473c5deaa57221", size = 79334 }, + { url = "https://files.pythonhosted.org/packages/f6/d9/19b7d02965be2801e2d0f6f4bde23e4ae172620071b65430fa0c2f8441ac/watchdog-5.0.3-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:294b7a598974b8e2c6123d19ef15de9abcd282b0fbbdbc4d23dfa812959a9e05", size = 79333 }, + { url = "https://files.pythonhosted.org/packages/cb/a1/5393ac6d0b095d3a44946b09258e9b5f22cb2fb67bcfa419dd868478826c/watchdog-5.0.3-py3-none-manylinux2014_s390x.whl", hash = "sha256:26dd201857d702bdf9d78c273cafcab5871dd29343748524695cecffa44a8d97", size = 79332 }, + { url = "https://files.pythonhosted.org/packages/a0/58/edec25190b6403caf4426dd418234f2358a106634b7d6aa4aec6939b104f/watchdog-5.0.3-py3-none-manylinux2014_x86_64.whl", hash = "sha256:0f9332243355643d567697c3e3fa07330a1d1abf981611654a1f2bf2175612b7", size = 79334 }, + { url = "https://files.pythonhosted.org/packages/97/69/cfb2d17ba8aabc73be2e2d03c8c319b1f32053a02c4b571852983aa24ff2/watchdog-5.0.3-py3-none-win32.whl", hash = "sha256:c66f80ee5b602a9c7ab66e3c9f36026590a0902db3aea414d59a2f55188c1f49", size = 79320 }, + { url = "https://files.pythonhosted.org/packages/91/b4/2b5b59358dadfa2c8676322f955b6c22cde4937602f40490e2f7403e548e/watchdog-5.0.3-py3-none-win_amd64.whl", hash = "sha256:f00b4cf737f568be9665563347a910f8bdc76f88c2970121c86243c8cfdf90e9", size = 79325 }, + { url = "https://files.pythonhosted.org/packages/38/b8/0aa69337651b3005f161f7f494e59188a1d8d94171666900d26d29d10f69/watchdog-5.0.3-py3-none-win_ia64.whl", hash = "sha256:49f4d36cb315c25ea0d946e018c01bb028048023b9e103d3d3943f58e109dd45", size = 79324 }, ] [[package]] @@ -1892,56 +1857,56 @@ wheels = [ [[package]] name = "websockets" -version = "15.0.1" +version = "13.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee", size = 177016 } +sdist = { url = "https://files.pythonhosted.org/packages/e2/73/9223dbc7be3dcaf2a7bbf756c351ec8da04b1fa573edaf545b95f6b0c7fd/websockets-13.1.tar.gz", hash = "sha256:a3b3366087c1bc0a2795111edcadddb8b3b59509d5db5d7ea3fdd69f954a8878", size = 158549 } wheels = [ - { url = "https://files.pythonhosted.org/packages/9f/32/18fcd5919c293a398db67443acd33fde142f283853076049824fc58e6f75/websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431", size = 175423 }, - { url = "https://files.pythonhosted.org/packages/76/70/ba1ad96b07869275ef42e2ce21f07a5b0148936688c2baf7e4a1f60d5058/websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57", size = 173082 }, - { url = "https://files.pythonhosted.org/packages/86/f2/10b55821dd40eb696ce4704a87d57774696f9451108cff0d2824c97e0f97/websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905", size = 173330 }, - { url = "https://files.pythonhosted.org/packages/a5/90/1c37ae8b8a113d3daf1065222b6af61cc44102da95388ac0018fcb7d93d9/websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562", size = 182878 }, - { url = "https://files.pythonhosted.org/packages/8e/8d/96e8e288b2a41dffafb78e8904ea7367ee4f891dafc2ab8d87e2124cb3d3/websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792", size = 181883 }, - { url = "https://files.pythonhosted.org/packages/93/1f/5d6dbf551766308f6f50f8baf8e9860be6182911e8106da7a7f73785f4c4/websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413", size = 182252 }, - { url = "https://files.pythonhosted.org/packages/d4/78/2d4fed9123e6620cbf1706c0de8a1632e1a28e7774d94346d7de1bba2ca3/websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8", size = 182521 }, - { url = "https://files.pythonhosted.org/packages/e7/3b/66d4c1b444dd1a9823c4a81f50231b921bab54eee2f69e70319b4e21f1ca/websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3", size = 181958 }, - { url = "https://files.pythonhosted.org/packages/08/ff/e9eed2ee5fed6f76fdd6032ca5cd38c57ca9661430bb3d5fb2872dc8703c/websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf", size = 181918 }, - { url = "https://files.pythonhosted.org/packages/d8/75/994634a49b7e12532be6a42103597b71098fd25900f7437d6055ed39930a/websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85", size = 176388 }, - { url = "https://files.pythonhosted.org/packages/98/93/e36c73f78400a65f5e236cd376713c34182e6663f6889cd45a4a04d8f203/websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065", size = 176828 }, - { url = "https://files.pythonhosted.org/packages/51/6b/4545a0d843594f5d0771e86463606a3988b5a09ca5123136f8a76580dd63/websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3", size = 175437 }, - { url = "https://files.pythonhosted.org/packages/f4/71/809a0f5f6a06522af902e0f2ea2757f71ead94610010cf570ab5c98e99ed/websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665", size = 173096 }, - { url = "https://files.pythonhosted.org/packages/3d/69/1a681dd6f02180916f116894181eab8b2e25b31e484c5d0eae637ec01f7c/websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2", size = 173332 }, - { url = "https://files.pythonhosted.org/packages/a6/02/0073b3952f5bce97eafbb35757f8d0d54812b6174ed8dd952aa08429bcc3/websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215", size = 183152 }, - { url = "https://files.pythonhosted.org/packages/74/45/c205c8480eafd114b428284840da0b1be9ffd0e4f87338dc95dc6ff961a1/websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5", size = 182096 }, - { url = "https://files.pythonhosted.org/packages/14/8f/aa61f528fba38578ec553c145857a181384c72b98156f858ca5c8e82d9d3/websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65", size = 182523 }, - { url = "https://files.pythonhosted.org/packages/ec/6d/0267396610add5bc0d0d3e77f546d4cd287200804fe02323797de77dbce9/websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe", size = 182790 }, - { url = "https://files.pythonhosted.org/packages/02/05/c68c5adbf679cf610ae2f74a9b871ae84564462955d991178f95a1ddb7dd/websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4", size = 182165 }, - { url = "https://files.pythonhosted.org/packages/29/93/bb672df7b2f5faac89761cb5fa34f5cec45a4026c383a4b5761c6cea5c16/websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597", size = 182160 }, - { url = "https://files.pythonhosted.org/packages/ff/83/de1f7709376dc3ca9b7eeb4b9a07b4526b14876b6d372a4dc62312bebee0/websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9", size = 176395 }, - { url = "https://files.pythonhosted.org/packages/7d/71/abf2ebc3bbfa40f391ce1428c7168fb20582d0ff57019b69ea20fa698043/websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7", size = 176841 }, - { url = "https://files.pythonhosted.org/packages/cb/9f/51f0cf64471a9d2b4d0fc6c534f323b664e7095640c34562f5182e5a7195/websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931", size = 175440 }, - { url = "https://files.pythonhosted.org/packages/8a/05/aa116ec9943c718905997412c5989f7ed671bc0188ee2ba89520e8765d7b/websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675", size = 173098 }, - { url = "https://files.pythonhosted.org/packages/ff/0b/33cef55ff24f2d92924923c99926dcce78e7bd922d649467f0eda8368923/websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151", size = 173329 }, - { url = "https://files.pythonhosted.org/packages/31/1d/063b25dcc01faa8fada1469bdf769de3768b7044eac9d41f734fd7b6ad6d/websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22", size = 183111 }, - { url = "https://files.pythonhosted.org/packages/93/53/9a87ee494a51bf63e4ec9241c1ccc4f7c2f45fff85d5bde2ff74fcb68b9e/websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f", size = 182054 }, - { url = "https://files.pythonhosted.org/packages/ff/b2/83a6ddf56cdcbad4e3d841fcc55d6ba7d19aeb89c50f24dd7e859ec0805f/websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8", size = 182496 }, - { url = "https://files.pythonhosted.org/packages/98/41/e7038944ed0abf34c45aa4635ba28136f06052e08fc2168520bb8b25149f/websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375", size = 182829 }, - { url = "https://files.pythonhosted.org/packages/e0/17/de15b6158680c7623c6ef0db361da965ab25d813ae54fcfeae2e5b9ef910/websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d", size = 182217 }, - { url = "https://files.pythonhosted.org/packages/33/2b/1f168cb6041853eef0362fb9554c3824367c5560cbdaad89ac40f8c2edfc/websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4", size = 182195 }, - { url = "https://files.pythonhosted.org/packages/86/eb/20b6cdf273913d0ad05a6a14aed4b9a85591c18a987a3d47f20fa13dcc47/websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa", size = 176393 }, - { url = "https://files.pythonhosted.org/packages/1b/6c/c65773d6cab416a64d191d6ee8a8b1c68a09970ea6909d16965d26bfed1e/websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561", size = 176837 }, - { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743 }, + { url = "https://files.pythonhosted.org/packages/b2/f0/cf0b8a30d86b49e267ac84addbebbc7a48a6e7bb7c19db80f62411452311/websockets-13.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:61fc0dfcda609cda0fc9fe7977694c0c59cf9d749fbb17f4e9483929e3c48a19", size = 157813 }, + { url = "https://files.pythonhosted.org/packages/bf/e7/22285852502e33071a8cf0ac814f8988480ec6db4754e067b8b9d0e92498/websockets-13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ceec59f59d092c5007e815def4ebb80c2de330e9588e101cf8bd94c143ec78a5", size = 155469 }, + { url = "https://files.pythonhosted.org/packages/68/d4/c8c7c1e5b40ee03c5cc235955b0fb1ec90e7e37685a5f69229ad4708dcde/websockets-13.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c1dca61c6db1166c48b95198c0b7d9c990b30c756fc2923cc66f68d17dc558fd", size = 155717 }, + { url = "https://files.pythonhosted.org/packages/c9/e4/c50999b9b848b1332b07c7fd8886179ac395cb766fda62725d1539e7bc6c/websockets-13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:308e20f22c2c77f3f39caca508e765f8725020b84aa963474e18c59accbf4c02", size = 165379 }, + { url = "https://files.pythonhosted.org/packages/bc/49/4a4ad8c072f18fd79ab127650e47b160571aacfc30b110ee305ba25fffc9/websockets-13.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d516c325e6540e8a57b94abefc3459d7dab8ce52ac75c96cad5549e187e3a7", size = 164376 }, + { url = "https://files.pythonhosted.org/packages/af/9b/8c06d425a1d5a74fd764dd793edd02be18cf6fc3b1ccd1f29244ba132dc0/websockets-13.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87c6e35319b46b99e168eb98472d6c7d8634ee37750d7693656dc766395df096", size = 164753 }, + { url = "https://files.pythonhosted.org/packages/d5/5b/0acb5815095ff800b579ffc38b13ab1b915b317915023748812d24e0c1ac/websockets-13.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5f9fee94ebafbc3117c30be1844ed01a3b177bb6e39088bc6b2fa1dc15572084", size = 165051 }, + { url = "https://files.pythonhosted.org/packages/30/93/c3891c20114eacb1af09dedfcc620c65c397f4fd80a7009cd12d9457f7f5/websockets-13.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7c1e90228c2f5cdde263253fa5db63e6653f1c00e7ec64108065a0b9713fa1b3", size = 164489 }, + { url = "https://files.pythonhosted.org/packages/28/09/af9e19885539759efa2e2cd29b8b3f9eecef7ecefea40d46612f12138b36/websockets-13.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6548f29b0e401eea2b967b2fdc1c7c7b5ebb3eeb470ed23a54cd45ef078a0db9", size = 164438 }, + { url = "https://files.pythonhosted.org/packages/b6/08/6f38b8e625b3d93de731f1d248cc1493327f16cb45b9645b3e791782cff0/websockets-13.1-cp311-cp311-win32.whl", hash = "sha256:c11d4d16e133f6df8916cc5b7e3e96ee4c44c936717d684a94f48f82edb7c92f", size = 158710 }, + { url = "https://files.pythonhosted.org/packages/fb/39/ec8832ecb9bb04a8d318149005ed8cee0ba4e0205835da99e0aa497a091f/websockets-13.1-cp311-cp311-win_amd64.whl", hash = "sha256:d04f13a1d75cb2b8382bdc16ae6fa58c97337253826dfe136195b7f89f661557", size = 159137 }, + { url = "https://files.pythonhosted.org/packages/df/46/c426282f543b3c0296cf964aa5a7bb17e984f58dde23460c3d39b3148fcf/websockets-13.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9d75baf00138f80b48f1eac72ad1535aac0b6461265a0bcad391fc5aba875cfc", size = 157821 }, + { url = "https://files.pythonhosted.org/packages/aa/85/22529867010baac258da7c45848f9415e6cf37fef00a43856627806ffd04/websockets-13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9b6f347deb3dcfbfde1c20baa21c2ac0751afaa73e64e5b693bb2b848efeaa49", size = 155480 }, + { url = "https://files.pythonhosted.org/packages/29/2c/bdb339bfbde0119a6e84af43ebf6275278698a2241c2719afc0d8b0bdbf2/websockets-13.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de58647e3f9c42f13f90ac7e5f58900c80a39019848c5547bc691693098ae1bd", size = 155715 }, + { url = "https://files.pythonhosted.org/packages/9f/d0/8612029ea04c5c22bf7af2fd3d63876c4eaeef9b97e86c11972a43aa0e6c/websockets-13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1b54689e38d1279a51d11e3467dd2f3a50f5f2e879012ce8f2d6943f00e83f0", size = 165647 }, + { url = "https://files.pythonhosted.org/packages/56/04/1681ed516fa19ca9083f26d3f3a302257e0911ba75009533ed60fbb7b8d1/websockets-13.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf1781ef73c073e6b0f90af841aaf98501f975d306bbf6221683dd594ccc52b6", size = 164592 }, + { url = "https://files.pythonhosted.org/packages/38/6f/a96417a49c0ed132bb6087e8e39a37db851c70974f5c724a4b2a70066996/websockets-13.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d23b88b9388ed85c6faf0e74d8dec4f4d3baf3ecf20a65a47b836d56260d4b9", size = 165012 }, + { url = "https://files.pythonhosted.org/packages/40/8b/fccf294919a1b37d190e86042e1a907b8f66cff2b61e9befdbce03783e25/websockets-13.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3c78383585f47ccb0fcf186dcb8a43f5438bd7d8f47d69e0b56f71bf431a0a68", size = 165311 }, + { url = "https://files.pythonhosted.org/packages/c1/61/f8615cf7ce5fe538476ab6b4defff52beb7262ff8a73d5ef386322d9761d/websockets-13.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d6d300f8ec35c24025ceb9b9019ae9040c1ab2f01cddc2bcc0b518af31c75c14", size = 164692 }, + { url = "https://files.pythonhosted.org/packages/5c/f1/a29dd6046d3a722d26f182b783a7997d25298873a14028c4760347974ea3/websockets-13.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a9dcaf8b0cc72a392760bb8755922c03e17a5a54e08cca58e8b74f6902b433cf", size = 164686 }, + { url = "https://files.pythonhosted.org/packages/0f/99/ab1cdb282f7e595391226f03f9b498f52109d25a2ba03832e21614967dfa/websockets-13.1-cp312-cp312-win32.whl", hash = "sha256:2f85cf4f2a1ba8f602298a853cec8526c2ca42a9a4b947ec236eaedb8f2dc80c", size = 158712 }, + { url = "https://files.pythonhosted.org/packages/46/93/e19160db48b5581feac8468330aa11b7292880a94a37d7030478596cc14e/websockets-13.1-cp312-cp312-win_amd64.whl", hash = "sha256:38377f8b0cdeee97c552d20cf1865695fcd56aba155ad1b4ca8779a5b6ef4ac3", size = 159145 }, + { url = "https://files.pythonhosted.org/packages/51/20/2b99ca918e1cbd33c53db2cace5f0c0cd8296fc77558e1908799c712e1cd/websockets-13.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a9ab1e71d3d2e54a0aa646ab6d4eebfaa5f416fe78dfe4da2839525dc5d765c6", size = 157828 }, + { url = "https://files.pythonhosted.org/packages/b8/47/0932a71d3d9c0e9483174f60713c84cee58d62839a143f21a2bcdbd2d205/websockets-13.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b9d7439d7fab4dce00570bb906875734df13d9faa4b48e261c440a5fec6d9708", size = 155487 }, + { url = "https://files.pythonhosted.org/packages/a9/60/f1711eb59ac7a6c5e98e5637fef5302f45b6f76a2c9d64fd83bbb341377a/websockets-13.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:327b74e915cf13c5931334c61e1a41040e365d380f812513a255aa804b183418", size = 155721 }, + { url = "https://files.pythonhosted.org/packages/6a/e6/ba9a8db7f9d9b0e5f829cf626ff32677f39824968317223605a6b419d445/websockets-13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:325b1ccdbf5e5725fdcb1b0e9ad4d2545056479d0eee392c291c1bf76206435a", size = 165609 }, + { url = "https://files.pythonhosted.org/packages/c1/22/4ec80f1b9c27a0aebd84ccd857252eda8418ab9681eb571b37ca4c5e1305/websockets-13.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:346bee67a65f189e0e33f520f253d5147ab76ae42493804319b5716e46dddf0f", size = 164556 }, + { url = "https://files.pythonhosted.org/packages/27/ac/35f423cb6bb15600438db80755609d27eda36d4c0b3c9d745ea12766c45e/websockets-13.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91a0fa841646320ec0d3accdff5b757b06e2e5c86ba32af2e0815c96c7a603c5", size = 164993 }, + { url = "https://files.pythonhosted.org/packages/31/4e/98db4fd267f8be9e52e86b6ee4e9aa7c42b83452ea0ea0672f176224b977/websockets-13.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:18503d2c5f3943e93819238bf20df71982d193f73dcecd26c94514f417f6b135", size = 165360 }, + { url = "https://files.pythonhosted.org/packages/3f/15/3f0de7cda70ffc94b7e7024544072bc5b26e2c1eb36545291abb755d8cdb/websockets-13.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a9cd1af7e18e5221d2878378fbc287a14cd527fdd5939ed56a18df8a31136bb2", size = 164745 }, + { url = "https://files.pythonhosted.org/packages/a1/6e/66b6b756aebbd680b934c8bdbb6dcb9ce45aad72cde5f8a7208dbb00dd36/websockets-13.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:70c5be9f416aa72aab7a2a76c90ae0a4fe2755c1816c153c1a2bcc3333ce4ce6", size = 164732 }, + { url = "https://files.pythonhosted.org/packages/35/c6/12e3aab52c11aeb289e3dbbc05929e7a9d90d7a9173958477d3ef4f8ce2d/websockets-13.1-cp313-cp313-win32.whl", hash = "sha256:624459daabeb310d3815b276c1adef475b3e6804abaf2d9d2c061c319f7f187d", size = 158709 }, + { url = "https://files.pythonhosted.org/packages/41/d8/63d6194aae711d7263df4498200c690a9c39fb437ede10f3e157a6343e0d/websockets-13.1-cp313-cp313-win_amd64.whl", hash = "sha256:c518e84bb59c2baae725accd355c8dc517b4a3ed8db88b4bc93c78dae2974bf2", size = 159144 }, + { url = "https://files.pythonhosted.org/packages/56/27/96a5cd2626d11c8280656c6c71d8ab50fe006490ef9971ccd154e0c42cd2/websockets-13.1-py3-none-any.whl", hash = "sha256:a9a396a6ad26130cdae92ae10c36af09d9bfe6cafe69670fd3b6da9b07b4044f", size = 152134 }, ] [[package]] name = "werkzeug" -version = "3.1.3" +version = "3.0.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746", size = 806925 } +sdist = { url = "https://files.pythonhosted.org/packages/0f/e2/6dbcaab07560909ff8f654d3a2e5a60552d937c909455211b1b36d7101dc/werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306", size = 803966 } wheels = [ - { url = "https://files.pythonhosted.org/packages/52/24/ab44c871b0f07f491e5d2ad12c9bd7358e527510618cb1b803a88e986db1/werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e", size = 224498 }, + { url = "https://files.pythonhosted.org/packages/4b/84/997bbf7c2bf2dc3f09565c6d0b4959fefe5355c18c4096cfd26d83e0785b/werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c", size = 227554 }, ] [[package]] @@ -2014,62 +1979,3 @@ sdist = { url = "https://files.pythonhosted.org/packages/54/bf/5c0000c44ebc80123 wheels = [ { url = "https://files.pythonhosted.org/packages/62/8b/5ba542fa83c90e09eac972fc9baca7a88e7e7ca4b221a89251954019308b/zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350", size = 9200 }, ] - -[[package]] -name = "zstandard" -version = "0.23.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cffi", marker = "platform_python_implementation == 'PyPy'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ed/f6/2ac0287b442160a89d726b17a9184a4c615bb5237db763791a7fd16d9df1/zstandard-0.23.0.tar.gz", hash = "sha256:b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09", size = 681701 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9e/40/f67e7d2c25a0e2dc1744dd781110b0b60306657f8696cafb7ad7579469bd/zstandard-0.23.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:34895a41273ad33347b2fc70e1bff4240556de3c46c6ea430a7ed91f9042aa4e", size = 788699 }, - { url = "https://files.pythonhosted.org/packages/e8/46/66d5b55f4d737dd6ab75851b224abf0afe5774976fe511a54d2eb9063a41/zstandard-0.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:77ea385f7dd5b5676d7fd943292ffa18fbf5c72ba98f7d09fc1fb9e819b34c23", size = 633681 }, - { url = "https://files.pythonhosted.org/packages/63/b6/677e65c095d8e12b66b8f862b069bcf1f1d781b9c9c6f12eb55000d57583/zstandard-0.23.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:983b6efd649723474f29ed42e1467f90a35a74793437d0bc64a5bf482bedfa0a", size = 4944328 }, - { url = "https://files.pythonhosted.org/packages/59/cc/e76acb4c42afa05a9d20827116d1f9287e9c32b7ad58cc3af0721ce2b481/zstandard-0.23.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80a539906390591dd39ebb8d773771dc4db82ace6372c4d41e2d293f8e32b8db", size = 5311955 }, - { url = "https://files.pythonhosted.org/packages/78/e4/644b8075f18fc7f632130c32e8f36f6dc1b93065bf2dd87f03223b187f26/zstandard-0.23.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:445e4cb5048b04e90ce96a79b4b63140e3f4ab5f662321975679b5f6360b90e2", size = 5344944 }, - { url = "https://files.pythonhosted.org/packages/76/3f/dbafccf19cfeca25bbabf6f2dd81796b7218f768ec400f043edc767015a6/zstandard-0.23.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd30d9c67d13d891f2360b2a120186729c111238ac63b43dbd37a5a40670b8ca", size = 5442927 }, - { url = "https://files.pythonhosted.org/packages/0c/c3/d24a01a19b6733b9f218e94d1a87c477d523237e07f94899e1c10f6fd06c/zstandard-0.23.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d20fd853fbb5807c8e84c136c278827b6167ded66c72ec6f9a14b863d809211c", size = 4864910 }, - { url = "https://files.pythonhosted.org/packages/1c/a9/cf8f78ead4597264f7618d0875be01f9bc23c9d1d11afb6d225b867cb423/zstandard-0.23.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ed1708dbf4d2e3a1c5c69110ba2b4eb6678262028afd6c6fbcc5a8dac9cda68e", size = 4935544 }, - { url = "https://files.pythonhosted.org/packages/2c/96/8af1e3731b67965fb995a940c04a2c20997a7b3b14826b9d1301cf160879/zstandard-0.23.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:be9b5b8659dff1f913039c2feee1aca499cfbc19e98fa12bc85e037c17ec6ca5", size = 5467094 }, - { url = "https://files.pythonhosted.org/packages/ff/57/43ea9df642c636cb79f88a13ab07d92d88d3bfe3e550b55a25a07a26d878/zstandard-0.23.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:65308f4b4890aa12d9b6ad9f2844b7ee42c7f7a4fd3390425b242ffc57498f48", size = 4860440 }, - { url = "https://files.pythonhosted.org/packages/46/37/edb78f33c7f44f806525f27baa300341918fd4c4af9472fbc2c3094be2e8/zstandard-0.23.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98da17ce9cbf3bfe4617e836d561e433f871129e3a7ac16d6ef4c680f13a839c", size = 4700091 }, - { url = "https://files.pythonhosted.org/packages/c1/f1/454ac3962671a754f3cb49242472df5c2cced4eb959ae203a377b45b1a3c/zstandard-0.23.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8ed7d27cb56b3e058d3cf684d7200703bcae623e1dcc06ed1e18ecda39fee003", size = 5208682 }, - { url = "https://files.pythonhosted.org/packages/85/b2/1734b0fff1634390b1b887202d557d2dd542de84a4c155c258cf75da4773/zstandard-0.23.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:b69bb4f51daf461b15e7b3db033160937d3ff88303a7bc808c67bbc1eaf98c78", size = 5669707 }, - { url = "https://files.pythonhosted.org/packages/52/5a/87d6971f0997c4b9b09c495bf92189fb63de86a83cadc4977dc19735f652/zstandard-0.23.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:034b88913ecc1b097f528e42b539453fa82c3557e414b3de9d5632c80439a473", size = 5201792 }, - { url = "https://files.pythonhosted.org/packages/79/02/6f6a42cc84459d399bd1a4e1adfc78d4dfe45e56d05b072008d10040e13b/zstandard-0.23.0-cp311-cp311-win32.whl", hash = "sha256:f2d4380bf5f62daabd7b751ea2339c1a21d1c9463f1feb7fc2bdcea2c29c3160", size = 430586 }, - { url = "https://files.pythonhosted.org/packages/be/a2/4272175d47c623ff78196f3c10e9dc7045c1b9caf3735bf041e65271eca4/zstandard-0.23.0-cp311-cp311-win_amd64.whl", hash = "sha256:62136da96a973bd2557f06ddd4e8e807f9e13cbb0bfb9cc06cfe6d98ea90dfe0", size = 495420 }, - { url = "https://files.pythonhosted.org/packages/7b/83/f23338c963bd9de687d47bf32efe9fd30164e722ba27fb59df33e6b1719b/zstandard-0.23.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b4567955a6bc1b20e9c31612e615af6b53733491aeaa19a6b3b37f3b65477094", size = 788713 }, - { url = "https://files.pythonhosted.org/packages/5b/b3/1a028f6750fd9227ee0b937a278a434ab7f7fdc3066c3173f64366fe2466/zstandard-0.23.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e172f57cd78c20f13a3415cc8dfe24bf388614324d25539146594c16d78fcc8", size = 633459 }, - { url = "https://files.pythonhosted.org/packages/26/af/36d89aae0c1f95a0a98e50711bc5d92c144939efc1f81a2fcd3e78d7f4c1/zstandard-0.23.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0e166f698c5a3e914947388c162be2583e0c638a4703fc6a543e23a88dea3c1", size = 4945707 }, - { url = "https://files.pythonhosted.org/packages/cd/2e/2051f5c772f4dfc0aae3741d5fc72c3dcfe3aaeb461cc231668a4db1ce14/zstandard-0.23.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12a289832e520c6bd4dcaad68e944b86da3bad0d339ef7989fb7e88f92e96072", size = 5306545 }, - { url = "https://files.pythonhosted.org/packages/0a/9e/a11c97b087f89cab030fa71206963090d2fecd8eb83e67bb8f3ffb84c024/zstandard-0.23.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d50d31bfedd53a928fed6707b15a8dbeef011bb6366297cc435accc888b27c20", size = 5337533 }, - { url = "https://files.pythonhosted.org/packages/fc/79/edeb217c57fe1bf16d890aa91a1c2c96b28c07b46afed54a5dcf310c3f6f/zstandard-0.23.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72c68dda124a1a138340fb62fa21b9bf4848437d9ca60bd35db36f2d3345f373", size = 5436510 }, - { url = "https://files.pythonhosted.org/packages/81/4f/c21383d97cb7a422ddf1ae824b53ce4b51063d0eeb2afa757eb40804a8ef/zstandard-0.23.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53dd9d5e3d29f95acd5de6802e909ada8d8d8cfa37a3ac64836f3bc4bc5512db", size = 4859973 }, - { url = "https://files.pythonhosted.org/packages/ab/15/08d22e87753304405ccac8be2493a495f529edd81d39a0870621462276ef/zstandard-0.23.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6a41c120c3dbc0d81a8e8adc73312d668cd34acd7725f036992b1b72d22c1772", size = 4936968 }, - { url = "https://files.pythonhosted.org/packages/eb/fa/f3670a597949fe7dcf38119a39f7da49a8a84a6f0b1a2e46b2f71a0ab83f/zstandard-0.23.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:40b33d93c6eddf02d2c19f5773196068d875c41ca25730e8288e9b672897c105", size = 5467179 }, - { url = "https://files.pythonhosted.org/packages/4e/a9/dad2ab22020211e380adc477a1dbf9f109b1f8d94c614944843e20dc2a99/zstandard-0.23.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9206649ec587e6b02bd124fb7799b86cddec350f6f6c14bc82a2b70183e708ba", size = 4848577 }, - { url = "https://files.pythonhosted.org/packages/08/03/dd28b4484b0770f1e23478413e01bee476ae8227bbc81561f9c329e12564/zstandard-0.23.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:76e79bc28a65f467e0409098fa2c4376931fd3207fbeb6b956c7c476d53746dd", size = 4693899 }, - { url = "https://files.pythonhosted.org/packages/2b/64/3da7497eb635d025841e958bcd66a86117ae320c3b14b0ae86e9e8627518/zstandard-0.23.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:66b689c107857eceabf2cf3d3fc699c3c0fe8ccd18df2219d978c0283e4c508a", size = 5199964 }, - { url = "https://files.pythonhosted.org/packages/43/a4/d82decbab158a0e8a6ebb7fc98bc4d903266bce85b6e9aaedea1d288338c/zstandard-0.23.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9c236e635582742fee16603042553d276cca506e824fa2e6489db04039521e90", size = 5655398 }, - { url = "https://files.pythonhosted.org/packages/f2/61/ac78a1263bc83a5cf29e7458b77a568eda5a8f81980691bbc6eb6a0d45cc/zstandard-0.23.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a8fffdbd9d1408006baaf02f1068d7dd1f016c6bcb7538682622c556e7b68e35", size = 5191313 }, - { url = "https://files.pythonhosted.org/packages/e7/54/967c478314e16af5baf849b6ee9d6ea724ae5b100eb506011f045d3d4e16/zstandard-0.23.0-cp312-cp312-win32.whl", hash = "sha256:dc1d33abb8a0d754ea4763bad944fd965d3d95b5baef6b121c0c9013eaf1907d", size = 430877 }, - { url = "https://files.pythonhosted.org/packages/75/37/872d74bd7739639c4553bf94c84af7d54d8211b626b352bc57f0fd8d1e3f/zstandard-0.23.0-cp312-cp312-win_amd64.whl", hash = "sha256:64585e1dba664dc67c7cdabd56c1e5685233fbb1fc1966cfba2a340ec0dfff7b", size = 495595 }, - { url = "https://files.pythonhosted.org/packages/80/f1/8386f3f7c10261fe85fbc2c012fdb3d4db793b921c9abcc995d8da1b7a80/zstandard-0.23.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:576856e8594e6649aee06ddbfc738fec6a834f7c85bf7cadd1c53d4a58186ef9", size = 788975 }, - { url = "https://files.pythonhosted.org/packages/16/e8/cbf01077550b3e5dc86089035ff8f6fbbb312bc0983757c2d1117ebba242/zstandard-0.23.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38302b78a850ff82656beaddeb0bb989a0322a8bbb1bf1ab10c17506681d772a", size = 633448 }, - { url = "https://files.pythonhosted.org/packages/06/27/4a1b4c267c29a464a161aeb2589aff212b4db653a1d96bffe3598f3f0d22/zstandard-0.23.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2240ddc86b74966c34554c49d00eaafa8200a18d3a5b6ffbf7da63b11d74ee2", size = 4945269 }, - { url = "https://files.pythonhosted.org/packages/7c/64/d99261cc57afd9ae65b707e38045ed8269fbdae73544fd2e4a4d50d0ed83/zstandard-0.23.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ef230a8fd217a2015bc91b74f6b3b7d6522ba48be29ad4ea0ca3a3775bf7dd5", size = 5306228 }, - { url = "https://files.pythonhosted.org/packages/7a/cf/27b74c6f22541f0263016a0fd6369b1b7818941de639215c84e4e94b2a1c/zstandard-0.23.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:774d45b1fac1461f48698a9d4b5fa19a69d47ece02fa469825b442263f04021f", size = 5336891 }, - { url = "https://files.pythonhosted.org/packages/fa/18/89ac62eac46b69948bf35fcd90d37103f38722968e2981f752d69081ec4d/zstandard-0.23.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f77fa49079891a4aab203d0b1744acc85577ed16d767b52fc089d83faf8d8ed", size = 5436310 }, - { url = "https://files.pythonhosted.org/packages/a8/a8/5ca5328ee568a873f5118d5b5f70d1f36c6387716efe2e369010289a5738/zstandard-0.23.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac184f87ff521f4840e6ea0b10c0ec90c6b1dcd0bad2f1e4a9a1b4fa177982ea", size = 4859912 }, - { url = "https://files.pythonhosted.org/packages/ea/ca/3781059c95fd0868658b1cf0440edd832b942f84ae60685d0cfdb808bca1/zstandard-0.23.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c363b53e257246a954ebc7c488304b5592b9c53fbe74d03bc1c64dda153fb847", size = 4936946 }, - { url = "https://files.pythonhosted.org/packages/ce/11/41a58986f809532742c2b832c53b74ba0e0a5dae7e8ab4642bf5876f35de/zstandard-0.23.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e7792606d606c8df5277c32ccb58f29b9b8603bf83b48639b7aedf6df4fe8171", size = 5466994 }, - { url = "https://files.pythonhosted.org/packages/83/e3/97d84fe95edd38d7053af05159465d298c8b20cebe9ccb3d26783faa9094/zstandard-0.23.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a0817825b900fcd43ac5d05b8b3079937073d2b1ff9cf89427590718b70dd840", size = 4848681 }, - { url = "https://files.pythonhosted.org/packages/6e/99/cb1e63e931de15c88af26085e3f2d9af9ce53ccafac73b6e48418fd5a6e6/zstandard-0.23.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9da6bc32faac9a293ddfdcb9108d4b20416219461e4ec64dfea8383cac186690", size = 4694239 }, - { url = "https://files.pythonhosted.org/packages/ab/50/b1e703016eebbc6501fc92f34db7b1c68e54e567ef39e6e59cf5fb6f2ec0/zstandard-0.23.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:fd7699e8fd9969f455ef2926221e0233f81a2542921471382e77a9e2f2b57f4b", size = 5200149 }, - { url = "https://files.pythonhosted.org/packages/aa/e0/932388630aaba70197c78bdb10cce2c91fae01a7e553b76ce85471aec690/zstandard-0.23.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d477ed829077cd945b01fc3115edd132c47e6540ddcd96ca169facff28173057", size = 5655392 }, - { url = "https://files.pythonhosted.org/packages/02/90/2633473864f67a15526324b007a9f96c96f56d5f32ef2a56cc12f9548723/zstandard-0.23.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa6ce8b52c5987b3e34d5674b0ab529a4602b632ebab0a93b07bfb4dfc8f8a33", size = 5191299 }, - { url = "https://files.pythonhosted.org/packages/b0/4c/315ca5c32da7e2dc3455f3b2caee5c8c2246074a61aac6ec3378a97b7136/zstandard-0.23.0-cp313-cp313-win32.whl", hash = "sha256:a9b07268d0c3ca5c170a385a0ab9fb7fdd9f5fd866be004c4ea39e44edce47dd", size = 430862 }, - { url = "https://files.pythonhosted.org/packages/a2/bf/c6aaba098e2d04781e8f4f7c0ba3c7aa73d00e4c436bcc0cf059a66691d1/zstandard-0.23.0-cp313-cp313-win_amd64.whl", hash = "sha256:f3513916e8c645d0610815c257cbfd3242adfd5c4cfa78be514e5a3ebb42a41b", size = 495578 }, -]