)]}'
{"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"682db7ff4c534d656f40f2083dd945ec791512f9","unresolved":false,"context_lines":[{"line_number":2789,"context_line":""},{"line_number":2790,"context_line":"    def __repr__(self):"},{"line_number":2791,"context_line":"        anchor \u003d (self.obj_attr_is_set(\u0027anchor_root_provider_uuid\u0027) and"},{"line_number":2792,"context_line":"                  getattr(self, \u0027anchor_root_provider_uuid\u0027, None))"},{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_0e715644","line":2792,"updated":"2018-05-15 23:06:28.000000000","message":"You can use some nicer code with objects, like:\n\n anchor \u003d \u0027anchor_root_provider_uuid\u0027 in self and self.anchor_root_provider_uuid\n\nI don\u0027t think you need to do getattr and default to None because if anchor_root_provider_uuid wasn\u0027t set, you wouldn\u0027t reach the second statement.","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f9a92851728c7c892dda6e517e27e267435fd2c1","unresolved":false,"context_lines":[{"line_number":2789,"context_line":""},{"line_number":2790,"context_line":"    def __repr__(self):"},{"line_number":2791,"context_line":"        anchor \u003d (self.obj_attr_is_set(\u0027anchor_root_provider_uuid\u0027) and"},{"line_number":2792,"context_line":"                  getattr(self, \u0027anchor_root_provider_uuid\u0027, None))"},{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_a8fb6c44","line":2792,"in_reply_to":"5f7c97a3_0e715644","updated":"2018-05-16 15:14:14.000000000","message":"I was (more or less) copy/pasting from VersionedObject itself.  I don\u0027t understand all the magic methods that would make \u0027in\u0027 work, and assume there\u0027s some reason VersionedObject didn\u0027t do it that way - though that reason may be moot here.  I can play around with it some more.\n\nBut pretty sure you\u0027re at least right about the default.\n\n[Later] Okay, \u0027in\u0027 works just fine, and the default was in totally the wrong place (and was actually causing a bug in the message).  Thanks Mel.","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1591ea376ba7ed62c5c9c9842d69445429f3c3f7","unresolved":false,"context_lines":[{"line_number":2789,"context_line":""},{"line_number":2790,"context_line":"    def __repr__(self):"},{"line_number":2791,"context_line":"        anchor \u003d (self.obj_attr_is_set(\u0027anchor_root_provider_uuid\u0027) and"},{"line_number":2792,"context_line":"                  getattr(self, \u0027anchor_root_provider_uuid\u0027, None))"},{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_9c059216","line":2792,"in_reply_to":"5f7c97a3_9c191223","updated":"2018-05-16 15:46:26.000000000","message":"Ah, nice, so it\u0027s equivalent to obj_attr_is_set anyway.  I feel good about that.","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"7afda3a0c26f36f588594a97716dc550cd1113c0","unresolved":false,"context_lines":[{"line_number":2789,"context_line":""},{"line_number":2790,"context_line":"    def __repr__(self):"},{"line_number":2791,"context_line":"        anchor \u003d (self.obj_attr_is_set(\u0027anchor_root_provider_uuid\u0027) and"},{"line_number":2792,"context_line":"                  getattr(self, \u0027anchor_root_provider_uuid\u0027, None))"},{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_9c191223","line":2792,"in_reply_to":"5f7c97a3_a8fb6c44","updated":"2018-05-16 15:34:36.000000000","message":"This is what makes \u0027in\u0027 work [1]. The __contains__ method was added later on, so I think that\u0027s why a lot (maybe most) of the code in VersionedObject doesn\u0027t use it as it was written before __contains__ was there.\n\n[1] https://github.com/openstack/oslo.versionedobjects/blob/337cd36/oslo_versionedobjects/base.py#L321","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"682db7ff4c534d656f40f2083dd945ec791512f9","unresolved":false,"context_lines":[{"line_number":2791,"context_line":"        anchor \u003d (self.obj_attr_is_set(\u0027anchor_root_provider_uuid\u0027) and"},{"line_number":2792,"context_line":"                  getattr(self, \u0027anchor_root_provider_uuid\u0027, None))"},{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"},{"line_number":2796,"context_line":"        repr_str \u003d (\u0027%s(anchor\u003d...%s, same_provider\u003d%s, \u0027"},{"line_number":2797,"context_line":"                    \u0027resource_requests\u003d[%s])\u0027 %"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_cebd9eb7","line":2794,"updated":"2018-05-15 23:06:28.000000000","message":"\u0027use_same_provider\u0027 in self","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"682db7ff4c534d656f40f2083dd945ec791512f9","unresolved":false,"context_lines":[{"line_number":2792,"context_line":"                  getattr(self, \u0027anchor_root_provider_uuid\u0027, None))"},{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"},{"line_number":2796,"context_line":"        repr_str \u003d (\u0027%s(anchor\u003d...%s, same_provider\u003d%s, \u0027"},{"line_number":2797,"context_line":"                    \u0027resource_requests\u003d[%s])\u0027 %"},{"line_number":2798,"context_line":"                    (self.obj_name(), anchor, usp,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_8e01e66c","line":2795,"range":{"start_line":2795,"start_character":50,"end_line":2795,"end_character":55},"updated":"2018-05-15 23:06:28.000000000","message":"Again I don\u0027t think you\u0027d ever use this because if you passed the first statement (\u0027use_same_provider\u0027 in self), you would have an attr to get and wouldn\u0027t fall back on the default. So maybe similar:\n\n usp \u003d \u0027use_same_provider\u0027 in self and self.use_same_provider","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"dd41d6a8cd2892842d8dba13c665d09aaa5ae08c","unresolved":false,"context_lines":[{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"},{"line_number":2796,"context_line":"        repr_str \u003d (\u0027%s(anchor\u003d...%s, same_provider\u003d%s, \u0027"},{"line_number":2797,"context_line":"                    \u0027resource_requests\u003d[%s])\u0027 %"},{"line_number":2798,"context_line":"                    (self.obj_name(), anchor, usp,"},{"line_number":2799,"context_line":"                     \u0027, \u0027.join([str(arr) for arr in self.resource_requests])))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_6e0d6ae6","line":2796,"range":{"start_line":2796,"start_character":31,"end_line":2796,"end_character":36},"updated":"2018-05-15 22:43:55.000000000","message":"nit: you\u0027re showing the first 8 chars of the UUID, not the last 8, so this should be %s...","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f9a92851728c7c892dda6e517e27e267435fd2c1","unresolved":false,"context_lines":[{"line_number":2793,"context_line":"        anchor \u003d anchor[:8] if anchor else \u0027\u003c?\u003e\u0027"},{"line_number":2794,"context_line":"        usp \u003d (self.obj_attr_is_set(\u0027use_same_provider\u0027) and"},{"line_number":2795,"context_line":"               getattr(self, \u0027use_same_provider\u0027, \u0027\u003c?\u003e\u0027))"},{"line_number":2796,"context_line":"        repr_str \u003d (\u0027%s(anchor\u003d...%s, same_provider\u003d%s, \u0027"},{"line_number":2797,"context_line":"                    \u0027resource_requests\u003d[%s])\u0027 %"},{"line_number":2798,"context_line":"                    (self.obj_name(), anchor, usp,"},{"line_number":2799,"context_line":"                     \u0027, \u0027.join([str(arr) for arr in self.resource_requests])))"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_e8dc04e5","line":2796,"range":{"start_line":2796,"start_character":31,"end_line":2796,"end_character":36},"in_reply_to":"5f7c97a3_6e0d6ae6","updated":"2018-05-16 15:14:14.000000000","message":"Whoops, I actually *meant* to show the last 8, brain fart.","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"682db7ff4c534d656f40f2083dd945ec791512f9","unresolved":false,"context_lines":[{"line_number":3879,"context_line":"              \u0027group_policy\u003disolate and the number of granular groups in the \u0027"},{"line_number":3880,"context_line":"              \u0027set (%d) does not match the number of granular groups in the \u0027"},{"line_number":3881,"context_line":"              \u0027request (%d): %s\u0027,"},{"line_number":3882,"context_line":"              num_granular_groups_in_areqs, num_granular_groups, str(areqs))"},{"line_number":3883,"context_line":"    return False"},{"line_number":3884,"context_line":""},{"line_number":3885,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_4ef74e8c","line":3882,"range":{"start_line":3882,"start_character":65,"end_line":3882,"end_character":68},"updated":"2018-05-15 23:06:28.000000000","message":"I doubt you need this because of the %s ... but I could be wrong.","commit_id":"7e05576f0e636cb557d4453f6174643ee8506431"}]}
