From 045acb96d33c02cb4726719a78fb331751890b5d Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 8 May 2023 23:01:01 -0700 Subject: [PATCH] Ignore invalid escape sequence warning for a specific line in coder.py. # Context: USER: coder.py:554:56: W605 invalid escape sequence '\[' ... add comment to ignore ASSISTANT: To fix the invalid escape sequence warning, you can add a comment to ignore the warning for that specific line. Here's the change: ```python coder.py <<<<<<< ORIGINAL res = Prompt.ask( "[red]Commit before the chat proceeds? \[y/n/commit message]" ).strip() ======= res = Prompt.ask( "[red]Commit before the chat proceeds? \[y/n/commit message]" # noqa: W605 ).strip() >>>>>>> UPDATED ``` --- coder.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/coder.py b/coder.py index 845f0f37a..d6c58ba3a 100755 --- a/coder.py +++ b/coder.py @@ -551,9 +551,8 @@ class Coder: self.console.print(f"[red]Suggested commit message:\n{commit_message}\n") res = Prompt.ask( - "[red]Commit before the chat proceeds? \[y/n/commit message]" + "[red]Commit before the chat proceeds? \[y/n/commit message]" # noqa: W605 ).strip() - if res.lower() in ["n", "no"]: self.console.print("[red]Skipped commmit.") return @@ -618,4 +617,4 @@ def main(): if __name__ == "__main__": status = main() - sys.exit(status) + sys.exit(status) \ No newline at end of file