Skip to content

Commit 41f5b16

Browse files
author
phernandez
committed
format code
1 parent ca632be commit 41f5b16

File tree

9 files changed

+18
-29
lines changed

9 files changed

+18
-29
lines changed

installer/installer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import tkinter as tk
99
from tkinter import messagebox
1010

11+
1112
def ensure_uv_installed():
1213
"""Check if uv is installed, install if not."""
1314
try:

installer/setup.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,24 @@
44
# Build options for all platforms
55
build_exe_options = {
66
"packages": ["json", "pathlib"],
7-
"excludes": [
8-
"unittest",
9-
"pydoc",
10-
"test"
11-
],
7+
"excludes": ["unittest", "pydoc", "test"],
128
}
139

1410
# Platform-specific options
1511
if sys.platform == "win32":
1612
base = "Win32GUI" # Use GUI base for Windows
17-
build_exe_options.update({
18-
"include_msvcr": True,
19-
})
13+
build_exe_options.update(
14+
{
15+
"include_msvcr": True,
16+
}
17+
)
2018
target_name = "Basic Memory Installer.exe"
2119
else: # darwin
2220
base = None # Don't use GUI base for macOS
2321
target_name = "Basic Memory Installer"
2422

2523
executables = [
26-
Executable(
27-
script="installer.py",
28-
target_name=target_name,
29-
base=base,
30-
icon="Basic.icns"
31-
)
24+
Executable(script="installer.py", target_name=target_name, base=base, icon="Basic.icns")
3225
]
3326

3427
setup(
@@ -41,7 +34,7 @@
4134
"bundle_name": "Basic Memory Installer",
4235
"iconfile": "Basic.icns",
4336
"codesign_identity": "-", # Force ad-hoc signing
44-
}
37+
},
4538
},
4639
executables=executables,
4740
)

src/basic_memory/cli/commands/status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async def get_file_change_scanner(
2626
) -> FileChangeScanner: # pragma: no cover
2727
"""Get sync service instance."""
2828
_, session_maker = await db.get_or_create_db(db_path=config.database_path, db_type=db_type)
29-
29+
3030
entity_repository = EntityRepository(session_maker)
3131
file_change_scanner = FileChangeScanner(entity_repository)
3232
return file_change_scanner

src/basic_memory/cli/commands/sync.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from basic_memory import db
1515
from basic_memory.cli.app import app
1616
from basic_memory.config import config
17-
from basic_memory.db import DatabaseType
1817
from basic_memory.markdown import EntityParser
1918
from basic_memory.markdown.markdown_processor import MarkdownProcessor
2019
from basic_memory.repository import (
@@ -41,7 +40,9 @@ class ValidationIssue:
4140

4241
async def get_sync_service(): # pragma: no cover
4342
"""Get sync service instance with all dependencies."""
44-
_, session_maker = await db.get_or_create_db(db_path=config.database_path, db_type=db.DatabaseType.FILESYSTEM)
43+
_, session_maker = await db.get_or_create_db(
44+
db_path=config.database_path, db_type=db.DatabaseType.FILESYSTEM
45+
)
4546

4647
entity_parser = EntityParser(config.home)
4748
markdown_processor = MarkdownProcessor(entity_parser)
@@ -52,7 +53,7 @@ async def get_sync_service(): # pragma: no cover
5253
observation_repository = ObservationRepository(session_maker)
5354
relation_repository = RelationRepository(session_maker)
5455
search_repository = SearchRepository(session_maker)
55-
56+
5657
# Initialize services
5758
search_service = SearchService(search_repository, entity_repository, file_service)
5859
link_resolver = LinkResolver(entity_repository, search_service)
@@ -152,8 +153,7 @@ def display_detailed_sync_results(knowledge: SyncReport):
152153

153154
async def run_sync(verbose: bool = False, watch: bool = False):
154155
"""Run sync operation."""
155-
156-
156+
157157
sync_service = await get_sync_service()
158158

159159
# Start watching if requested

src/basic_memory/db.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
async_scoped_session,
1919
)
2020

21-
from basic_memory.models.search import CREATE_SEARCH_INDEX
2221
from basic_memory.repository.search_repository import SearchRepository
2322

2423
# Module level state
@@ -73,7 +72,6 @@ async def scoped_session(
7372
await factory.remove()
7473

7574

76-
7775
async def get_or_create_db(
7876
db_path: Path,
7977
db_type: DatabaseType = DatabaseType.FILESYSTEM,

src/basic_memory/sync/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
from typing import Set, Dict
55

66

7-
8-
97
@dataclass
108
class SyncReport:
119
"""Report of file changes found compared to database state.

tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import pytest
88
import pytest_asyncio
99
from loguru import logger
10-
from sqlalchemy import text
1110
from sqlalchemy.ext.asyncio import AsyncSession, AsyncEngine, async_sessionmaker
1211

1312
from basic_memory import db
@@ -62,7 +61,7 @@ async def engine_factory(
6261
# Create all tables for the DB the engine is connected to
6362
async with engine.begin() as conn:
6463
await conn.run_sync(Base.metadata.create_all)
65-
64+
6665
yield engine, session_maker
6766

6867

tests/mcp/test_tool_notes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,4 @@ async def test_read_note_memory_url(app):
257257
# Should be able to read it with a memory:// URL
258258
memory_url = f"memory://{permalink}"
259259
content = await notes.read_note(memory_url)
260-
assert "Testing memory:// URL handling" in content
260+
assert "Testing memory:// URL handling" in content

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)