docs: style linting (#6260)

also fixes some links

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: ccurme <chester.curme@gmail.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
This commit is contained in:
Mason Daugherty
2025-10-16 11:25:50 +00:00
committed by GitHub
co-authored by Sydney Runkle ccurme Sydney Runkle William FH
parent cedecd8ed6
commit d9e3d83894
33 changed files with 285 additions and 269 deletions
@@ -184,7 +184,7 @@ class SqliteSaver(BaseCheckpointSaver[str]):
"""Get a checkpoint tuple from the database.
This method retrieves a checkpoint tuple from the SQLite database based on the
provided config. If the config contains a "checkpoint_id" key, the checkpoint with
provided config. If the config contains a `checkpoint_id` key, the checkpoint with
the matching thread ID and checkpoint ID is retrieved. Otherwise, the latest checkpoint
for the given thread ID is retrieved.
@@ -192,7 +192,7 @@ class SqliteSaver(BaseCheckpointSaver[str]):
config: The config to use for retrieving the checkpoint.
Returns:
Optional[CheckpointTuple]: The retrieved checkpoint tuple, or None if no matching checkpoint was found.
The retrieved checkpoint tuple, or None if no matching checkpoint was found.
Examples:
@@ -301,12 +301,12 @@ class SqliteSaver(BaseCheckpointSaver[str]):
Args:
config: The config to use for listing the checkpoints.
filter: Additional filtering criteria for metadata. Defaults to None.
before: If provided, only checkpoints before the specified checkpoint ID are returned. Defaults to None.
limit: The maximum number of checkpoints to return. Defaults to None.
filter: Additional filtering criteria for metadata.
before: If provided, only checkpoints before the specified checkpoint ID are returned.
limit: The maximum number of checkpoints to return.
Yields:
Iterator[CheckpointTuple]: An iterator of checkpoint tuples.
An iterator of checkpoint tuples.
Examples:
>>> from langgraph.checkpoint.sqlite import SqliteSaver
@@ -139,7 +139,7 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
"""Get a checkpoint tuple from the database.
This method retrieves a checkpoint tuple from the SQLite database based on the
provided config. If the config contains a "checkpoint_id" key, the checkpoint with
provided config. If the config contains a `checkpoint_id` key, the checkpoint with
the matching thread ID and checkpoint ID is retrieved. Otherwise, the latest checkpoint
for the given thread ID is retrieved.
@@ -147,7 +147,7 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
config: The config to use for retrieving the checkpoint.
Returns:
Optional[CheckpointTuple]: The retrieved checkpoint tuple, or None if no matching checkpoint was found.
The retrieved checkpoint tuple, or None if no matching checkpoint was found.
"""
try:
# check if we are in the main thread, only bg threads can block
@@ -181,11 +181,11 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
Args:
config: Base configuration for filtering checkpoints.
filter: Additional filtering criteria for metadata.
before: If provided, only checkpoints before the specified checkpoint ID are returned. Defaults to None.
before: If provided, only checkpoints before the specified checkpoint ID are returned.
limit: Maximum number of checkpoints to return.
Yields:
Iterator[CheckpointTuple]: An iterator of matching checkpoint tuples.
An iterator of matching checkpoint tuples.
"""
try:
# check if we are in the main thread, only bg threads can block
@@ -316,7 +316,7 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
"""Get a checkpoint tuple from the database asynchronously.
This method retrieves a checkpoint tuple from the SQLite database based on the
provided config. If the config contains a "checkpoint_id" key, the checkpoint with
provided config. If the config contains a `checkpoint_id` key, the checkpoint with
the matching thread ID and checkpoint ID is retrieved. Otherwise, the latest checkpoint
for the given thread ID is retrieved.
@@ -324,7 +324,7 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
config: The config to use for retrieving the checkpoint.
Returns:
Optional[CheckpointTuple]: The retrieved checkpoint tuple, or None if no matching checkpoint was found.
The retrieved checkpoint tuple, or None if no matching checkpoint was found.
"""
await self.setup()
checkpoint_ns = config["configurable"].get("checkpoint_ns", "")
@@ -414,11 +414,11 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
Args:
config: Base configuration for filtering checkpoints.
filter: Additional filtering criteria for metadata.
before: If provided, only checkpoints before the specified checkpoint ID are returned. Defaults to None.
before: If provided, only checkpoints before the specified checkpoint ID are returned.
limit: Maximum number of checkpoints to return.
Yields:
AsyncIterator[CheckpointTuple]: An asynchronous iterator of matching checkpoint tuples.
An asynchronous iterator of matching checkpoint tuples.
"""
await self.setup()
where, params = search_where(config, filter, before)