MCPcopy Index your code
hub / github.com/dry-python/returns / async_identity

Function async_identity

returns/future.py:46–60  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

44
45
46async 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

Callers 6

from_valueMethod · 0.85
from_ioMethod · 0.85
from_ioresultMethod · 0.85
from_resultMethod · 0.85
from_valueMethod · 0.85
from_failureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected