Skip to content

Commit 2ecc1cb

Browse files
committed
linter
Signed-off-by: yaron2 <[email protected]>
1 parent 540c666 commit 2ecc1cb

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

dapr-ext-langgraph/dapr/ext/langgraph/dapr_checkpointer.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ def _get_key(self, config: RunnableConfig) -> str:
2626
thread_id = None
2727

2828
if isinstance(config, dict):
29-
thread_id = config.get("configurable", {}).get("thread_id")
29+
thread_id = config.get('configurable', {}).get('thread_id')
3030

3131
if not thread_id:
32-
thread_id = config.get("thread_id")
32+
thread_id = config.get('thread_id')
3333

3434
if not thread_id:
35-
thread_id = "default"
35+
thread_id = 'default'
3636

37-
return f"{self.key_prefix}:{thread_id}"
37+
return f'{self.key_prefix}:{thread_id}'
3838

3939
# restore a checkpoint
4040
def get_tuple(self, config: RunnableConfig) -> CheckpointTuple | None:
@@ -66,7 +66,6 @@ def put(
6666
parent_config: RunnableConfig | None,
6767
metadata: dict[str, Any],
6868
) -> None:
69-
7069
key = self._get_key(config)
7170

7271
checkpoint_serializable = {
@@ -87,9 +86,7 @@ def put(
8786

8887
if key not in registry:
8988
registry.append(key)
90-
self.client.save_state(
91-
self.store_name, self.REGISTRY_KEY, json.dumps(registry)
92-
)
89+
self.client.save_state(self.store_name, self.REGISTRY_KEY, json.dumps(registry))
9390

9491
# incremental persistence (for streamed runs)
9592
def put_writes(
@@ -99,7 +96,6 @@ def put_writes(
9996
task_id: str,
10097
task_path: str = '',
10198
) -> None:
102-
10399
_ = task_id, task_path
104100

105101
key = self._get_key(config)

0 commit comments

Comments
 (0)