mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
feat: Use json5 to load model metadata for lenient parsing
This commit is contained in:
parent
19a94e5f15
commit
8596f0d4a3
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import json
|
||||
import json5
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
|
@ -28,8 +29,9 @@ def main():
|
|||
return
|
||||
|
||||
try:
|
||||
# Use json5 for the aider metadata file as it might contain comments
|
||||
with open(aider_path, "r") as f:
|
||||
aider_data = json.load(f)
|
||||
aider_data = json5.load(f)
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"Error decoding JSON from {aider_path}: {e}")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue