Skip to content

Commit ca7361b

Browse files
committed
fix formatting and merge
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent aa610e4 commit ca7361b

5 files changed

Lines changed: 10 additions & 11 deletions

File tree

src/basic_memory/api/routers/project_router.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ async def sync_project(
113113
force_full: bool = Query(
114114
False, description="Force full scan, bypassing watermark optimization"
115115
),
116-
run_in_background: bool = Query(True, description="Run in background")
116+
run_in_background: bool = Query(True, description="Run in background"),
117117
):
118118
"""Force project filesystem sync to database.
119119
@@ -142,7 +142,9 @@ async def sync_project(
142142
"message": f"Filesystem sync initiated for project '{project_config.name}'",
143143
}
144144
else:
145-
report = await sync_service.sync(project_config.home, project_config.name, force_full=force_full)
145+
report = await sync_service.sync(
146+
project_config.home, project_config.name, force_full=force_full
147+
)
146148
logger.info(
147149
f"Filesystem sync completed for project: {project_config.name} (force_full={force_full})"
148150
)

src/basic_memory/file_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def dump_frontmatter(post: frontmatter.Post) -> str:
213213
sort_keys=False,
214214
allow_unicode=True,
215215
default_flow_style=False,
216-
Dumper=yaml.SafeDumper
216+
Dumper=yaml.SafeDumper,
217217
)
218218

219219
# Construct the final markdown with frontmatter

src/basic_memory/mcp/tools/write_note.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
# Define TagType as a Union that can accept either a string or a list of strings or None
1717
TagType = Union[List[str], str, None]
1818

19-
# Define TagType as a Union that can accept either a string or a list of strings or None
20-
TagType = Union[List[str], str, None]
21-
2219

2320
@mcp.tool(
2421
description="Create or update a markdown note. Returns a markdown formatted summary of the semantic content.",
@@ -29,7 +26,7 @@ async def write_note(
2926
folder: str,
3027
project: Optional[str] = None,
3128
tags: list[str] | str | None = None,
32-
entity_type: str = "note",
29+
note_type: str = "note",
3330
context: Context | None = None,
3431
) -> str:
3532
"""Write a markdown note to the knowledge base.

tests/api/test_project_router.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,7 @@ async def test_sync_project_endpoint_foreground_with_changes(
588588
assert "deleted" in data
589589

590590
# At least one of these should have changes
591-
has_changes = (
592-
len(data["new"]) > 0 or len(data["modified"]) > 0 or len(data["deleted"]) > 0
593-
)
591+
has_changes = len(data["new"]) > 0 or len(data["modified"]) > 0 or len(data["deleted"]) > 0
594592
assert has_changes or data["total"] >= 0 # Either changes detected or empty sync is valid
595593

596594
finally:

tests/services/test_entity_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,9 @@ async def test_edit_entity_replace_section_strips_duplicate_header(
13151315

13161316
# Count occurrences of "## Testing" - should only be 1
13171317
testing_header_count = file_content.count("## Testing")
1318-
assert testing_header_count == 1, f"Expected 1 '## Testing' header, found {testing_header_count}"
1318+
assert testing_header_count == 1, (
1319+
f"Expected 1 '## Testing' header, found {testing_header_count}"
1320+
)
13191321

13201322
assert "New content for testing section" in file_content
13211323
assert "Original content" not in file_content

0 commit comments

Comments
 (0)