@@ -279,60 +279,6 @@ async def fn_async(*args: P.args, **kwargs: P.kwargs) -> R:
279279 return fn_async
280280
281281
282- # # TODO-barret-future; Q: Keep code?
283- # class WrapAsync(Generic[P, R]):
284- # """
285- # Make a function asynchronous.
286-
287- # Parameters
288- # ----------
289- # fn
290- # Function to make asynchronous.
291-
292- # Returns
293- # -------
294- # :
295- # Asynchronous function (within the `WrapAsync` instance)
296- # """
297-
298- # def __init__(self, fn: Callable[P, R] | Callable[P, Awaitable[R]]):
299- # if isinstance(fn, WrapAsync):
300- # fn = cast(WrapAsync[P, R], fn)
301- # return fn
302- # self._is_async = is_async_callable(fn)
303- # self._fn = wrap_async(fn)
304-
305- # async def __call__(self, *args: P.args, **kwargs: P.kwargs) -> R:
306- # """
307- # Call the asynchronous function.
308- # """
309- # return await self._fn(*args, **kwargs)
310-
311- # @property
312- # def is_async(self) -> bool:
313- # """
314- # Was the original function asynchronous?
315-
316- # Returns
317- # -------
318- # :
319- # Whether the original function is asynchronous.
320- # """
321- # return self._is_async
322-
323- # @property
324- # def fn(self) -> Callable[P, R] | Callable[P, Awaitable[R]]:
325- # """
326- # Retrieve the original function
327-
328- # Returns
329- # -------
330- # :
331- # Original function supplied to the `WrapAsync` constructor.
332- # """
333- # return self._fn
334-
335-
336282# This function should generally be used in this code base instead of
337283# `iscoroutinefunction()`.
338284def is_async_callable (
0 commit comments