From 351c8db849d8124aac020ff592f8e9fc1ff2824d Mon Sep 17 00:00:00 2001 From: yangdx Date: Sat, 22 Feb 2025 10:18:39 +0800 Subject: [PATCH] Fix linting --- lightrag/lightrag.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index eca23d4f..67ef3aab 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -591,7 +591,7 @@ class LightRAG: if isinstance(input, str): input = [input] - # Clean input text and remove duplicates + # Clean input text and remove duplicates input = list(set(self.clean_text(doc) for doc in input)) # 1. Validate ids if provided or generate MD5 hash IDs @@ -608,10 +608,7 @@ class LightRAG: contents = {id_: doc for id_, doc in zip(ids, input)} else: # Generate contents dict of MD5 hash IDs and documents - contents = { - compute_mdhash_id(doc, prefix="doc-"): doc - for doc in input - } + contents = {compute_mdhash_id(doc, prefix="doc-"): doc for doc in input} # 2. Remove duplicate contents unique_contents = {