Skip to content

Commit

Permalink
ignore mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
tcapelle committed Aug 14, 2024
1 parent 1112450 commit ab3fa33
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions weave/integrations/anthropic/anthropic_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ def __stream_text__(self) -> Union[Iterator[str], AsyncIterator[str]]:
else:
return self.__sync_stream_text__()

def __sync_stream_text__(self) -> Iterator[str]: # type: ignore[attr-defined]
for chunk in self:
if chunk.type == "content_block_delta" and chunk.delta.type == "text_delta": # type: ignore[attr-defined]
yield chunk.delta.text

async def __async_stream_text__(self) -> AsyncIterator[str]: # type: ignore[attr-defined]
async for chunk in self:
if chunk.type == "content_block_delta" and chunk.delta.type == "text_delta":
yield chunk.delta.text
def __sync_stream_text__(self) -> Iterator[str]: # type: ignore
for chunk in self: # type: ignore
if chunk.type == "content_block_delta" and chunk.delta.type == "text_delta": # type: ignore
yield chunk.delta.text # type: ignore

async def __async_stream_text__(self) -> AsyncIterator[str]: # type: ignore
async for chunk in self: # type: ignore
if chunk.type == "content_block_delta" and chunk.delta.type == "text_delta": # type: ignore
yield chunk.delta.text # type: ignore

@property
def text_stream(self) -> Union[Iterator[str], AsyncIterator[str]]:
Expand Down

0 comments on commit ab3fa33

Please sign in to comment.