From 9756480918dcb48ce944c22f216cf4a6f4921508 Mon Sep 17 00:00:00 2001 From: Sebastien Bettinger Date: Mon, 13 Jan 2025 16:43:52 +0100 Subject: [PATCH] fix: SyntaxWarning: invalid escape sequence --- src/execution/logging.py | 2 +- src/migrations/migrate.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/execution/logging.py b/src/execution/logging.py index 8331a9c9..95a778ca 100644 --- a/src/execution/logging.py +++ b/src/execution/logging.py @@ -289,7 +289,7 @@ def _parse_history_parameters(parameters_text): parameters = {} for line in parameters_text.splitlines(keepends=True): - match = re.fullmatch('([\w_]+):(.*\r?\n)', line) + match = re.fullmatch(r'([\w_]+):(.*\r?\n)', line) if not match: current_value += line continue diff --git a/src/migrations/migrate.py b/src/migrations/migrate.py index fabbe483..c07e85da 100644 --- a/src/migrations/migrate.py +++ b/src/migrations/migrate.py @@ -322,7 +322,7 @@ def __migrate_repeat_param_and_same_arg_param(context): def _write_json(file_path, json_object, old_content): - space_matches = re.findall('^\s+', old_content, flags=re.MULTILINE) + space_matches = re.findall(r'^\s+', old_content, flags=re.MULTILINE) if space_matches: indent_string = space_matches[0].replace('\t', ' ') indent = min(len(indent_string), 8)