Skip to content

Commit a6c4de5

Browse files
committed
fix linter and add missing copyright header to langgraph
Signed-off-by: yaron2 <schneider.yaron@live.com>
1 parent cc28d30 commit a6c4de5

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
"""
2+
Copyright 2026 The Dapr Authors
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
"""
13+
114
import base64
215
import json
316
import time

ext/dapr-ext-strands/dapr/ext/strands/dapr_session_manager.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
limitations under the License.
1212
"""
1313

14-
"""Dapr state store session manager for distributed storage."""
15-
1614
import json
1715
import logging
1816
from typing import Any, Dict, List, Literal, Optional, cast
@@ -62,7 +60,6 @@ def __init__(
6260
dapr_client: DaprClient instance for state operations.
6361
ttl: Optional time-to-live in seconds for state items.
6462
consistency: Consistency level for state operations ("eventual" or "strong").
65-
**kwargs: Additional keyword arguments for future extensibility.
6663
"""
6764
self._state_store_name = state_store_name
6865
self._dapr_client = dapr_client
@@ -85,15 +82,12 @@ def from_address(
8582
session_id: ID for the session.
8683
state_store_name: Name of the Dapr state store component.
8784
dapr_address: Dapr gRPC endpoint (default: localhost:50001).
88-
**kwargs: Additional arguments passed to __init__ (ttl, consistency, etc.).
8985
9086
Returns:
9187
DaprSessionManager instance with owned client.
9288
"""
9389
dapr_client = DaprClient(address=dapr_address)
94-
manager = cls(
95-
session_id, state_store_name=state_store_name, dapr_client=dapr_client, **kwargs
96-
)
90+
manager = cls(session_id, state_store_name=state_store_name, dapr_client=dapr_client)
9791
manager._owns_client = True
9892
return manager
9993

@@ -255,7 +249,6 @@ def _delete_state(self, key: str) -> None:
255249
except Exception as e:
256250
raise SessionException(f'Failed to delete state key {key}: {e}') from e
257251

258-
259252
def create_session(self, session: Session) -> Session:
260253
"""Create a new session.
261254
@@ -394,7 +387,10 @@ def update_agent(self, session_id: str, session_agent: SessionAgent) -> None:
394387
self._write_state(agent_key, session_agent.to_dict())
395388

396389
def create_message(
397-
self, session_id: str, agent_id: str, session_message: SessionMessage,
390+
self,
391+
session_id: str,
392+
agent_id: str,
393+
session_message: SessionMessage,
398394
) -> None:
399395
"""Create a new message for the agent.
400396
@@ -432,7 +428,6 @@ def read_message(
432428
session_id: ID of the session.
433429
agent_id: ID of the agent.
434430
message_id: Index of the message.
435-
**kwargs: Additional keyword arguments for future extensibility.
436431
437432
Returns:
438433
SessionMessage if found, None otherwise.

0 commit comments

Comments
 (0)