Fix flake8 W293 and W391

This commit is contained in:
Andy Melnikov
2023-04-10 18:46:40 +02:00
parent 5a6e565c52
commit d12da33e55
5 changed files with 6 additions and 8 deletions

View File

@@ -71,11 +71,11 @@ def fix_and_parse_json(
return json_str
else:
raise e
def fix_json(json_str: str, schema: str) -> str:
"""Fix the given JSON string to make it parseable and fully complient with the provided schema."""
# Try to fix the JSON using gpt:
function_string = "def fix_json(json_str: str, schema:str=None) -> str:"
args = [f"'''{json_str}'''", f"'''{schema}'''"]