)]}'
{"nova/objects/resource_provider.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7f14959c0853c60a1cfcd8b07042049e229c8460","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    @db_api.api_context_manager.writer"},{"line_number":363,"context_line":"    def _delete(context, _id):"},{"line_number":364,"context_line":"        # Don\u0027t delete the resource provider if it has allocations."},{"line_number":365,"context_line":"        rp_allocations \u003d context.session.query(models.Allocation).\\"},{"line_number":366,"context_line":"                         filter(models.Allocation.resource_provider_id \u003d\u003d"},{"line_number":367,"context_line":"                         _id).count()"},{"line_number":368,"context_line":"        if rp_allocations:"},{"line_number":369,"context_line":"            raise exception.ResourceProviderInUse()"},{"line_number":370,"context_line":"        # Delete any inventory associated with the resource provider"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_63308802","line":367,"range":{"start_line":365,"start_character":0,"end_line":367,"end_character":37},"updated":"2016-09-23 10:08:15.000000000","message":"nit: You could probably wrap this without line break escapes:\n\nrp_allocations \u003d context.session.query(models.Allocation).filter(\n   models.Allocation.resource_provider_id \u003d\u003d _id).count()","commit_id":"04630e81150fcb24881384a11cf6b3f51c91d165"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"25c0eac07a70f3310b9999bd8a0763b937dcda73","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        # Don\u0027t delete the resource provider if it has allocations."},{"line_number":365,"context_line":"        rp_allocations \u003d context.session.query(models.Allocation).\\"},{"line_number":366,"context_line":"                         filter(models.Allocation.resource_provider_id \u003d\u003d"},{"line_number":367,"context_line":"                         _id).count()"},{"line_number":368,"context_line":"        if rp_allocations:"},{"line_number":369,"context_line":"            raise exception.ResourceProviderInUse()"},{"line_number":370,"context_line":"        # Delete any inventory associated with the resource provider"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_892bf393","line":367,"in_reply_to":"5a8bc5a2_63308802","updated":"2016-09-23 10:44:24.000000000","message":"+1 to that suggestion\n\nNote that both Jay and Dan tend to be fans of using \\ and since they either wrote or reviewed a lot of the code in this module that\u0027s why it is there. During conversations about that (when I resisted because ew) the thing that was considered most problematic were lines that used () for meaningless containment, opening up the chance of inadvertently creating a tuple. Not that any of that matters here, Stephen\u0027s suggestion seems right and definitely better than either the old code or the proposed change.","commit_id":"04630e81150fcb24881384a11cf6b3f51c91d165"}]}
