Skip to content

Commit 0214933

Browse files
committed
fix coverage
1 parent 593e02f commit 0214933

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pydantic_ai_slim/pydantic_ai/_parts_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ def _emit_thinking_start_from_text(
510510

511511
if existing_part is not None and existing_part.part.content:
512512
new_part_index = self.append_and_track_new_part(thinking_part, vendor_part_id)
513-
if existing_part.part.potential_opening_tag_buffer:
513+
if (
514+
existing_part.part.potential_opening_tag_buffer
515+
): # pragma: no cover - this can't happen by the current logic so it's more of a safeguard
514516
raise RuntimeError(
515517
'The buffer of an existing TextPart should have been flushed before creating a ThinkingPart'
516518
)

0 commit comments

Comments
 (0)