MCPcopy
hub / github.com/langchain-ai/langgraph / _pick_mapper

Function _pick_mapper

libs/langgraph/langgraph/graph/state.py:1718–1725  ·  view source on GitHub ↗
(
    state_keys: Sequence[str], schema: type[Any]
)

Source from the content-addressed store, hash-verified

1716
1717
1718def _pick_mapper(
1719 state_keys: Sequence[str], schema: type[Any]
1720) -> Callable[[Any], Any] | None:
1721 if state_keys == ["__root__"]:
1722 return None
1723 if isclass(schema) and (issubclass(schema, BaseModel) or is_dataclass(schema)):
1724 return partial(_coerce_state, schema)
1725 return None
1726
1727
1728_S = TypeVar("_S")

Callers 3

compileMethod · 0.85
attach_nodeMethod · 0.85
attach_branchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…