From de65d861229bd6405be1a14acabeb43b579ce530 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 31 Oct 2024 13:48:08 -0700 Subject: [PATCH] style: fix string quotes and line wrapping in error URL handling --- aider/coders/base_coder.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index cd8288193..a7f763293 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -1139,11 +1139,14 @@ class Coder: retry_delay *= 2 if retry_delay > RETRY_TIMEOUT: # Check for URLs in error message - url_pattern = re.compile(r'(https?://[^\s/$.?#].[^\s]*[^\s,.])') + url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*[^\s,.])") urls = url_pattern.findall(str(err)) for url in urls: - if self.io.confirm_ask("View this URL from the error message?", subject=url): + if self.io.confirm_ask( + "View this URL from the error message?", subject=url + ): import webbrowser + webbrowser.open(url) break self.io.tool_output(f"Retrying in {retry_delay:.1f} seconds...")