diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py index 767b8f0e8..02d5880a0 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py @@ -319,11 +319,13 @@ class PostgresSaver(BasePostgresSaver): with self._cursor(pipeline=True) as cur: cur.execute( self.DELETE_WRITES_SQL, - config["configurable"]["thread_id"], - config["configurable"]["checkpoint_ns"], - config["configurable"]["checkpoint_id"], - task_id, - len(writes), + ( + config["configurable"]["thread_id"], + config["configurable"]["checkpoint_ns"], + config["configurable"]["checkpoint_id"], + task_id, + len(writes), + ), ) cur.executemany( self.UPSERT_CHECKPOINT_WRITES_SQL, diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py index cdbbe990a..7ddb81237 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py @@ -275,11 +275,13 @@ class AsyncPostgresSaver(BasePostgresSaver): async with self._cursor(pipeline=True) as cur: await cur.execute( self.DELETE_WRITES_SQL, - config["configurable"]["thread_id"], - config["configurable"]["checkpoint_ns"], - config["configurable"]["checkpoint_id"], - task_id, - len(writes), + ( + config["configurable"]["thread_id"], + config["configurable"]["checkpoint_ns"], + config["configurable"]["checkpoint_id"], + task_id, + len(writes), + ), ) await cur.executemany( self.UPSERT_CHECKPOINT_WRITES_SQL,