Skip to content

Commit a175ba1

Browse files
committed
Renamed for consistency
1 parent 523bc0f commit a175ba1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sentry_sdk/integrations/anthropic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
raise DidNotEnable("Anthropic not installed")
2222

2323
if TYPE_CHECKING:
24-
from typing import Any, Iterator
24+
from typing import Any, Iterator, AsyncIterator
2525
from sentry_sdk.tracing import Span
2626

2727

@@ -140,8 +140,8 @@ def _sentry_patched_create_common(f, *args, **kwargs):
140140
elif hasattr(result, "_iterator"):
141141
old_iterator = result._iterator
142142

143-
async def async_new_iterator():
144-
# type: () -> Iterator[MessageStreamEvent]
143+
async def new_iterator_async():
144+
# type: () -> AsyncIterator[MessageStreamEvent]
145145
input_tokens = 0
146146
output_tokens = 0
147147
content_blocks = []
@@ -214,7 +214,7 @@ def new_iterator():
214214
span.__exit__(None, None, None)
215215

216216
if str(type(result._iterator)) == "<class 'async_generator'>":
217-
result._iterator = async_new_iterator()
217+
result._iterator = new_iterator_async()
218218
else:
219219
result._iterator = new_iterator()
220220

0 commit comments

Comments
 (0)