Skip to content

Commit b6497be

Browse files
anonx3247claude
andcommitted
Fix mypy errors in phase1_compressor.py
Cast dict values to str explicitly to satisfy type checker. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 36d6b3e commit b6497be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/train/phase1_compressor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ def extract_text(item: dict[str, Any]) -> str:
368368
return " ".join(texts)
369369
# Handle other formats
370370
elif "text" in item:
371-
return item["text"]
371+
return str(item["text"])
372372
elif "content" in item:
373-
return item["content"]
373+
return str(item["content"])
374374
else:
375375
# Fallback: join all string values
376376
return " ".join(str(v) for v in item.values() if isinstance(v, str))

0 commit comments

Comments
 (0)