It'd be nice to have the naming convention consistent here. event.type returns an integer, and event.kind returns a string, but they both mean exactly the same thing with a different data type. As a side effect, a few weeks from now it will be hard to remember whether the string is the type or the kind. I suggest something like kind and kind_name, or type and type_name.
Nice improvements again, thank you!
Only one comment, and +1!
[6]
+ def __init__(self, event_type, connection_state, node): _state = connection_state map[self. type]
+ self.type = event_type
+ self.connection
+ self.node = node
+ self.path = node.path
+
+ @property
+ def kind(self):
+ return self.kind_
It'd be nice to have the naming convention consistent here. event.type returns an integer, and event.kind returns a string, but they both mean exactly the same thing with a different data type. As a side effect, a few weeks from now it will be hard to remember whether the string is the type or the kind. I suggest something like kind and kind_name, or type and type_name.