)]}'
{"horizon/tables/actions.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f8ec16f1358bfb6fe68223d55e5d0cf9c073e48f","unresolved":false,"context_lines":[{"line_number":953,"context_line":"                # escalate\u003dTrue is required to notify the caller (DeleteAction)"},{"line_number":954,"context_line":"                # of the failure. exceptions.handle() will raise a wrapped"},{"line_number":955,"context_line":"                # exception of HandledException and BatchAction will handle it."},{"line_number":956,"context_line":"                # redirect should be passed here as redirect has a priority"},{"line_number":957,"context_line":"                # over escalate argument."},{"line_number":958,"context_line":"                exceptions.handle(request, msg, escalate\u003dTrue)"},{"line_number":959,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f91af0f_ed89a774","line":956,"range":{"start_line":956,"start_character":27,"end_line":956,"end_character":43},"updated":"2018-01-10 14:12:20.000000000","message":"-\u003e should not be passed","commit_id":"d0a1274ab090db9b384ec19a15979f729fb55569"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"af9bb1bded5f43142c8258ca7babeb78745ce832","unresolved":false,"context_lines":[{"line_number":953,"context_line":"                # escalate\u003dTrue is required to notify the caller (DeleteAction)"},{"line_number":954,"context_line":"                # of the failure. exceptions.handle() will raise a wrapped"},{"line_number":955,"context_line":"                # exception of HandledException and BatchAction will handle it."},{"line_number":956,"context_line":"                # redirect should be passed here as redirect has a priority"},{"line_number":957,"context_line":"                # over escalate argument."},{"line_number":958,"context_line":"                exceptions.handle(request, msg, escalate\u003dTrue)"},{"line_number":959,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_cbabec1a","line":956,"range":{"start_line":956,"start_character":27,"end_line":956,"end_character":43},"in_reply_to":"9f91af0f_ed89a774","updated":"2018-01-14 14:22:23.000000000","message":"Done","commit_id":"d0a1274ab090db9b384ec19a15979f729fb55569"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"acf63286b4d3d5a8921671b1b42da6239673f13b","unresolved":false,"context_lines":[{"line_number":783,"context_line":"                    # NOTE(amotoki): To raise HandledException from the logic,"},{"line_number":784,"context_line":"                    # pass escalate\u003dTrue and do not pass redirect argument"},{"line_number":785,"context_line":"                    # to exceptions.handle()."},{"line_number":786,"context_line":"                    pass"},{"line_number":787,"context_line":"                else:"},{"line_number":788,"context_line":"                    # Handle the exception but silence it since we\u0027ll display"},{"line_number":789,"context_line":"                    # an aggregate error message later. Otherwise we\u0027d get"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_eb4268ab","line":786,"updated":"2018-01-23 09:50:09.000000000","message":"If you negate the condition, you don\u0027t need the \"pass\" and the \"else\" clause at all.","commit_id":"82af97da3d1b8f63e86d80985d6ebd6755e6426b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b8eada3ce2c9cab3ccafde4f4323fee0ea5bd5bc","unresolved":false,"context_lines":[{"line_number":783,"context_line":"                    # NOTE(amotoki): To raise HandledException from the logic,"},{"line_number":784,"context_line":"                    # pass escalate\u003dTrue and do not pass redirect argument"},{"line_number":785,"context_line":"                    # to exceptions.handle()."},{"line_number":786,"context_line":"                    pass"},{"line_number":787,"context_line":"                else:"},{"line_number":788,"context_line":"                    # Handle the exception but silence it since we\u0027ll display"},{"line_number":789,"context_line":"                    # an aggregate error message later. Otherwise we\u0027d get"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_9a30c9ea","line":786,"in_reply_to":"7f96bb07_eb4268ab","updated":"2018-01-23 13:46:02.000000000","message":"Done.\n\nI originally thought it is better to have the comment inside the if-clause as it clarifies the comment is related to which cases, but I agree that it is  confusing to reviewers.\n\nI merged the L.797 into here.","commit_id":"82af97da3d1b8f63e86d80985d6ebd6755e6426b"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"acf63286b4d3d5a8921671b1b42da6239673f13b","unresolved":false,"context_lines":[{"line_number":794,"context_line":"                if handled_exc:"},{"line_number":795,"context_line":"                    # If an exception is handled, the original exception object"},{"line_number":796,"context_line":"                    # is stored in ex.wrapped[1]."},{"line_number":797,"context_line":"                    ex \u003d ex.wrapped[1]"},{"line_number":798,"context_line":"                LOG.warning("},{"line_number":799,"context_line":"                    \u0027Action %(action)s Failed for %(reason)s\u0027, {"},{"line_number":800,"context_line":"                        \u0027action\u0027: action_description, \u0027reason\u0027: ex})"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_eb4908b7","line":797,"updated":"2018-01-23 09:50:09.000000000","message":"This can be moved to the common if above.","commit_id":"82af97da3d1b8f63e86d80985d6ebd6755e6426b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b8eada3ce2c9cab3ccafde4f4323fee0ea5bd5bc","unresolved":false,"context_lines":[{"line_number":794,"context_line":"                if handled_exc:"},{"line_number":795,"context_line":"                    # If an exception is handled, the original exception object"},{"line_number":796,"context_line":"                    # is stored in ex.wrapped[1]."},{"line_number":797,"context_line":"                    ex \u003d ex.wrapped[1]"},{"line_number":798,"context_line":"                LOG.warning("},{"line_number":799,"context_line":"                    \u0027Action %(action)s Failed for %(reason)s\u0027, {"},{"line_number":800,"context_line":"                        \u0027action\u0027: action_description, \u0027reason\u0027: ex})"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_90a3cbb1","line":797,"in_reply_to":"7f96bb07_eb4908b7","updated":"2018-01-23 13:46:02.000000000","message":"Done","commit_id":"82af97da3d1b8f63e86d80985d6ebd6755e6426b"}],"horizon/test/unit/tables/test_tables.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"acf63286b4d3d5a8921671b1b42da6239673f13b","unresolved":false,"context_lines":[{"line_number":1672,"context_line":"        myexc \u003d MyException()"},{"line_number":1673,"context_line":"        handled \u003d exceptions.HandledException(myexc)"},{"line_number":1674,"context_line":"        with mock.patch.object(self.action, \u0027_to_be_mocked\u0027,"},{"line_number":1675,"context_line":"                               side_effect\u003dmyexc), \\"},{"line_number":1676,"context_line":"                mock.patch.object(exceptions, \u0027handle\u0027,"},{"line_number":1677,"context_line":"                                  side_effect\u003dhandled) as mocked_handle:"},{"line_number":1678,"context_line":"            self.assertRaises(exceptions.HandledException,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_8b4ba485","line":1675,"updated":"2018-01-23 09:50:09.000000000","message":"Can you format it better? For example:\n\n    with mock.patch.object(\n        self.action,\n        \u0027_to_be_mocked\u0027,\n        side_effect\u003dmyexc,\n    ), mock.patch.object(\n        exceptions,\n        \u0027handle\u0027,\n        side_effect\u003dhandled,\n    ) as mocked_handle:","commit_id":"82af97da3d1b8f63e86d80985d6ebd6755e6426b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b8eada3ce2c9cab3ccafde4f4323fee0ea5bd5bc","unresolved":false,"context_lines":[{"line_number":1672,"context_line":"        myexc \u003d MyException()"},{"line_number":1673,"context_line":"        handled \u003d exceptions.HandledException(myexc)"},{"line_number":1674,"context_line":"        with mock.patch.object(self.action, \u0027_to_be_mocked\u0027,"},{"line_number":1675,"context_line":"                               side_effect\u003dmyexc), \\"},{"line_number":1676,"context_line":"                mock.patch.object(exceptions, \u0027handle\u0027,"},{"line_number":1677,"context_line":"                                  side_effect\u003dhandled) as mocked_handle:"},{"line_number":1678,"context_line":"            self.assertRaises(exceptions.HandledException,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f96bb07_9adf69d5","line":1675,"in_reply_to":"7f96bb07_8b4ba485","updated":"2018-01-23 13:46:02.000000000","message":"I chose the current version from two reasons:\n\nThe once is because your  solution violates \"E124 closing bracket does not match visual indentation\".\n\nThe second is when the first mock.patch uses \"as xxxx\", your version will be:\n\n  with mock.patch.object(\n       self.action,\n       \u0027_to_be_mocked\u0027,\n       side_effect\u003dmyexc,\n  ) as xxxxx, mock.patch.object(\n       ....\n\nI think having \") as xxxx\" and \"mock.patch.object(\" in the same line is not easy to read.\n\nFrom the above, I chose a backslash to wrap lines.","commit_id":"82af97da3d1b8f63e86d80985d6ebd6755e6426b"}]}
