From a9f18f53da352b732d602b2308ede0b0b24e4970 Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:06:27 -0400 Subject: [PATCH] fix: correct indentation of try/except/else block in run_coaching_session (#105) --- coach/coach_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coach/coach_service.py b/coach/coach_service.py index 40738e3..f6ac10e 100644 --- a/coach/coach_service.py +++ b/coach/coach_service.py @@ -303,8 +303,8 @@ class CoachService: try: cleaned = re.sub(r'^```(?:json)?\s*', '', content.strip()) cleaned = re.sub(r'\s*```$', '', cleaned.strip()) - llm_response.parsed_json = json.loads(cleaned) - except (json.JSONDecodeError, ValueError): + llm_response.parsed_json = json.loads(cleaned) + except (json.JSONDecodeError, ValueError): # Try to find JSON object in the text match = re.search(r'\{[\s\S]*\}', content) if match: @@ -313,7 +313,7 @@ class CoachService: except json.JSONDecodeError: pass else: - llm_response = await self.llm.chat(system_prompt, user_prompt) + llm_response = await self.llm.chat(system_prompt, user_prompt) # 6. Parse response into CoachSession session_id = f"sess-{datetime.now(timezone.utc).strftime('%Y%m%d-%H%M%S')}-{uuid.uuid4().hex[:6]}"