From 924e0fcd17d9797aa003f36f3faf27378d592350 Mon Sep 17 00:00:00 2001 From: Pierre Carrier Date: Thu, 24 Oct 2024 16:45:42 +0200 Subject: [PATCH] metrics: fix time regex (#81) --- desktop_env/evaluators/metrics/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_env/evaluators/metrics/general.py b/desktop_env/evaluators/metrics/general.py index 54c2549..77e9e6d 100644 --- a/desktop_env/evaluators/metrics/general.py +++ b/desktop_env/evaluators/metrics/general.py @@ -434,7 +434,7 @@ def check_line_number(file_path, line_number): # check if file_path exists if file_path is None or not os.path.isfile(file_path): return 0. - timeRegex = "([01]\d|2[0-3]):[0-5]\d:[0-5]\d" + timeRegex = "([01]\\d|2[0-3]):[0-5]\\d:([0-5]\\d|60)" # check if the string that matches the timeRegex in this txt file equals to line_number["expected"] try: with open(file_path, 'r') as f: