test_with_types_with_type_generics() — langchain Function Reference
Architecture documentation for the test_with_types_with_type_generics() function in test_runnable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a6a75dba_e4dc_215b_3e2b_df91ce7db7f5["test_with_types_with_type_generics()"] 26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"] a6a75dba_e4dc_215b_3e2b_df91ce7db7f5 -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5 style a6a75dba_e4dc_215b_3e2b_df91ce7db7f5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_runnable.py lines 648–663
def test_with_types_with_type_generics() -> None:
"""Verify that with_types works if we use things like list[int]."""
def foo(x: int) -> None:
"""Add one to the input."""
raise NotImplementedError
# Try specifying some
RunnableLambda(foo).with_types(
output_type=list[int], # type: ignore[arg-type]
input_type=list[int], # type: ignore[arg-type]
)
RunnableLambda(foo).with_types(
output_type=Sequence[int], # type: ignore[arg-type]
input_type=Sequence[int], # type: ignore[arg-type]
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_with_types_with_type_generics() do?
test_with_types_with_type_generics() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is test_with_types_with_type_generics() defined?
test_with_types_with_type_generics() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 648.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free