yangdx commited on
Commit
fc3090e
·
1 Parent(s): 6b82001

Fix linting

Browse files
Files changed (1) hide show
  1. lightrag/kg/networkx_impl.py +3 -1
lightrag/kg/networkx_impl.py CHANGED
@@ -316,7 +316,9 @@ class NetworkXStorage(BaseGraphStorage):
316
  if depth < max_depth:
317
  # Add neighbor nodes to queue with incremented depth
318
  neighbors = list(graph.neighbors(current))
319
- queue.extend([(n, depth + 1) for n in neighbors if n not in visited])
 
 
320
 
321
  # Check if graph is truncated - if we still have nodes in the queue
322
  # and we've reached max_nodes, then the graph is truncated
 
316
  if depth < max_depth:
317
  # Add neighbor nodes to queue with incremented depth
318
  neighbors = list(graph.neighbors(current))
319
+ queue.extend(
320
+ [(n, depth + 1) for n in neighbors if n not in visited]
321
+ )
322
 
323
  # Check if graph is truncated - if we still have nodes in the queue
324
  # and we've reached max_nodes, then the graph is truncated