)]}'
{"nova/hacking/checks.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a2db8193606d20c3a9166ec27011c4c3bd8b42ba","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"def use_jsonutils(logical_line, filename):"},{"line_number":260,"context_line":"    if \"plugins/xenserver\" in filename:"},{"line_number":261,"context_line":"        return"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    msg \u003d \"N323: jsonutils.%(fun)s must be used instead of json.%(fun)s\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_d7ae64a0","line":260,"updated":"2014-08-11 21:14:21.000000000","message":"This could use a comment explaining why these are not checked.","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6da2ad71a983947afd664fa2a2bd34b724c87c02","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"def use_jsonutils(logical_line, filename):"},{"line_number":260,"context_line":"    if \"plugins/xenserver\" in filename:"},{"line_number":261,"context_line":"        return"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    msg \u003d \"N323: jsonutils.%(fun)s must be used instead of json.%(fun)s\""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_72e10ace","line":260,"in_reply_to":"baada198_d7ae64a0","updated":"2014-08-12 14:03:02.000000000","message":"Done","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a2db8193606d20c3a9166ec27011c4c3bd8b42ba","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    msg \u003d \"N323: jsonutils.%(fun)s must be used instead of json.%(fun)s\""},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    json_funcs \u003d [\u0027dumps\u0027, \u0027dump\u0027, \u0027loads\u0027, \u0027load\u0027]"},{"line_number":266,"context_line":"    for f in json_funcs:"},{"line_number":267,"context_line":"        pos \u003d logical_line.find(\u0027json.%s\u0027 % f)"},{"line_number":268,"context_line":"        if pos !\u003d -1:"},{"line_number":269,"context_line":"            return (pos, msg % {\u0027fun\u0027: f})"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_d70904dd","line":266,"updated":"2014-08-11 21:14:21.000000000","message":"By structuring it this way there are four checks being done on every line, most of which will not match.  It would be better to check for \u0027json.\u0027 in the line and then test further for json_funcs.","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6da2ad71a983947afd664fa2a2bd34b724c87c02","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    msg \u003d \"N323: jsonutils.%(fun)s must be used instead of json.%(fun)s\""},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    json_funcs \u003d [\u0027dumps\u0027, \u0027dump\u0027, \u0027loads\u0027, \u0027load\u0027]"},{"line_number":266,"context_line":"    for f in json_funcs:"},{"line_number":267,"context_line":"        pos \u003d logical_line.find(\u0027json.%s\u0027 % f)"},{"line_number":268,"context_line":"        if pos !\u003d -1:"},{"line_number":269,"context_line":"            return (pos, msg % {\u0027fun\u0027: f})"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_52dec610","line":266,"in_reply_to":"baada198_d70904dd","updated":"2014-08-12 14:03:02.000000000","message":"Done","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"},{"author":{"_account_id":11069,"name":"Corey Wright","email":"undefined+launchpad@pobox.com","username":"coreywright"},"change_message_id":"d5a7a8a6aa2c2b3ab5af8d0a9a05da0120050eef","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    for f in json_funcs:"},{"line_number":267,"context_line":"        pos \u003d logical_line.find(\u0027json.%s\u0027 % f)"},{"line_number":268,"context_line":"        if pos !\u003d -1:"},{"line_number":269,"context_line":"            return (pos, msg % {\u0027fun\u0027: f})"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"def factory(register):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_93bbf371","line":269,"updated":"2014-08-14 03:02:31.000000000","message":"my guess is that you made this line change (yield -\u003e return) after you had made all the changes in the nova code base because this is invalid (and produces the most unintuitive traceback within pep8 with no reference whatsoever to the source code under inspection).\n\nthis should not have been changed from a yield to a return.  pep8\u0027s \"check_logical\" method expects an iterable to be return from a logical_line check (https://github.com/jcrocholl/pep8/blob/master/pep8.py#L1355), which a yield produces, but fails when returning a tuple: \"TypeError: \u0027int\u0027 object is not iterable\".  (physical_line checks *are* expected to return a singular set.)\n\nyou can see this pattern in the existing checks (both logical and physical) within this file, checks.py.","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"},{"author":{"_account_id":11069,"name":"Corey Wright","email":"undefined+launchpad@pobox.com","username":"coreywright"},"change_message_id":"94dc7b9602b812c4d3b82e207d756a2650c5186f","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    for f in json_funcs:"},{"line_number":267,"context_line":"        pos \u003d logical_line.find(\u0027json.%s\u0027 % f)"},{"line_number":268,"context_line":"        if pos !\u003d -1:"},{"line_number":269,"context_line":"            return (pos, msg % {\u0027fun\u0027: f})"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"def factory(register):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_76f3a50a","line":269,"in_reply_to":"7ac7a964_93bbf371","updated":"2014-08-14 03:23:28.000000000","message":"bug filed as https://bugs.launchpad.net/nova/+bug/1356687 with a patch attached (which i\u0027ll submit for review myself if someone doesn\u0027t beat me to it in the next 24 hours).","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"}],"nova/tests/test_hacking.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a2db8193606d20c3a9166ec27011c4c3bd8b42ba","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.assertEqual(0, len(list(checks.no_mutable_default_args("},{"line_number":190,"context_line":"            \"defined, undefined \u003d [], {}\"))))"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def test_use_jsonutils(self):"},{"line_number":193,"context_line":"        def __get_msg(fun):"},{"line_number":194,"context_line":"            msg \u003d (\"N323: jsonutils.%(fun)s must be used instead of \""},{"line_number":195,"context_line":"                   \"json.%(fun)s\" % {\u0027fun\u0027: fun})"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_57eb34dc","line":192,"updated":"2014-08-11 21:14:21.000000000","message":"You\u0027re testing that json.\u003cmethods\u003e is caught, and the short circuit return for \"/plugins/xenserver\", but not testing that lines which don\u0027t match aren\u0027t caught.  You should add a test for a few cases that shouldn\u0027t match to make sure they don\u0027t.","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6da2ad71a983947afd664fa2a2bd34b724c87c02","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.assertEqual(0, len(list(checks.no_mutable_default_args("},{"line_number":190,"context_line":"            \"defined, undefined \u003d [], {}\"))))"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def test_use_jsonutils(self):"},{"line_number":193,"context_line":"        def __get_msg(fun):"},{"line_number":194,"context_line":"            msg \u003d (\"N323: jsonutils.%(fun)s must be used instead of \""},{"line_number":195,"context_line":"                   \"json.%(fun)s\" % {\u0027fun\u0027: fun})"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_521326b6","line":192,"in_reply_to":"baada198_57eb34dc","updated":"2014-08-12 14:03:02.000000000","message":"Done","commit_id":"2f8973ece27b6530522b66bd5e8df2f04a170143"}]}
