Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

style(question): one-line comment on quiz JSON raw_decode

santhreal968038f756d0
diff --git a/deeptutor/agents/question/pipeline.py b/deeptutor/agents/question/pipeline.py
index 818457ebf..bbc1659c6 100644
--- a/deeptutor/agents/question/pipeline.py
+++ b/deeptutor/agents/question/pipeline.py
@@ -1299,8 +1299,7 @@ class QuestionPipeline:
try:
parsed = json.loads(text)
except json.JSONDecodeError:
- # raw_decode stops at the first complete value so trailing prose
- # that itself contains braces cannot poison the slice.
+ # First JSON object only; trailing brace-prose must not extend the slice.
start = text.find("{")
if start == -1:
return {}