@@ -78,7 +78,7 @@ def _iter_patch_batches(
7878 item_builder : t .Callable [
7979 [dm .WorkItem ], api_models .WorkitemsListPatchRequestDataItem
8080 ],
81- ) -> t .Generator [api_models .WorkitemsListPatchRequest , None , None ]:
81+ ) -> t .Iterator [api_models .WorkitemsListPatchRequest ]:
8282 current_batch = api_models .WorkitemsListPatchRequest (data = [])
8383 content_size = min_wi_patch_request_size
8484
@@ -118,7 +118,7 @@ def _iter_patch_batches(
118118 def _iter_update_batches (
119119 self ,
120120 items : list [dm .WorkItem ],
121- ) -> t .Generator [api_models .WorkitemsListPatchRequest , None , None ]:
121+ ) -> t .Iterator [api_models .WorkitemsListPatchRequest ]:
122122 yield from self ._iter_patch_batches (
123123 (item for item in items if self ._has_content_to_patch (item )),
124124 self ._build_work_item_list_patch_item ,
@@ -127,11 +127,7 @@ def _iter_update_batches(
127127 def _iter_type_change_batches (
128128 self ,
129129 items : list [dm .WorkItem ],
130- ) -> t .Generator [
131- tuple [api_models .WorkitemsListPatchRequest , str ],
132- None ,
133- None ,
134- ]:
130+ ) -> t .Iterator [tuple [api_models .WorkitemsListPatchRequest , str ]]:
135131 grouped : dict [str , list [dm .WorkItem ]] = {}
136132 for item in items :
137133 if item .type :
@@ -146,10 +142,8 @@ def _iter_type_change_batches(
146142
147143 def _iter_create_batches (
148144 self , items : list [dm .WorkItem ]
149- ) -> t .Generator [
150- tuple [api_models .WorkitemsListPostRequest , list [dm .WorkItem ]],
151- None ,
152- None ,
145+ ) -> t .Iterator [
146+ tuple [api_models .WorkitemsListPostRequest , list [dm .WorkItem ]]
153147 ]:
154148 current_batch = api_models .WorkitemsListPostRequest (data = [])
155149 content_size = min_wi_request_size
0 commit comments