You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like typing is off somewhere.
Or did I get something wrong here? I'm not a python programmer might not know something. Also I'm not sure why no error was produced by the typechecker.
The text was updated successfully, but these errors were encountered:
If you look into state_node.py then you'll find that root.states is actually a Dict[str, StateNode], but machine assigns it directly to List[StateNode]:
It seems that I've found some inconsistency.
In
machine.py
there's a type specification:https://github.com/davidkpiano/xstate-python/blob/ad8f8979971411a14230ec375f4bd844b5c1f126/xstate/machine.py#L8-L14
You can see that
state: List[State]
. But then it is initialized like so:Which, as we can see in
state_node.py
is aDict[str, StateNode]
and not a list ofState
:https://github.com/davidkpiano/xstate-python/blob/ad8f8979971411a14230ec375f4bd844b5c1f126/xstate/state_node.py#L24
Looks like typing is off somewhere.
Or did I get something wrong here? I'm not a python programmer might not know something. Also I'm not sure why no error was produced by the typechecker.
The text was updated successfully, but these errors were encountered: