)]}'
{"nova/api/openstack/placement/lib.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a31d0f0a7d385379c78b2dac0d9d9ae9ff60ae8d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.required_traits \u003d required_traits or set()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __eq__(self, other):"},{"line_number":37,"context_line":"        return vars(self) \u003d\u003d vars(other)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_358053f7","line":37,"range":{"start_line":37,"start_character":29,"end_line":37,"end_character":40},"updated":"2017-11-03 09:08:08.000000000","message":"This will raise TypeError if \u0027other\u0027 does not have __dict__ attribute. I would say the following to avoid that\n\nif isinstance(other, RequestGroup):\n    return vars(self) \u003d\u003d vars(other)\nelse:\n    return False\n\nThis also shows the need of a small set of unit tests for the __eq__ method\n\n\nAdditionally __ne__ might need to be defined if we ever want to say !\u003d for RequestGroups to keep the equality symmetric: \n\u003e\u003e\u003e empty \u003d p_lib.RequestGroup()\n\u003e\u003e\u003e other_empty \u003d p_lib.RequestGroup()\n\u003e\u003e\u003e empty \u003d\u003d empty\nTrue\n\u003e\u003e\u003e empty !\u003d empty\nFalse\n\u003e\u003e\u003e empty \u003d\u003d other_empty\nTrue\n\u003e\u003e\u003e empty !\u003d other_empty\nTrue\n\u003e\u003e\u003e","commit_id":"202a0b77b907919c3d8a7c39dff4583f188edab3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"728e6929bfc0fdd8845ee24d4cc14ddd9a4fd478","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.required_traits \u003d required_traits or set()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __eq__(self, other):"},{"line_number":37,"context_line":"        return vars(self) \u003d\u003d vars(other)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_4e42206a","line":37,"range":{"start_line":37,"start_character":29,"end_line":37,"end_character":40},"in_reply_to":"3f4b6375_358053f7","updated":"2017-11-03 11:53:38.000000000","message":"I actually only have this in here to make unit testing easier.  But you\u0027re right; it should either be complete, or relegated entirely to the test code.","commit_id":"202a0b77b907919c3d8a7c39dff4583f188edab3"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c0ec70283d8a7b4dd6d8a89cab333694b10c6e99","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.required_traits \u003d required_traits or set()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def __eq__(self, other):"},{"line_number":37,"context_line":"        return vars(self) \u003d\u003d vars(other)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4b6375_69303657","line":37,"range":{"start_line":37,"start_character":29,"end_line":37,"end_character":40},"in_reply_to":"3f4b6375_4e42206a","updated":"2017-11-03 12:33:11.000000000","message":"Done (the latter)","commit_id":"202a0b77b907919c3d8a7c39dff4583f188edab3"}]}
