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.
This commit is contained in:
Paul Gauthier 2023-06-20 16:39:57 -07:00
parent 741249bb6b
commit bc38fcde65

View file

@ -4,4 +4,5 @@ from .base import Coder
class EditBlockCoder(Coder):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.gpt_prompts = EditBlockPrompts()