-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
States lost when Subclassing a statemachine class with states #211
Comments
rschrader
pushed a commit
to rschrader/python-statemachine
that referenced
this issue
Oct 19, 2019
When defining states and transitions in a base class, they are not detected by the sub class. Therefore The StateMachinMetaClass is extended to also take care of the states and transitions of the base classes Issue: fgmacedo#211
rschrader
pushed a commit
to rschrader/python-statemachine
that referenced
this issue
Oct 19, 2019
When defining states and transitions in a base class, they are not detected by the sub class. Therefore The StateMachinMetaClass is extended to also take care of the states and transitions of the base classes Issue: fgmacedo#211
rschrader
pushed a commit
to rschrader/python-statemachine
that referenced
this issue
Oct 19, 2019
When defining states and transitions in a base class, they are not detected by the sub class. Therefore The StateMachinMetaClass is extended to also take care of the states and transitions of the base classes Issue: fgmacedo#211
fgmacedo
added a commit
that referenced
this issue
Jan 23, 2020
* Support inheritance for Statemachine classes When defining states and transitions in a base class, they are not detected by the sub class. Therefore The StateMachinMetaClass is extended to also take care of the states and transitions of the base classes Issue: #211 * chore(inheritance) Add basic inheritance support. Closes #247 Co-authored-by: rschrader-kostal <58595523+rschrader-kostal@users.noreply.github.com>
@joshuacc1 Thanks for your report and sorry for the late reply. This was fixed on #253. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
Say we have a statemachine class and we subclass it:
The code above would result in an error:
"statemachine.exceptions.InvalidDefinition: There are no states". Now the attributes in ExtTrafficLightMachine contain the three states and transitions, but some how the subclass initialization fails to varify it.
What I Did
Workaround:
The text was updated successfully, but these errors were encountered: