Skip to content

Commit 2972496

Browse files
committed
chore(indexing): address repository review notes
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 0f6bdf3 commit 2972496

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/basic_memory/repository/entity_repository.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ def __init__(self, session_maker: async_sessionmaker[AsyncSession], project_id:
3333
"""
3434
super().__init__(session_maker, Entity, project_id=project_id)
3535

36-
async def get_by_id(
37-
self, entity_id: int, *, load_relations: bool = True
38-
) -> Optional[Entity]: # pragma: no cover
36+
async def get_by_id(self, entity_id: int, *, load_relations: bool = True) -> Optional[Entity]:
3937
"""Get entity by numeric ID.
4038
4139
Args:

src/basic_memory/repository/repository.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ async def add_all_no_return(self, models: List[T]) -> int:
152152

153153
session.add_all(models)
154154
await session.flush()
155+
logger.debug(f"Added {len(models)} {self.Model.__name__} records")
155156
return len(models)
156157

157158
def select(self, *entities: Any) -> Select:

0 commit comments

Comments
 (0)