2626 Any ,
2727 Callable ,
2828 Dict ,
29- Generator ,
29+ Iterator ,
3030 List ,
3131 Mapping ,
3232 Optional ,
@@ -513,7 +513,7 @@ def _replace_guids_with_channels(self, payload: Any) -> Any:
513513 def needs_full_stack_trace (self ) -> bool :
514514 return self ._tracing_count > 0
515515
516- def get_frame_info (self ) -> Generator [FrameInfo , None ]:
516+ def get_frame_info (self ) -> Iterator [FrameInfo ]:
517517 current_frame = inspect .currentframe ()
518518
519519 if current_frame is None :
@@ -542,7 +542,7 @@ async def wrap_api_call(
542542 if self ._api_zone .get ():
543543 return await cb ()
544544 task = asyncio .current_task (self ._loop )
545- st : Union [List [FrameInfo ], Generator [FrameInfo , None ]] = (
545+ st : Union [List [FrameInfo ], Iterator [FrameInfo ]] = (
546546 getattr (task , "__pw_stack__" , None ) or self .get_frame_info ()
547547 )
548548 parsed_st = _extract_stack_trace_information_from_stack (
@@ -562,7 +562,7 @@ def wrap_api_call_sync(
562562 if self ._api_zone .get ():
563563 return cb ()
564564 task = asyncio .current_task (self ._loop )
565- st : Union [List [FrameInfo ], Generator [FrameInfo , None ]] = (
565+ st : Union [List [FrameInfo ], Iterator [FrameInfo ]] = (
566566 getattr (task , "__pw_stack__" , None ) or self .get_frame_info ()
567567 )
568568 parsed_st = _extract_stack_trace_information_from_stack (
@@ -598,7 +598,7 @@ class ParsedStackTrace(TypedDict):
598598
599599
600600def _extract_stack_trace_information_from_stack (
601- st : Union [List [FrameInfo ], Generator [FrameInfo , None ]],
601+ st : Union [List [FrameInfo ], Iterator [FrameInfo ]],
602602 is_internal : bool ,
603603 needs_full_stack : bool ,
604604) -> ParsedStackTrace :
0 commit comments