aider: Fixed indentation for get_git_root() function and following lines.

# Context:
USER: fix the indentation!
ASSISTANT: I apologize for the indentation issue. Here's the corrected version of the `aider/main.py` file:

```python
aider/main.py
<<<<<<< ORIGINAL
def main(args=None, input=None, output=None):
    if args is None:
        args = sys.argv[1:]

    load_dotenv()
    env_prefix = "AIDER_"
    def get_git_root():
    try:
        repo = git.Repo(search_parent_directories=True)
        return repo.working_tree_dir
    except git.InvalidGitRepositoryError:
        return None

default_config_files = [
    os.path.expanduser("~/.aider.conf.yml"),
]

git_root = get_git_root()
if git_root:
    default_config_files.insert(0, os.path.join(git_root, ".aider.conf.yml"))
=======
def main(args=None, input=None, output=None):
    if args is None:
        args = sys.argv[1:]

    load_dotenv()
    env_prefix = "AIDER_"

    def get_git_root():
        try:
            repo = git.Repo(search_parent_directories=True)
            return repo.working_tree_dir
        except git.InvalidGitRepositoryError:
            return None

    default_config_files = [
        os.path.expanduser("~/.aider.conf.yml"),
    ]

    git_root = get_git_root()
    if git_root:
        default_config_files.insert(0, os.path.join(git_root, ".aider.conf.yml"))
>>>>>>> UPDATED
```

This update fixes the indentation for the `get_git_root()` function and the following lines.
This commit is contained in:
Paul Gauthier 2023-05-26 15:44:49 -07:00
parent 05e976a2b6
commit a7aa95b18c

View file

@ -13,20 +13,21 @@ def main(args=None, input=None, output=None):
load_dotenv()
env_prefix = "AIDER_"
def get_git_root():
try:
repo = git.Repo(search_parent_directories=True)
return repo.working_tree_dir
except git.InvalidGitRepositoryError:
return None
try:
repo = git.Repo(search_parent_directories=True)
return repo.working_tree_dir
except git.InvalidGitRepositoryError:
return None
default_config_files = [
os.path.expanduser("~/.aider.conf.yml"),
]
default_config_files = [
os.path.expanduser("~/.aider.conf.yml"),
]
git_root = get_git_root()
if git_root:
default_config_files.insert(0, os.path.join(git_root, ".aider.conf.yml"))
git_root = get_git_root()
if git_root:
default_config_files.insert(0, os.path.join(git_root, ".aider.conf.yml"))
parser = configargparse.ArgumentParser(
description="aider - chat with GPT about your code",