From f45533e20bca39529267cf060a42cde88814c14f Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 26 Nov 2024 15:00:38 -0800 Subject: [PATCH] style: fix line length and whitespace in gitignore handling --- aider/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/main.py b/aider/main.py index f36ab7272..6391ee619 100644 --- a/aider/main.py +++ b/aider/main.py @@ -177,13 +177,15 @@ def check_gitignore(git_root, io, ask=True): if content and not content.endswith("\n"): content += "\n" content += "\n".join(patterns_to_add) + "\n" - + try: io.write_text(gitignore_file, content) io.tool_output(f"Added {', '.join(patterns_to_add)} to .gitignore") except PermissionError: io.tool_error(f"Permission denied when trying to write to {gitignore_file}") - io.tool_output("Try running with appropriate permissions or manually add these patterns to .gitignore:") + io.tool_output( + "Try running with appropriate permissions or manually add these patterns to .gitignore:" + ) for pattern in patterns_to_add: io.tool_output(f" {pattern}")