mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
lint
This commit is contained in:
parent
2391c2e49b
commit
e2b5c6074f
2 changed files with 6 additions and 4 deletions
|
@ -4,6 +4,6 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/pycqa/flake8
|
- repo: https://github.com/pycqa/flake8
|
||||||
rev: 4.0.1
|
rev: 6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
|
@ -62,6 +63,7 @@ class Coder:
|
||||||
|
|
||||||
self.pretty = pretty
|
self.pretty = pretty
|
||||||
self.show_diffs = show_diffs
|
self.show_diffs = show_diffs
|
||||||
|
|
||||||
def set_repo(self):
|
def set_repo(self):
|
||||||
repo_paths = []
|
repo_paths = []
|
||||||
for fname in self.fnames:
|
for fname in self.fnames:
|
||||||
|
@ -93,7 +95,7 @@ class Coder:
|
||||||
self.console.print(f"[red bold]Files not tracked in {repo.git_dir}:")
|
self.console.print(f"[red bold]Files not tracked in {repo.git_dir}:")
|
||||||
for fn in new_files:
|
for fn in new_files:
|
||||||
self.console.print(f"[red bold] {fn}")
|
self.console.print(f"[red bold] {fn}")
|
||||||
if Confirm.ask("[bold red]Add them?", console=self.console, default='y'):
|
if Confirm.ask("[bold red]Add them?", console=self.console, default="y"):
|
||||||
for relative_fname in new_files:
|
for relative_fname in new_files:
|
||||||
repo.git.add(relative_fname)
|
repo.git.add(relative_fname)
|
||||||
self.console.print(
|
self.console.print(
|
||||||
|
@ -330,7 +332,7 @@ class Coder:
|
||||||
question = f"[red bold]Allow creation of new file {path}?"
|
question = f"[red bold]Allow creation of new file {path}?"
|
||||||
else:
|
else:
|
||||||
question = f"[red bold]Allow edits to {path} which was not previously provided?"
|
question = f"[red bold]Allow edits to {path} which was not previously provided?"
|
||||||
if not Confirm.ask(question, console=self.console, default='y'):
|
if not Confirm.ask(question, console=self.console, default="y"):
|
||||||
self.console.print(f"[red]Skipping edit to {path}")
|
self.console.print(f"[red]Skipping edit to {path}")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -415,7 +417,7 @@ class Coder:
|
||||||
res = Prompt.ask(
|
res = Prompt.ask(
|
||||||
"[red]Commit before the chat proceeds? \[y/n/commit message]", # noqa: W605
|
"[red]Commit before the chat proceeds? \[y/n/commit message]", # noqa: W605
|
||||||
console=self.console,
|
console=self.console,
|
||||||
default='y',
|
default="y",
|
||||||
).strip()
|
).strip()
|
||||||
self.console.print()
|
self.console.print()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue