Async function that returns its argument. .. code:: python >>> import anyio >>> from returns.future import async_identity >>> assert anyio.run(async_identity, 1) == 1 See :func:`returns.functions.identity` for sync version of this function and more docs and exam
(instance: _FirstType)
| 44 | |
| 45 | |
| 46 | async def async_identity(instance: _FirstType) -> _FirstType: # noqa: RUF029 |
| 47 | """ |
| 48 | Async function that returns its argument. |
| 49 | |
| 50 | .. code:: python |
| 51 | |
| 52 | >>> import anyio |
| 53 | >>> from returns.future import async_identity |
| 54 | >>> assert anyio.run(async_identity, 1) == 1 |
| 55 | |
| 56 | See :func:`returns.functions.identity` |
| 57 | for sync version of this function and more docs and examples. |
| 58 | |
| 59 | """ |
| 60 | return instance |
| 61 | |
| 62 | |
| 63 | # Future |
no outgoing calls
no test coverage detected