ci: Enable mypy checks for checkpoint-sqlite lib

This commit is contained in:
Nuno Campos
2024-09-19 08:46:44 -07:00
parent b8a8651c23
commit 6c0339ca4b
7 changed files with 72 additions and 53 deletions
@@ -31,7 +31,7 @@ _AIO_ERROR_MSG = (
)
class SqliteSaver(BaseCheckpointSaver):
class SqliteSaver(BaseCheckpointSaver[str]):
"""A checkpoint saver that stores checkpoints in a SQLite database.
Note:
@@ -487,6 +487,7 @@ class SqliteSaver(BaseCheckpointSaver):
config: RunnableConfig,
checkpoint: Checkpoint,
metadata: CheckpointMetadata,
new_versions: ChannelVersions,
) -> RunnableConfig:
"""Save a checkpoint to the database asynchronously.
@@ -4,6 +4,7 @@ from contextlib import asynccontextmanager
from typing import (
Any,
AsyncIterator,
Callable,
Dict,
Iterator,
List,
@@ -30,10 +31,10 @@ from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
from langgraph.checkpoint.serde.types import ChannelProtocol
from langgraph.checkpoint.sqlite.utils import search_where
T = TypeVar("T", bound=callable)
T = TypeVar("T", bound=Callable)
class AsyncSqliteSaver(BaseCheckpointSaver):
class AsyncSqliteSaver(BaseCheckpointSaver[str]):
"""An asynchronous checkpoint saver that stores checkpoints in a SQLite database.
This class provides an asynchronous interface for saving and retrieving checkpoints