From 62463dfa4a698735c441fe7b2e2ba7f2070f2e89 Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Mon, 23 Mar 2026 19:34:14 -0400 Subject: [PATCH] fix: correct indentation in deepseek_brain.py (choose_action + _parse_action) --- src/commander_ai_lab/sim/deepseek_brain.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commander_ai_lab/sim/deepseek_brain.py b/src/commander_ai_lab/sim/deepseek_brain.py index 9e1dd4b..57da9bf 100644 --- a/src/commander_ai_lab/sim/deepseek_brain.py +++ b/src/commander_ai_lab/sim/deepseek_brain.py @@ -590,7 +590,7 @@ class DeepSeekBrain: if not self._connected: return self._fallback_action(snapshot, t_start, "not_connected") -last_err = None + last_err = None for attempt in range(1, self.config.max_retries + 1): try: result = self._call_llm(snapshot) @@ -660,9 +660,9 @@ last_err = None text = text.strip() start = text.find('{') - end = text.rfind('}') - if start != -1 and end != -1 and end > start: - text = text[start:end + 1] + end = text.rfind('}') + if start != -1 and end != -1 and end > start: + text = text[start:end + 1] try: parsed = json.loads(text)