aider: Fixed extra blank lines and added missing whitespace after a comma.

# Aider chat conversation:

USER: # Fix any errors below, if possible.

## Running: flake8 aider/coders/base_coder.py

aider/coders/base_coder.py:43:1: E303 too many blank lines (3)
aider/coders/base_coder.py:334:17: E231 missing whitespace after ','

## See relevant lines below marked with █.

aider/coders/base_coder.py:
...⋮...
 40│
 41│
 42│
 43█def wrap_fence(name):
 44│    return f"<{name}>", f"</{name}>"
 45│
 46│
 47│class Coder:
 48│    abs_fnames = None
...⋮...
331│                self.io.tool_output(json.dumps(self.functions, indent=4))
332│
333│    def setup_lint_cmds(self, lint_cmds):
334█        for lang,cmd in lint_cmds.items():
335│            self.linter.set_linter(lang, cmd)
336│
337│    def show_announcements(self):
...⋮...

ASSISTANT: Here are the necessary changes to fix the flake8 errors:

1. Remove the extra blank lines before the `wrap_fence` function.
2. Add a missing whitespace after the comma in the `setup_lint_cmds` function.

aider/coders/base_coder.py
```python
<<<<<<< SEARCH
class ExhaustedContextWindow(Exception):
    pass

def wrap_fence(name):
=======
class ExhaustedContextWindow(Exception):
    pass

def wrap_fence(name):
>>>>>>> REPLACE
```

aider/coders/base_coder.py
```python
<<<<<<< SEARCH
        for lang,cmd in lint_cmds.items():
=======
        for lang, cmd in lint_cmds.items():
>>>>>>> REPLACE
```
This commit is contained in:
Paul Gauthier 2024-05-19 07:40:48 -07:00
parent 9bd78d7ff3
commit 25e44f584b

View file

@ -39,7 +39,6 @@ class ExhaustedContextWindow(Exception):
pass pass
def wrap_fence(name): def wrap_fence(name):
return f"<{name}>", f"</{name}>" return f"<{name}>", f"</{name}>"
@ -331,7 +330,7 @@ class Coder:
self.io.tool_output(json.dumps(self.functions, indent=4)) self.io.tool_output(json.dumps(self.functions, indent=4))
def setup_lint_cmds(self, lint_cmds): def setup_lint_cmds(self, lint_cmds):
for lang,cmd in lint_cmds.items(): for lang, cmd in lint_cmds.items():
self.linter.set_linter(lang, cmd) self.linter.set_linter(lang, cmd)
def show_announcements(self): def show_announcements(self):