)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"`file` was not defined in case of duplicate modules. The error was not"},{"line_number":10,"context_line":"reported by upstream pep8 due to `file` being a builtin in py2."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: If35c86efcc1a13d2441afaa1edce2578df6279a8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da20952f_aeff7464","line":11,"updated":"2015-09-01 13:33:50.000000000","message":"Commit message should reference a bug.","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"}],"bandit/core/test_set.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                            self.tests[check][fn_name])"},{"line_number":131,"context_line":"                        self.logger.error("},{"line_number":132,"context_line":"                            \"Duplicate function definition \""},{"line_number":133,"context_line":"                            \"%s in %s and %s\", fn_name, path1, path2"},{"line_number":134,"context_line":"                            )"},{"line_number":135,"context_line":"                        sys.exit(2)"},{"line_number":136,"context_line":"                    else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_0ee460a9","line":133,"updated":"2015-09-01 13:33:50.000000000","message":"path1 and path2 might be None because get_path_for_function() can return None and then this error message is going to be confusing since it\u0027ll just say \"in None and None\". Could replace None for path1 and path2 with \"(no module given)\" or something.","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"}],"bandit/core/utils.py":[{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"065c7f2433fd8982ef989f0fb84ef6f3238fb5ce","unresolved":false,"context_lines":[{"line_number":367,"context_line":"    if hasattr(f, \"__module__\"):"},{"line_number":368,"context_line":"        module_name \u003d f.__module__"},{"line_number":369,"context_line":"    elif hasattr(f, \"im_func\"):"},{"line_number":370,"context_line":"        module_name \u003d f.im_func.__module__"},{"line_number":371,"context_line":"    else:"},{"line_number":372,"context_line":"        return None"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_c268fd89","line":370,"updated":"2015-08-19 14:19:31.000000000","message":"do we need a try here?","commit_id":"9ed3caf763f14d9046e9fb9ae8c4363cdacb8620"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":369,"context_line":"            module_name \u003d f.__module__"},{"line_number":370,"context_line":"        elif hasattr(f, \"im_func\"):"},{"line_number":371,"context_line":"            module_name \u003d f.im_func.__module__"},{"line_number":372,"context_line":"        else:"},{"line_number":373,"context_line":"            return None"},{"line_number":374,"context_line":"    except Exception:"},{"line_number":375,"context_line":"        # in case any unexpected function cases get here"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_6e52bc68","line":372,"updated":"2015-09-01 13:33:50.000000000","message":"add a comment why we need to handle the else case. Might want to log something since this would be confusing.","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"8b38d0685ca3f81d8ed770bd7c1e06ed65de7877","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            module_name \u003d f.im_func.__module__"},{"line_number":372,"context_line":"        else:"},{"line_number":373,"context_line":"            return None"},{"line_number":374,"context_line":"    except Exception:"},{"line_number":375,"context_line":"        # in case any unexpected function cases get here"},{"line_number":376,"context_line":"        return None"},{"line_number":377,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_c9af8b28","line":374,"updated":"2015-08-20 13:44:25.000000000","message":"lol, sorry Stan.  This is idiotic.  Not sure what I was smoking yesterday, but you can take it out or leave it :)","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        else:"},{"line_number":373,"context_line":"            return None"},{"line_number":374,"context_line":"    except Exception:"},{"line_number":375,"context_line":"        # in case any unexpected function cases get here"},{"line_number":376,"context_line":"        return None"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    module \u003d sys.modules[module_name]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_ee7ecce2","line":375,"updated":"2015-09-01 13:33:50.000000000","message":"there should at least be a message logged so we can figure out why None is returned.","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    module \u003d sys.modules[module_name]"},{"line_number":379,"context_line":"    if hasattr(module, \"__file__\"):"},{"line_number":380,"context_line":"        return module.__file__"},{"line_number":381,"context_line":"    else:"},{"line_number":382,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_ae6e94fd","line":381,"updated":"2015-09-01 13:33:50.000000000","message":"add a comment why the module wouldn\u0027t have the module name, also might want to log something.","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"e7d5c0062d8ea320a2d809b890d37e414d28c84b","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    module \u003d sys.modules[module_name]"},{"line_number":379,"context_line":"    if hasattr(module, \"__file__\"):"},{"line_number":380,"context_line":"        return module.__file__"},{"line_number":381,"context_line":"    else:"},{"line_number":382,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_bee1bc9c","line":381,"in_reply_to":"da20952f_ae6e94fd","updated":"2015-09-02 06:19:03.000000000","message":"Unknown. sys doesn\u0027t have one, but some other builtins do.","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    if hasattr(module, \"__file__\"):"},{"line_number":380,"context_line":"        return module.__file__"},{"line_number":381,"context_line":"    else:"},{"line_number":382,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_2966feba","line":382,"updated":"2015-09-01 13:33:50.000000000","message":"can replace the 4 lines with\n\n return getattr(module, \u0027__file__\u0027, None)","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"}],"tests/test_util.py":[{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"065c7f2433fd8982ef989f0fb84ef6f3238fb5ce","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        self.assertEqual([11, 12, 13], list(lrange))"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def test_path_for_function(self):"},{"line_number":239,"context_line":"        path \u003d b_utils.get_path_for_function(b_utils.get_path_for_function)"},{"line_number":240,"context_line":"        self.assertRegexpMatches(path, \"(.*/)?bandit/core/utils.pyc?\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a21b891a","line":239,"updated":"2015-08-19 14:19:31.000000000","message":"thanks for adding a test :)","commit_id":"9ed3caf763f14d9046e9fb9ae8c4363cdacb8620"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        # the range should be the correct line numbers"},{"line_number":236,"context_line":"        self.assertEqual([11, 12, 13], list(lrange))"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def test_path_for_function(self):"},{"line_number":239,"context_line":"        path \u003d b_utils.get_path_for_function(b_utils.get_path_for_function)"},{"line_number":240,"context_line":"        self.assertRegexpMatches(path, \"(.*/)?bandit/core/utils.pyc?\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_c92e6242","line":238,"updated":"2015-09-01 13:33:50.000000000","message":"add tests for the error conditions, too.","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"02450aec4cdc2dea8bffd5f95e9428183406a58e","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def test_path_for_function(self):"},{"line_number":239,"context_line":"        path \u003d b_utils.get_path_for_function(b_utils.get_path_for_function)"},{"line_number":240,"context_line":"        self.assertRegexpMatches(path, \"(.*/)?bandit/core/utils.pyc?\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_69e5d606","line":240,"updated":"2015-09-01 13:33:50.000000000","message":"should be able to do b_utils.__file__ here.\n\n  self.assertIs(path, b_utils.file)","commit_id":"704be6204d0ccdaf02a3183f175ff993cde22a6c"}]}
