pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.68k stars 530 forks source link

Return all nested transitions #479

Closed thedrow closed 3 years ago

thedrow commented 3 years ago

Unless I'm missing something, the return statement is incorrectly indented. If that's not the case, then the while loop is redundant and can be removed.

We should add a test to verify that this issue does not regress.

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 97.161% when pulling a67196f3e6a31f78d2e5a29f63759c50285229e2 on thedrow:patch-2 into a7e1e7389aa6cf2f51d27103774d7e4a4a4e05ef on pytransitions:master.

aleneum commented 3 years ago

Hi @thedrow,

this indeed looks weird. It can be simplified even further (see ea4ed0e). I also followed your recommendation and added tests for that method.

aleneum commented 3 years ago

Closing this since it has been resolved by ea4ed0e. Thank you for reporting, @thedrow!