Skip to content

Commit 2aa2388

Browse files
phernandezclaude
andcommitted
fix: correct import path and type issues in db migration deduplication
- Fix import to use correct app_config from basic_memory.config - Remove unused imports in test file - Resolve type checker errors for app_config parameter 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6cdee9a commit 2aa2388

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/basic_memory/db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ async def get_or_create_db(
9999
# Run migrations automatically unless explicitly disabled
100100
if ensure_migrations:
101101
if app_config is None:
102-
from basic_memory.config import get_basic_memory_config
103-
app_config = get_basic_memory_config()
102+
from basic_memory.config import app_config as global_app_config
103+
app_config = global_app_config
104104
await run_migrations(app_config, db_type)
105105

106106
# These checks should never fail since we just created the engine and session maker

tests/test_db_migration_deduplication.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""Tests for database migration deduplication functionality."""
22

33
import pytest
4-
from pathlib import Path
5-
from unittest.mock import patch, AsyncMock, call, MagicMock
4+
from unittest.mock import patch, AsyncMock, MagicMock
65

7-
from basic_memory.config import BasicMemoryConfig
86
from basic_memory import db
97

108

0 commit comments

Comments
 (0)