Skip to content

Commit

Permalink
Improve readability of dangling state check
Browse files Browse the repository at this point in the history
Ref. #410
  • Loading branch information
Alexander Senier committed Aug 24, 2020
1 parent be6644e commit cd468f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rflx/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,7 @@ def prune_dangling_states(
progress = False
states = {x for l in structure for x in (l.source, l.target) if x != FINAL}
for s in states:
if not [l for l in structure if l.source == s]:
if all(l.source != s for l in structure):
dangling.append(s)
progress = True
structure = [l for l in structure if l.target not in dangling]
Expand Down

0 comments on commit cd468f1

Please sign in to comment.