diff options
author | 2025-07-28 21:45:41 +0100 | |
---|---|---|
committer | 2025-07-28 21:45:41 +0100 | |
commit | 1546ba6f906cbafb3d77177fb21d2fc9292c4bca (patch) | |
tree | 3feaa61bcfc34aa53cc32ce607671efabdbfb5b4 | |
parent | Update Dockerfile to Python 3.13 (diff) |
Update extensions functools.partial to enum.member
Modified as per FutureWarning
-rw-r--r-- | bot/exts/utils/extensions.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bot/exts/utils/extensions.py b/bot/exts/utils/extensions.py index 57c62bfee..a687d42b4 100644 --- a/bot/exts/utils/extensions.py +++ b/bot/exts/utils/extensions.py @@ -1,6 +1,5 @@ -import functools import typing as t -from enum import Enum +from enum import Enum, member from discord import Colour, Embed from discord.ext import commands @@ -23,10 +22,9 @@ BASE_PATH_LEN = len(exts.__name__.split(".")) class Action(Enum): """Represents an action to perform on an extension.""" - # Need to be partial otherwise they are considered to be function definitions. - LOAD = functools.partial(Bot.load_extension) - UNLOAD = functools.partial(Bot.unload_extension) - RELOAD = functools.partial(Bot.reload_extension) + LOAD = member(Bot.load_extension) + UNLOAD = member(Bot.unload_extension) + RELOAD = member(Bot.reload_extension) class Extensions(commands.Cog): |