Skip to content

Commit

Permalink
cleaned up scaletalk.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nfearnley committed May 21, 2024
1 parent 00d1d78 commit 416fe14
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sizebot/cogs/scaletalk.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
import re
from copy import copy
from sizebot.lib.utils import try_int
Expand All @@ -14,11 +13,6 @@
from sizebot.lib.units import SV


logger = logging.getLogger("sizebot")

re_char = r"(.*)(?:[/:]|\s*per\s*)(\d+)?"


class ScaleTypeCog(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
Expand All @@ -45,6 +39,7 @@ async def settalkscale(self, ctx: BotContext, *, change: str):
userdata = userdb.load(guildid, userid)

chars = None # fix unbound error
re_char = r"(.*)(?:[/:]|\s*per\s*)(\d+)?"
if match := re.fullmatch(re_char, change):
diff = Diff.parse(match.group(1))
if match.group(2):
Expand Down

0 comments on commit 416fe14

Please sign in to comment.