From bc38fcde65afb526587f069bc33c5190ba611215 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 20 Jun 2023 16:39:57 -0700 Subject: [PATCH] aider: Called superclass's `__init__` method before setting the `gpt_prompts` attribute in `EditBlockCoder`. # Context: USER: call super ASSISTANT: To call the superclass's `__init__` method in the `EditBlockCoder` class, you need to modify the `aider/coders/editblock.py` file. Here's the change: ```python aider/coders/editblock.py <<<<<<< ORIGINAL class EditBlockCoder(Coder): def __init__(self, *args, **kwargs): self.gpt_prompts = EditBlockPrompts() ======= class EditBlockCoder(Coder): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.gpt_prompts = EditBlockPrompts() >>>>>>> UPDATED ``` This change calls the superclass's `__init__` method before setting the `gpt_prompts` attribute. --- aider/coders/editblock.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/coders/editblock.py b/aider/coders/editblock.py index 33eca684f..ee8fcba54 100644 --- a/aider/coders/editblock.py +++ b/aider/coders/editblock.py @@ -4,4 +4,5 @@ from .base import Coder class EditBlockCoder(Coder): def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) self.gpt_prompts = EditBlockPrompts()