mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
style: Apply linter formatting to redact-cast.py script
This commit is contained in:
parent
f4880e2ef3
commit
3a837c472e
1 changed files with 3 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue