Start and Initialization the states containg list of OrderedDict in init method gives error. #602
Unanswered
msdian-hub
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In a class ABCD inside the init method I have variable state consisting of OrderedDict containing list of dictionaries. Basically the state is of module 'transitions' which are imported from class 'machine' and inside state I have orderedDict consisting of list of dictionaries.
class ABCD(Machine)
def init(self,args):
self.a=opts['a']
self.a=opts['b']
self.states=orderedDict([{'name':'start'},{'name':'connection','on_enter':'go'}])
Error:
Argument of type "list[dict[str, str]]" cannot be assigned to parameter "__iterable" of type "Iterable[list[str]]" in function "init"
Is the orderedDict not allowed inside init method. How can I deal with that?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions