)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"503590276c9a345ef171a23141d5effdb4996bf4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Removed unnecessary parantheses in return statements"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some place in Nova, return value has unnecessary parentheses,"},{"line_number":10,"context_line":"return used like a function that has the return  value as a parameter."},{"line_number":11,"context_line":"Even in simple return statements, like:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"    return(1)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"fa6399be_9b230158","line":10,"updated":"2016-10-20 13:43:42.000000000","message":"It\u0027s not using return \"like a function\"; and if we\u0027re just checking the space, then please make it clearer in the commit message that\u0027s what we\u0027re now doing.","commit_id":"d13981d008a91e6ba7381fdfbab64013dd3d70f3"}],"HACKING.rst":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"d5e2bd3578bfa0e5ffd7fe4c4a80ee59c311dd42","unresolved":false,"context_lines":[{"line_number":64,"context_line":"- [N351] Do not use the oslo_policy.policy.Enforcer.enforce() method."},{"line_number":65,"context_line":"- [N352] LOG.warn is deprecated. Enforce use of LOG.warning."},{"line_number":66,"context_line":"- [N353] Validate that context objects is not passed in logging calls."},{"line_number":67,"context_line":"- [N354] Do not use return as a function."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Creating Unit Tests"},{"line_number":70,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a95cdbc_1025b15a","line":67,"updated":"2016-10-10 13:32:37.000000000","message":"Is this actually using return as a function?  Note that a\u003d(1) is identical to a\u003d1 - but clearly there is no function call there.\nThe parenthesis are just ignored in both cases.","commit_id":"2e886e2eba8472fd73b5d7e678fcd51487f2ff48"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"503590276c9a345ef171a23141d5effdb4996bf4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"- [N354] String interpolation should be delayed at logging calls."},{"line_number":68,"context_line":"- [N355] Enforce use of assertTrue/assertFalse"},{"line_number":69,"context_line":"- [N356] Enforce use of assertIs/assertIsNot"},{"line_number":70,"context_line":"- [N357] Do not use return as a function."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Creating Unit Tests"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa6399be_5b06c9ce","line":70,"updated":"2016-10-20 13:43:42.000000000","message":"\"Return must always be followed by a space\"","commit_id":"d13981d008a91e6ba7381fdfbab64013dd3d70f3"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"2a2a3981cb3b19e23891cadd880ee8da7568a198","unresolved":false,"context_lines":[{"line_number":69,"context_line":"- [N356] Enforce use of assertIs/assertIsNot"},{"line_number":70,"context_line":"- [N357] Use oslo_utils.uuidutils or uuidsentinel(in case of test cases) to"},{"line_number":71,"context_line":"  generate UUID instead of uuid4()."},{"line_number":72,"context_line":"- [N358] Return must always be followed by a space."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Creating Unit Tests"},{"line_number":75,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"ba5201f7_a46be8b5","line":72,"updated":"2017-01-06 17:07:58.000000000","message":"Not correct; a bare return is fine. Perhaps add \u0027...when returning a value.\u0027 ?","commit_id":"04f03970a84097d089d123de2a3dd5d12419cf21"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"84b670ea2c78f51156d93b1129530a95d628c425","unresolved":false,"context_lines":[{"line_number":69,"context_line":"- [N356] Enforce use of assertIs/assertIsNot"},{"line_number":70,"context_line":"- [N357] Use oslo_utils.uuidutils or uuidsentinel(in case of test cases) to"},{"line_number":71,"context_line":"  generate UUID instead of uuid4()."},{"line_number":72,"context_line":"- [N358] Return must always be followed by a space."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Creating Unit Tests"},{"line_number":75,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"ba5201f7_217171e1","line":72,"in_reply_to":"ba5201f7_a46be8b5","updated":"2017-01-09 14:56:43.000000000","message":"That is a nice idea. Thanks. I added.","commit_id":"04f03970a84097d089d123de2a3dd5d12419cf21"}],"nova/hacking/checks.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4f5d92f0d66f4bcd37c2a70699f6c6894214bc5a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":109,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":110,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":111,"context_line":"return_as_function \u003d re.compile(r\".*\\breturn\\(.*\\)\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_a0b9737b","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":52},"updated":"2016-10-13 13:10:07.000000000","message":"This isn\u0027t going to work. For example:\n\n    return(1, )\n    return (1, )\n    return(1, 2, 3)\n    return (1, 2, 3)\n    return (\n        \u0027hello\u0027,\n        \u0027world\u0027\n    )\n\nWe probably want to avoid the following too, not that I see it anywhere:\n\n    return (\n       1\n    )","commit_id":"5f2c42024026049aec80bbb884b3acd3478610d1"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"503590276c9a345ef171a23141d5effdb4996bf4","unresolved":false,"context_lines":[{"line_number":108,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":109,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":110,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":111,"context_line":"return_not_followed_by_space \u003d re.compile(r\".*\\breturn\\(.*\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_7bd62d50","line":111,"updated":"2016-10-20 13:43:42.000000000","message":"The regexp doesn\u0027t match the name.\nIt should be r\".*\\breturn .*\" - otherwise return[1] or return{\u0027a\u0027:1} would be permitted, which look equally bad.\n\nThe not-followed-by-space has nothing to do with parenthesis.","commit_id":"d13981d008a91e6ba7381fdfbab64013dd3d70f3"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"920470a6452e48cce08f5247b904f608cd821d29","unresolved":false,"context_lines":[{"line_number":108,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":109,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":110,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":111,"context_line":"return_not_followed_by_space \u003d re.compile(r\".*\\breturn\\(.*\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_a1b33299","line":111,"in_reply_to":"fa6399be_7bd62d50","updated":"2016-10-20 14:41:29.000000000","message":"Yeah, thanks for noticing that. However, you regex still not\ngood as it matches to the lines that are good. \nBut \"reversing\" it, like r\u0027.*return[^ ].*\u0027 are also not good,\nas the comments may contain \"returns with an int\", or\n\":returns: port number\". Also, the following one also should \nwork:\n\n    r\u0027^.*return(?:\\(|{).*$\u0027 \n\nMaybe this simple one would be good?","commit_id":"d13981d008a91e6ba7381fdfbab64013dd3d70f3"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"76be86a745f09800ce1ab7d7075c7742d9ac8b7f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":109,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":110,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":111,"context_line":"return_not_followed_by_space \u003d re.compile(r\".*\\breturn\\(.*\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_47efc686","line":111,"in_reply_to":"fa6399be_a1b33299","updated":"2016-10-20 15:29:32.000000000","message":"What about \" or \u0027?  https://docs.python.org/2/reference/lexical_analysis.html also suggests we should think about other characters like #","commit_id":"d13981d008a91e6ba7381fdfbab64013dd3d70f3"},{"author":{"_account_id":5044,"name":"Mate Lakat","email":"mlakat@suse.com","username":"mate-lakat"},"change_message_id":"7068f34eca167668418d9e64ba0271815cfc577e","unresolved":false,"context_lines":[{"line_number":870,"context_line":"    N357"},{"line_number":871,"context_line":"    \"\"\""},{"line_number":872,"context_line":"    if return_not_followed_by_space.match(logical_line):"},{"line_number":873,"context_line":"        yield(0,"},{"line_number":874,"context_line":"              \"N357: Return keyword should be followed by a space.\")"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da6895a0_e28ba11c","line":873,"range":{"start_line":873,"start_character":13,"end_line":873,"end_character":15},"updated":"2016-10-25 05:17:10.000000000","message":"don\u0027t you need a space after yield?","commit_id":"8576e041a52bfe505c2439458452a4146468903f"},{"author":{"_account_id":18602,"name":"Gábor Antal","email":"antal@inf.u-szeged.hu","username":"antal"},"change_message_id":"1f658818bed6cd7aaf1b3c01cb95fe6dcc5b238b","unresolved":false,"context_lines":[{"line_number":870,"context_line":"    N357"},{"line_number":871,"context_line":"    \"\"\""},{"line_number":872,"context_line":"    if return_not_followed_by_space.match(logical_line):"},{"line_number":873,"context_line":"        yield(0,"},{"line_number":874,"context_line":"              \"N357: Return keyword should be followed by a space.\")"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da6895a0_31cec45a","line":873,"range":{"start_line":873,"start_character":13,"end_line":873,"end_character":15},"in_reply_to":"da6895a0_bd9b8cc8","updated":"2016-10-25 10:37:56.000000000","message":"Great, thanks for the suggestion. I don\u0027t know how can i did that thing.","commit_id":"8576e041a52bfe505c2439458452a4146468903f"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"c7ae380ad1c265e4e12930ae914edbd06d0e91af","unresolved":false,"context_lines":[{"line_number":870,"context_line":"    N357"},{"line_number":871,"context_line":"    \"\"\""},{"line_number":872,"context_line":"    if return_not_followed_by_space.match(logical_line):"},{"line_number":873,"context_line":"        yield(0,"},{"line_number":874,"context_line":"              \"N357: Return keyword should be followed by a space.\")"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da6895a0_bd9b8cc8","line":873,"range":{"start_line":873,"start_character":13,"end_line":873,"end_character":15},"in_reply_to":"da6895a0_e28ba11c","updated":"2016-10-25 06:22:15.000000000","message":"I agree with Mate, it\u0027d look much better with a space, especially considering what this change is doing in the first place.","commit_id":"8576e041a52bfe505c2439458452a4146468903f"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"b5ca2bebf920c3dcf6133dbcb778c6145cb12531","unresolved":false,"context_lines":[{"line_number":108,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":109,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":110,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":111,"context_line":"return_not_followed_by_space \u003d re.compile(r\"^\\s*return(?:\\(|{|\\\"|\u0027|#).*$\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5da102_e4513f10","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":74},"updated":"2016-10-26 14:53:42.000000000","message":"What about catching also something like:\n\n  return[1,2,3]\n\n?\n\nAlso, this regexp could be reversed for ensuring, that there is either a space after return keyword, or space + backslash, or finally there are two spaces after a keyword and hash sign, since comment should be preceded by exactly two spaces according to pep8.","commit_id":"d91e2fa4cb3b7157bd391c8153e5f1b2a68107b9"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"5bdfd0a2c0acdd071477e002ebde03aa2f2def69","unresolved":false,"context_lines":[{"line_number":108,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":109,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":110,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":111,"context_line":"return_not_followed_by_space \u003d re.compile(r\"^\\s*return(?:\\(|{|\\\"|\u0027|#).*$\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_9e239755","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":74},"updated":"2017-01-18 06:51:37.000000000","message":"Given the fact, that you stated the \"Return must always be followed by a space when returning a value\" this regexp will fail in catching list values like:\n\n  return[1,2,3]\n\nAlthough I didn\u0027t seen it in nova codebase, I think it should also be catch for complying the statement.","commit_id":"28c72b1e1098a0cbd529ef2d4713bc0db80ee1b6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"51c116d58ed8b2b20848f1b14ae863b4f13a4879","unresolved":false,"context_lines":[{"line_number":108,"context_line":"log_string_interpolation \u003d re.compile(r\".*LOG\\.(error|warning|info\""},{"line_number":109,"context_line":"                                      r\"|critical|exception|debug)\""},{"line_number":110,"context_line":"                                      r\"\\([^,]*%[^,]*[,)]\")"},{"line_number":111,"context_line":"return_not_followed_by_space \u003d re.compile(r\"^\\s*return(?:\\(|{|\\\"|\u0027|#).*$\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class BaseASTChecker(ast.NodeVisitor):"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a430d35_28440448","line":111,"range":{"start_line":111,"start_character":0,"end_line":111,"end_character":74},"in_reply_to":"7a3c09a3_9e239755","updated":"2017-02-09 12:15:00.000000000","message":"That seems like a good addition, lets do that in a follow up patch?","commit_id":"28c72b1e1098a0cbd529ef2d4713bc0db80ee1b6"}],"nova/tests/unit/matchers.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"d5e2bd3578bfa0e5ffd7fe4c4a80ee59c311dd42","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        if self.keys:"},{"line_number":168,"context_line":"            return \"Keys between dictionaries did not match\""},{"line_number":169,"context_line":"        else:"},{"line_number":170,"context_line":"            return (\"Dictionaries do not match at %s. d1: %s d2: %s\""},{"line_number":171,"context_line":"                    % (self.key,"},{"line_number":172,"context_line":"                       self.super_value,"},{"line_number":173,"context_line":"                       self.sub_value))"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_108211c8","line":170,"updated":"2016-10-10 13:32:37.000000000","message":"Having spaces here doesn\u0027t change the Python syntax -\n\"min (1, 3)\" is still a function call.\n\nIsn\u0027t there a better way to split the line?\nI\u0027d argue that, if there isn\u0027t, returning a 1-tuple here is also a bit weird.","commit_id":"2e886e2eba8472fd73b5d7e678fcd51487f2ff48"}]}
