Skip to content

Commit 027e37d

Browse files
committed
Removed unused variable
set is never populated, so the use of it is meaningless
1 parent 8f9b67e commit 027e37d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cpm/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ def propagate(self, search_depth: int = 4) -> 'ChangePropagationTree':
176176

177177
self.start_leaf = ChangePropagationLeaf(network[self.start_index], self.dsm_impact.node_network[self.start_index])
178178
search_stack = [self.start_leaf]
179-
visited_nodes = set()
180179
end_leafs: list[ChangePropagationLeaf] = []
181180

182181
while len(search_stack) > 0:
@@ -205,7 +204,7 @@ def propagate(self, search_depth: int = 4) -> 'ChangePropagationTree':
205204

206205
cpf = ChangePropagationLeaf(network[neighbour], self.dsm_impact.node_network[neighbour], current_leaf)
207206

208-
if cpf.node.index not in visited_nodes and cpf.level <= search_depth:
207+
if cpf.level <= search_depth:
209208
search_stack.append(cpf)
210209

211210
return self

0 commit comments

Comments
 (0)