From 887388c317ae4bab933054241f808e2d657461ab Mon Sep 17 00:00:00 2001 From: zrguo Date: Mon, 3 Mar 2025 14:54:28 +0800 Subject: [PATCH] fix linting --- lightrag/lightrag.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index a76b7199..4f1ad7dc 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -952,11 +952,15 @@ class LightRAG: pipeline_status["latest_message"] = log_message pipeline_status["history_messages"].append(log_message) - def insert_custom_kg(self, custom_kg: dict[str, Any], full_doc_id: str = None) -> None: + def insert_custom_kg( + self, custom_kg: dict[str, Any], full_doc_id: str = None + ) -> None: loop = always_get_an_event_loop() loop.run_until_complete(self.ainsert_custom_kg(custom_kg, full_doc_id)) - async def ainsert_custom_kg(self, custom_kg: dict[str, Any], full_doc_id: str = None) -> None: + async def ainsert_custom_kg( + self, custom_kg: dict[str, Any], full_doc_id: str = None + ) -> None: update_storage = False try: # Insert chunks into vector storage @@ -982,7 +986,9 @@ class LightRAG: "source_id": source_id, "tokens": tokens, "chunk_order_index": chunk_order_index, - "full_doc_id": full_doc_id if full_doc_id is not None else source_id, + "full_doc_id": full_doc_id + if full_doc_id is not None + else source_id, "status": DocStatus.PROCESSED, } all_chunks_data[chunk_id] = chunk_entry