From a725e18ad1f8788b21104b1f12eb47e4d7b866f3 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 24 May 2023 14:03:06 -0700 Subject: [PATCH] refac --- aider/coder.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/aider/coder.py b/aider/coder.py index 5a6c70a6b..f429fe5d2 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -191,19 +191,21 @@ class Coder: def get_map(self, chat_files, other_files): res = self.choose_files_listing(other_files) - if res: - files_listing, ctags_msg = res + if not res: + return - if chat_files: - other = "other " - else: - other = "" + files_listing, ctags_msg = res - repo_content = prompts.repo_content_prefix.format( - other=other, - ctags_msg=ctags_msg, - ) - repo_content += files_listing + if chat_files: + other = "other " + else: + other = "" + + repo_content = prompts.repo_content_prefix.format( + other=other, + ctags_msg=ctags_msg, + ) + repo_content += files_listing return repo_content