File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,9 @@ def has_cycle(self):
226
226
break
227
227
else :
228
228
return True
229
- anticipating_nodes .add (stack [len_stack_minus_one ])
229
+ # TODO:The following code is unreachable.
230
+ anticipating_nodes .add (
231
+ stack [len_stack_minus_one ])
230
232
len_stack_minus_one -= 1
231
233
if visited .count (node [1 ]) < 1 :
232
234
stack .append (node [1 ])
@@ -453,7 +455,10 @@ def has_cycle(self):
453
455
break
454
456
else :
455
457
return True
456
- anticipating_nodes .add (stack [len_stack_minus_one ])
458
+ # TODO: the following code is unreachable
459
+ # is this meant to be called in the else ?
460
+ anticipating_nodes .add (
461
+ stack [len_stack_minus_one ])
457
462
len_stack_minus_one -= 1
458
463
if visited .count (node [1 ]) < 1 :
459
464
stack .append (node [1 ])
You can’t perform that action at this time.
0 commit comments