Skip to content

Commit dff6d3e

Browse files
committed
Typing
1 parent a16b79a commit dff6d3e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

libs/langgraph-checkpoint-mongodb/tests/integration_tests/test_interrupts.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Follows https://langchain-ai.github.io/langgraph/how-tos/human_in_the_loop/time-travel"""
22

33
import os
4-
from typing import TypedDict
4+
from typing import Generator, TypedDict
55

66
import pytest
77

@@ -10,6 +10,7 @@
1010
from langgraph.checkpoint.mongodb import MongoDBSaver
1111
from langgraph.graph import END, StateGraph
1212
from langgraph.graph.graph import CompiledGraph
13+
from langchain_core.runnables import RunnableConfig
1314

1415
# --- Configuration ---
1516
MONGODB_URI = os.environ.get("MONGODB_URI", "mongodb://localhost:27017")
@@ -19,12 +20,12 @@
1920

2021

2122
@pytest.fixture(scope="function")
22-
def checkpointer_memory():
23+
def checkpointer_memory() -> Generator[InMemorySaver, None, None]:
2324
yield InMemorySaver()
2425

2526

2627
@pytest.fixture(scope="function")
27-
def checkpointer_mongodb():
28+
def checkpointer_mongodb() -> Generator[MongoDBSaver, None, None]:
2829
with MongoDBSaver.from_conn_string(
2930
MONGODB_URI,
3031
db_name=DB_NAME,
@@ -45,7 +46,7 @@ def checkpointer_mongodb():
4546

4647

4748
@pytest.mark.parametrize("checkpointer_name", ALL_CHECKPOINTERS_SYNC)
48-
def test(request: pytest.FixtureRequest, checkpointer_name: str):
49+
def test(request: pytest.FixtureRequest, checkpointer_name: str) -> None:
4950
checkpointer: BaseCheckpointSaver = request.getfixturevalue(checkpointer_name)
5051
assert isinstance(checkpointer, BaseCheckpointSaver)
5152

@@ -80,7 +81,7 @@ def node_double(state: State) -> State:
8081
)
8182

8283
# --- Configure ---
83-
config = {"configurable": {"thread_id": "thread_#1"}}
84+
config: RunnableConfig = {"configurable": {"thread_id": "thread_#1"}}
8485
initial_input = {"value": 10, "step": 0}
8586

8687
# --- 1st invoke, with Interruption

0 commit comments

Comments
 (0)