From 24cb11f3f5ace4a2d3f36cde9d62b277c80b0c50 Mon Sep 17 00:00:00 2001 From: Matt23-star Date: Fri, 29 Aug 2025 21:09:14 -0700 Subject: [PATCH] style: ruff-format --- lightrag/kg/deprecated/chroma_impl.py | 4 +--- lightrag/kg/postgres_impl.py | 11 ++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lightrag/kg/deprecated/chroma_impl.py b/lightrag/kg/deprecated/chroma_impl.py index a6c43504..75a7d4bf 100644 --- a/lightrag/kg/deprecated/chroma_impl.py +++ b/lightrag/kg/deprecated/chroma_impl.py @@ -164,9 +164,7 @@ class ChromaVectorDBStorage(BaseVectorStorage): logger.error(f"Error during ChromaDB upsert: {str(e)}") raise - async def query( - self, query: str, top_k: int - ) -> list[dict[str, Any]]: + async def query(self, query: str, top_k: int) -> list[dict[str, Any]]: try: embedding = await self.embedding_func( [query], _priority=5 diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index 55cc6e06..5e4a4813 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -788,9 +788,9 @@ class PostgreSQLDB: WHERE table_name = $1 AND column_name = $2 """ params = { - "table_name": migration["table"].lower(), - "column_name": migration["column"], - } + "table_name": migration["table"].lower(), + "column_name": migration["column"], + } column_info = await self.query( check_column_sql, list(params.values()), @@ -1036,9 +1036,7 @@ class PostgreSQLDB: AND table_schema = 'public' """ params = {"table_name": table_name.lower()} - table_exists = await self.query( - check_table_sql, list(params.values()) - ) + table_exists = await self.query(check_table_sql, list(params.values())) if not table_exists: logger.info(f"Creating table {table_name}") @@ -3175,7 +3173,6 @@ class PGGraphStorage(BaseGraphStorage): return result[node_id] async def edge_degree(self, src_id: str, tgt_id: str) -> int: - result = await self.edge_degrees_batch(edges=[(src_id, tgt_id)]) if result and (src_id, tgt_id) in result: return result[(src_id, tgt_id)]