mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-14 00:15:53 +00:00
Fix linting
This commit is contained in:
parent
eb2320e556
commit
44204abef7
@ -1229,6 +1229,7 @@ class LightRAG:
|
|||||||
async with semaphore:
|
async with semaphore:
|
||||||
nonlocal processed_count
|
nonlocal processed_count
|
||||||
current_file_number = 0
|
current_file_number = 0
|
||||||
|
# Initialize to prevent UnboundLocalError in error handling
|
||||||
first_stage_tasks = []
|
first_stage_tasks = []
|
||||||
entity_relation_task = None
|
entity_relation_task = None
|
||||||
try:
|
try:
|
||||||
@ -1352,9 +1353,7 @@ class LightRAG:
|
|||||||
|
|
||||||
# Cancel tasks that are not yet completed
|
# Cancel tasks that are not yet completed
|
||||||
all_tasks = first_stage_tasks + (
|
all_tasks = first_stage_tasks + (
|
||||||
[entity_relation_task]
|
[entity_relation_task] if entity_relation_task else []
|
||||||
if entity_relation_task
|
|
||||||
else []
|
|
||||||
)
|
)
|
||||||
for task in all_tasks:
|
for task in all_tasks:
|
||||||
if task and not task.done():
|
if task and not task.done():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user