From 035f49d30efe162d60747595d3f643ce65e39084 Mon Sep 17 00:00:00 2001 From: Maria Fernanda Magallanes Zubillaga Date: Mon, 26 Aug 2024 18:05:48 -0500 Subject: [PATCH] fix: use typing Pattern instead of regex one --- tutorpicasso/commands/run_extra_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorpicasso/commands/run_extra_commands.py b/tutorpicasso/commands/run_extra_commands.py index 076c699..0e2c9ca 100644 --- a/tutorpicasso/commands/run_extra_commands.py +++ b/tutorpicasso/commands/run_extra_commands.py @@ -2,7 +2,7 @@ import subprocess from itertools import chain -from typing import Any, List +from typing import Any, List, Pattern import click from tutor import config as tutor_config @@ -113,7 +113,7 @@ def find_tutor_misspelled(command: str) -> bool: return bool(re.match(r"[tT](?:[oru]{3}|[oru]{2}[rR]|[oru]u?)", command)) -def create_regex_from_list(special_chars: List[str]) -> re.Pattern[str]: +def create_regex_from_list(special_chars: List[str]) -> Pattern[str]: """ Compile a new regex and escape special characters in the given string. escaping special characters