identity_func.py 247 B

12345678910111213
  1. from typing import cast, Any, TypeVar
  2. from .undefined import Undefined
  3. __all__ = ["identity_func"]
  4. T = TypeVar("T")
  5. def identity_func(x: T = cast(Any, Undefined), *_args: Any) -> T:
  6. """Return the first received argument."""
  7. return x