mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 22:04:59 +00:00
validate all jsonschemas
This commit is contained in:
parent
0d72ee1e45
commit
ecb739ed07
4 changed files with 13 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
import json
|
||||
|
||||
from jsonschema import Draft7Validator
|
||||
|
||||
from ..dump import dump # noqa: F401
|
||||
from .base_coder import Coder
|
||||
from .editblock_coder import do_replace
|
||||
|
@ -80,6 +82,8 @@ class EditBlockFunctionCoder(Coder):
|
|||
"updated_lines"
|
||||
] = updated_lines
|
||||
|
||||
Draft7Validator.check_schema(self.functions[0])
|
||||
|
||||
self.gpt_prompts = EditBlockFunctionPrompts()
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import os
|
||||
|
||||
from jsonschema import Draft7Validator
|
||||
|
||||
from aider import diffs
|
||||
|
||||
from ..dump import dump # noqa: F401
|
||||
|
@ -33,6 +35,8 @@ class SingleWholeFileFunctionCoder(Coder):
|
|||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
Draft7Validator.check_schema(self.functions[0])
|
||||
|
||||
self.gpt_prompts = SingleWholeFileFunctionPrompts()
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import os
|
||||
|
||||
from jsonschema import Draft7Validator
|
||||
|
||||
from aider import diffs
|
||||
|
||||
from ..dump import dump # noqa: F401
|
||||
|
@ -46,6 +48,8 @@ class WholeFileFunctionCoder(Coder):
|
|||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
Draft7Validator.check_schema(self.functions[0])
|
||||
|
||||
self.gpt_prompts = WholeFileFunctionPrompts()
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
|
|
@ -30,4 +30,4 @@ networkx==3.1
|
|||
diskcache==5.6.1
|
||||
numpy==1.24.3
|
||||
scipy==1.10.1
|
||||
|
||||
jsonschema==4.17.3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue