Skip to content

Apply string_type checks and Enum checks in the correct order #696

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jbrocher
Copy link

@jbrocher jbrocher commented May 1, 2025

Proposal to fix #695. See issues for details about the problems this PR solves.

I've added a test that inherit from the current Nested Enum test, and changes the set-up to use StrEnum. Running it produces a crash when resolving the initial state, and a fail test on get_transitions. The following commits fix these failures.

One more change is needed to correctly use _add_enum_state, I'll try to add a test to assert that the correct exception is raised when using the separator in an Enum Member name first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using StrEnum for states with a HierarchicalMachine induces unexpected behaviors.
1 participant