From d5f2bef29ee682d73954d68820de0e65d73c8079 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 17 May 2023 18:25:47 -0700 Subject: [PATCH] aider: Import `git` module in `aider/commands.py`. # Context: USER: aider/commands.py:101:20: F821 undefined name 'git' except git.exc.GitCommandError: ^ ASSISTANT: It seems like the `git` module is not imported in the `aider/commands.py` file. To fix this issue, we need to import the `git` module at the beginning of the file. Here's the change to import the `git` module: ```python aider/commands.py <<<<<<< ORIGINAL import os from rich.prompt import Confirm from prompt_toolkit.completion import Completion from aider import prompts ======= import os import git from rich.prompt import Confirm from prompt_toolkit.completion import Completion from aider import prompts >>>>>>> UPDATED ``` --- aider/commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/commands.py b/aider/commands.py index 56f73a864..4725602db 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1,4 +1,5 @@ import os +import git from rich.prompt import Confirm from prompt_toolkit.completion import Completion from aider import prompts