Skip to content

Commit

Permalink
chore(internal): remove unused __events stream property
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed May 24, 2024
1 parent 196e4b0 commit 472b831
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/anthropic/lib/streaming/_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def __init__(

self.text_stream = self.__stream_text__()
self.__final_message_snapshot: Message | None = None
self.__events: list[MessageStreamEvent] = []

def get_final_message(self) -> Message:
"""Waits until the stream has been read to completion and returns
Expand Down Expand Up @@ -123,8 +122,6 @@ def on_timeout(self) -> None:
def __stream__(self) -> Iterator[MessageStreamEvent]:
try:
for event in super().__stream__():
self.__events.append(event)

self.__final_message_snapshot = accumulate_event(
event=event,
current_snapshot=self.__final_message_snapshot,
Expand Down Expand Up @@ -227,7 +224,6 @@ def __init__(

self.text_stream = self.__stream_text__()
self.__final_message_snapshot: Message | None = None
self.__events: list[MessageStreamEvent] = []

async def get_final_message(self) -> Message:
"""Waits until the stream has been read to completion and returns
Expand Down Expand Up @@ -319,8 +315,6 @@ async def on_timeout(self) -> None:
async def __stream__(self) -> AsyncIterator[MessageStreamEvent]:
try:
async for event in super().__stream__():
self.__events.append(event)

self.__final_message_snapshot = accumulate_event(
event=event,
current_snapshot=self.__final_message_snapshot,
Expand Down

0 comments on commit 472b831

Please sign in to comment.