Debian Codegraph @

src/graphql/pyutils/identity_func.py

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