diff --git a/bgstally/utils.py b/bgstally/utils.py index 16d023c..3796dfe 100644 --- a/bgstally/utils.py +++ b/bgstally/utils.py @@ -153,5 +153,5 @@ def string_to_alphanumeric(s: str) -> str: Returns: str: The cleaned string """ - pattern: re.Pattern = re.compile('[\W_]+') + pattern: re.Pattern = re.compile(r'[\W_]+') return pattern.sub('', s) diff --git a/bgstally/widgets.py b/bgstally/widgets.py index 22bf3c6..f865043 100644 --- a/bgstally/widgets.py +++ b/bgstally/widgets.py @@ -60,8 +60,8 @@ class to convert text with a limited set of Discord-supported ansi color codes t # define some regexes which will come in handy in filtering # out the ansi color codes - color_pat = re.compile("\x01?\x1b(\[[\d;]*m?)\x02?") - inner_color_pat = re.compile("^\[([\d;]*)m$") + color_pat = re.compile(r'\x01?\x1b(\[[\d;]*m?)\x02?') + inner_color_pat = re.compile(r'^\[([\d;]*)m$') def __init__(self, *args, **kwargs): """