WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
6 changed files with 62 additions and 7 deletions
Showing only changes of commit 946e14ee3c - Show all commits

View file

@ -1,4 +1,4 @@
from aurora.main import Aurora
from aurora.aurora import Aurora
async def setup(bot):

View file

@ -20,10 +20,11 @@ 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 (box, error, humanize_list,
humanize_timedelta, warning)
from aurora.importers.auroraview import ImportAuroraView
from aurora.importers.galacticbotview import ImportGalacticBotView
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
@ -32,10 +33,17 @@ from aurora.models.change import Change
from aurora.models.moderation import Moderation
from aurora.utilities.config import config, register_config
from aurora.utilities.database import connect, create_guild_table
from aurora.utilities.factory import addrole_embed, case_factory, changes_factory, evidenceformat_factory, guild_embed, immune_embed, message_factory, overrides_embed
from aurora.utilities.factory import (addrole_embed, case_factory,
changes_factory, evidenceformat_factory,
guild_embed, immune_embed,
message_factory, overrides_embed)
from aurora.utilities.json import dump
from aurora.utilities.logger import logger
from aurora.utilities.utils import check_moddable, check_permissions, get_footer_image, log, send_evidenceformat, timedelta_from_relativedelta
from aurora.utilities.utils import (check_moddable, check_permissions,
get_footer_image, log, send_evidenceformat,
timedelta_from_relativedelta)
class Aurora(commands.Cog):
"""Aurora is a fully-featured moderation system.

48
poetry.lock generated
View file

@ -195,6 +195,20 @@ files = [
{file = "apsw-3.45.2.0.tar.gz", hash = "sha256:4fe81f5e390969d08d3048f357a68b347316b8f09455ff4657d94c56acfa255c"},
]
[[package]]
name = "argcomplete"
version = "3.3.0"
description = "Bash tab completion for argparse"
optional = false
python-versions = ">=3.8"
files = [
{file = "argcomplete-3.3.0-py3-none-any.whl", hash = "sha256:c168c3723482c031df3c207d4ba8fa702717ccb9fc0bfe4117166c1f537b4a54"},
{file = "argcomplete-3.3.0.tar.gz", hash = "sha256:fd03ff4a5b9e6580569d34b273f741e85cd9e072f3feeeee3eba4891c70eda62"},
]
[package.extras]
test = ["coverage", "mypy", "pexpect", "ruff", "wheel"]
[[package]]
name = "astroid"
version = "3.1.0"
@ -1491,6 +1505,24 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa
typing = ["typing-extensions"]
xmp = ["defusedxml"]
[[package]]
name = "pipx"
version = "1.5.0"
description = "Install and Run Python Applications in Isolated Environments"
optional = false
python-versions = ">=3.8"
files = [
{file = "pipx-1.5.0-py3-none-any.whl", hash = "sha256:801a55a9d58004bb18a464f668508e79fbffc22deb6f07982832d3ce3ff3756d"},
{file = "pipx-1.5.0.tar.gz", hash = "sha256:2371af2b772954cdb5c1dbfa0170219e3d2c09d9ff9b18e975f65562eeb7ab0a"},
]
[package.dependencies]
argcomplete = ">=1.9.4"
colorama = {version = ">=0.4.4", markers = "sys_platform == \"win32\""}
packaging = ">=20"
platformdirs = ">=2.1"
userpath = ">=1.6,<1.9.0 || >1.9.0"
[[package]]
name = "platformdirs"
version = "4.2.0"
@ -2262,6 +2294,20 @@ h2 = ["h2 (>=4,<5)"]
socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
zstd = ["zstandard (>=0.18.0)"]
[[package]]
name = "userpath"
version = "1.9.2"
description = "Cross-platform tool for adding locations to the user PATH"
optional = false
python-versions = ">=3.7"
files = [
{file = "userpath-1.9.2-py3-none-any.whl", hash = "sha256:2cbf01a23d655a1ff8fc166dfb78da1b641d1ceabf0fe5f970767d380b14e89d"},
{file = "userpath-1.9.2.tar.gz", hash = "sha256:6c52288dab069257cc831846d15d48133522455d4677ee69a9781f11dbefd815"},
]
[package.dependencies]
click = "*"
[[package]]
name = "uvloop"
version = "0.19.0"
@ -2545,4 +2591,4 @@ multidict = ">=4.0"
[metadata]
lock-version = "2.0"
python-versions = ">=3.11,<3.12"
content-hash = "67eb5e616951979332b6f32bcb39d85171cbf8377f566ea1862c51b5068b52f3"
content-hash = "25dce93989e94b49932b4f5bb8489eb37b2e9aa5860679f7150e2beca8b0471c"

View file

@ -22,6 +22,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
ruff = "^0.3.1"
pylint = "^3.1.0"
pipx = "^1.5.0"
[tool.poetry.group.docs]
optional = true