[PyOV] Rewrite map to generator in ie_api.py (#13571)

This commit is contained in:
Przemyslaw Wysocki
2022-10-21 09:56:48 +02:00
committed by GitHub
parent 85d78a3ef0
commit 27a03948c2

View File

@@ -286,7 +286,7 @@ class AsyncInferQueue(AsyncInferQueueBase):
:return: a map object (which is an iterator) that yields InferRequests.
:rtype: Iterable[openvino.runtime.InferRequest]
"""
return map(lambda x: InferRequest(x), super().__iter__())
return (InferRequest(x) for x in super().__iter__())
def __getitem__(self, i: int) -> InferRequest:
"""Gets InferRequest from the pool with given i id.