We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Allows to add tags to a state and test for tags with state.is_<tag_name>. See: states.py
state.is_<tag_name>
tags
from transitions import Machine from transitions.extensions.states import add_state_features, Tags @add_state_features(Tags) class CustomMachine(Machine): pass states = [{"name": "A", "tags": ["initial", "success", "error_state"]}] m = CustomMachine(states=states, initial='A') s = m.get_state(m.state) print(s.is_initial) # >>> True print(s.is_success) # >>> True print(s.is_error_state) # >>> True print(s.is_not_available) # >>> False
The text was updated successfully, but these errors were encountered:
aleneum
No branches or pull requests
Allows to add tags to a state and test for tags with
state.is_<tag_name>
. See: states.pyKeywords
tags
(list, optional) -- assigns tags to a stateExample Usage
The text was updated successfully, but these errors were encountered: