mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 19:05:18 +00:00
commit
1cefd23739
1 changed files with 1 additions and 1 deletions
|
|
@ -557,7 +557,7 @@ def _fix_key_value(key: str, value: str):
|
||||||
|
|
||||||
|
|
||||||
def load_yaml(response_text: str, keys_fix_yaml: List[str] = [], first_key="", last_key="") -> dict:
|
def load_yaml(response_text: str, keys_fix_yaml: List[str] = [], first_key="", last_key="") -> dict:
|
||||||
response_text = response_text.strip('\n').removeprefix('```yaml').rstrip('`')
|
response_text = response_text.strip('\n').removeprefix('```yaml').rstrip().removesuffix('```')
|
||||||
try:
|
try:
|
||||||
data = yaml.safe_load(response_text)
|
data = yaml.safe_load(response_text)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue