mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
try-except
This commit is contained in:
parent
35315c070f
commit
b3fd05c465
1 changed files with 15 additions and 10 deletions
|
|
@ -28,7 +28,9 @@ def get_setting(key: str) -> Any:
|
|||
except Exception:
|
||||
return global_settings.get(key, None)
|
||||
|
||||
|
||||
def emphasize_header(text: str) -> str:
|
||||
try:
|
||||
# Finding the position of the first occurrence of ": "
|
||||
colon_position = text.find(": ")
|
||||
|
||||
|
|
@ -41,6 +43,9 @@ def emphasize_header(text: str) -> str:
|
|||
transformed_string = text
|
||||
|
||||
return transformed_string
|
||||
except Exception as e:
|
||||
get_logger().exception(f"Failed to emphasize header: {e}")
|
||||
return text
|
||||
|
||||
def convert_to_markdown(output_data: dict, gfm_supported: bool=True) -> str:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue