codekingpro/portable-devtools
114k
1from __future__ import annotations2 3from typing_extensions import TypeVar4 5from langgraph._internal._typing import StateLike6 7__all__ = (8 "StateT",9 "StateT_co",10 "StateT_contra",11 "InputT",12 "OutputT",13 "ContextT",14)15 16StateT = TypeVar("StateT", bound=StateLike)17"""Type variable used to represent the state in a graph."""18 19StateT_co = TypeVar("StateT_co", bound=StateLike, covariant=True)20 21StateT_contra = TypeVar("StateT_contra", bound=StateLike, contravariant=True)22 23ContextT = TypeVar("ContextT", bound=StateLike | None, default=None)24"""Type variable used to represent graph run scoped context.25 26Defaults to `None`.27"""28 29ContextT_contra = TypeVar(30 "ContextT_contra", bound=StateLike | None, contravariant=True, default=None31)32 33InputT = TypeVar("InputT", bound=StateLike, default=StateT)34"""Type variable used to represent the input to a `StateGraph`.35 36Defaults to `StateT`.37"""38 39OutputT = TypeVar("OutputT", bound=StateLike, default=StateT)40"""Type variable used to represent the output of a `StateGraph`.41 42Defaults to `StateT`.43"""44 45NodeInputT = TypeVar("NodeInputT", bound=StateLike)46"""Type variable used to represent the input to a node."""47 48NodeInputT_contra = TypeVar("NodeInputT_contra", bound=StateLike, contravariant=True)49 