@@ -243,7 +243,9 @@ def add_delete(
243
243
def gen_ordered (
244
244
self ,
245
245
requests : Iterable [Any ],
246
- process : Callable [[Union [_DocumentType , RawBSONDocument , _WriteOp ]], bool ],
246
+ process : Union [
247
+ Callable [[_WriteOp ], bool ], Callable [[Union [_DocumentType , RawBSONDocument ]], bool ]
248
+ ],
247
249
) -> Iterator [_Run ]:
248
250
"""Generate batches of operations, batched by type of
249
251
operation, in the order **provided**.
@@ -266,7 +268,9 @@ def gen_ordered(
266
268
def gen_unordered (
267
269
self ,
268
270
requests : Iterable [Any ],
269
- process : Callable [[Union [_DocumentType , RawBSONDocument , _WriteOp ]], bool ],
271
+ process : Union [
272
+ Callable [[_WriteOp ], bool ], Callable [[Union [_DocumentType , RawBSONDocument ]], bool ]
273
+ ],
270
274
) -> Iterator [_Run ]:
271
275
"""Generate batches of operations, batched by type of
272
276
operation, in arbitrary order.
@@ -787,7 +791,9 @@ async def validate_batch(self, conn: AsyncConnection, write_concern: WriteConcer
787
791
async def execute (
788
792
self ,
789
793
generator : Iterable [Any ],
790
- process : Callable [[Union [_DocumentType , RawBSONDocument , _WriteOp ]], bool ],
794
+ process : Union [
795
+ Callable [[_WriteOp ], bool ], Callable [[Union [_DocumentType , RawBSONDocument ]], bool ]
796
+ ],
791
797
write_concern : WriteConcern ,
792
798
session : Optional [AsyncClientSession ],
793
799
operation : str ,
0 commit comments