Skip to content

Commit 20dc56b

Browse files
fix: Correct SyntaxError in MOSProduct.add method
The previous commit introduced a SyntaxError in the MOSProduct.add method due to incorrect multi-line argument formatting for the super().add() call. This commit fixes the syntax by properly enclosing the arguments in parentheses for multi-line continuation. It also incorporates minor formatting changes identified by ruff.
1 parent e9d31cd commit 20dc56b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/memos/mem_os/product.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,14 +1499,21 @@ def add(
14991499
source: str | None = None,
15001500
user_profile: bool = False,
15011501
session_id: str | None = None,
1502-
task_id: str | None = None, # Add task_id parameter
1502+
task_id: str | None = None, # Add task_id parameter
15031503
):
15041504
"""Add memory for a specific user."""
15051505

15061506
# Load user cubes if not already loaded
15071507
self._load_user_cubes(user_id, self.default_cube_config)
15081508
result = super().add(
1509-
messages, memory_content, doc_path, mem_cube_id, user_id, session_id=session_id, task_id=task_id
1509+
messages,
1510+
memory_content,
1511+
doc_path,
1512+
mem_cube_id,
1513+
user_id,
1514+
session_id=session_id,
1515+
task_id=task_id,
1516+
)
15101517
if user_profile:
15111518
try:
15121519
user_interests = memory_content.split("'userInterests': '")[1].split("', '")[0]

0 commit comments

Comments
 (0)