mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
refactor: move UnknownEditFormat exception to base_coder.py
This commit is contained in:
parent
75bc2dd564
commit
608a43402c
1 changed files with 10 additions and 1 deletions
|
@ -22,7 +22,8 @@ from typing import List
|
|||
from aider import __version__, models, prompts, urls, utils
|
||||
from aider.analytics import Analytics
|
||||
from aider.commands import Commands
|
||||
from aider.exceptions import LiteLLMExceptions, UnknownEditFormat
|
||||
from aider.exceptions import LiteLLMExceptions
|
||||
from aider.coders.base_coder import UnknownEditFormat
|
||||
from aider.history import ChatSummary
|
||||
from aider.io import ConfirmGroup, InputOutput
|
||||
from aider.linter import Linter
|
||||
|
@ -37,6 +38,14 @@ from ..dump import dump # noqa: F401
|
|||
from .chat_chunks import ChatChunks
|
||||
|
||||
|
||||
class UnknownEditFormat(ValueError):
|
||||
def __init__(self, edit_format, valid_formats):
|
||||
self.edit_format = edit_format
|
||||
self.valid_formats = valid_formats
|
||||
super().__init__(
|
||||
f"Unknown edit format {edit_format}. Valid formats are: {', '.join(valid_formats)}"
|
||||
)
|
||||
|
||||
class MissingAPIKeyError(ValueError):
|
||||
pass
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue