From 3a837c472e633cfdb09ab4e33f1eecdf50f408db Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 12 Mar 2025 13:25:08 -0700 Subject: [PATCH] style: Apply linter formatting to redact-cast.py script --- scripts/redact-cast.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/redact-cast.py b/scripts/redact-cast.py index 594092acc..d5611383e 100755 --- a/scripts/redact-cast.py +++ b/scripts/redact-cast.py @@ -8,11 +8,12 @@ import sys SPEEDUP = 1.25 # Regular expression to match ANSI escape sequences -ANSI_ESCAPE_PATTERN = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\([0-9A-Z=])') +ANSI_ESCAPE_PATTERN = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\([0-9A-Z=])") + def strip_ansi(text): """Remove ANSI escape sequences from text""" - return ANSI_ESCAPE_PATTERN.sub('', text) + return ANSI_ESCAPE_PATTERN.sub("", text) def process_file(input_path, output_path):