feat: Enhance YAML parsing with additional fallbacks and key customization in load_yaml and try_fix_yaml functions

This commit is contained in:
mrT23 2023-12-21 08:24:07 +02:00
parent 553dad0bee
commit 2b23700aec
No known key found for this signature in database
GPG key ID: D350490E39D5F5AD

View file

@ -326,7 +326,7 @@ def load_yaml(response_text: str, keys_fix_yaml: List[str] = []) -> dict:
return data
def try_fix_yaml(response_text: str, keys_fix_yaml: List[str]) -> dict:
def try_fix_yaml(response_text: str, keys_fix_yaml: List[str] = []) -> dict:
response_text_lines = response_text.split('\n')
keys = ['relevant line:', 'suggestion content:', 'relevant file:', 'existing code:', 'improved code:']