)]}'
{"bandit/core/test_set.py":[{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"4a8c604656f5b6ff351e3912b1b39e17740338b0","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"logger \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# These IDs are for bandit built in tests"},{"line_number":30,"context_line":"builtins \u003d [\u0027B001\u0027]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_8c8feccb","line":29,"updated":"2016-01-26 16:04:42.000000000","message":"give an example of what a built in is and why this is needed for it?","commit_id":"93a5c77cdfab450533d67d888c89accc0647620c"},{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"fe865812e2064684744ff839351bc8a381b0b6ef","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"logger \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# These IDs are for bandit built in tests"},{"line_number":30,"context_line":"builtins \u003d [\u0027B001\u0027]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_c69b8071","line":29,"in_reply_to":"9a68dd71_8c8feccb","updated":"2016-01-26 16:35:02.000000000","message":"Its just native bandit functionality that we may want to turn off. The comment on line 29 should make this clear? Nothing new is being added here as the previous patch also let you turn off B001 to disable blacklist, please see the commit https://review.openstack.org/#/c/270932/","commit_id":"93a5c77cdfab450533d67d888c89accc0647620c"},{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"4a8c604656f5b6ff351e3912b1b39e17740338b0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        def _get_id(value):"},{"line_number":46,"context_line":"            # Here we normalize on plugin IDs, by converting any names."},{"line_number":47,"context_line":"            # If we cant convert it then we just return it, this is OK."},{"line_number":48,"context_line":"            return extman.get_plugin_id(value) or value"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        inc \u003d set(_get_id(i) for i in (profile.get(\u0027include\u0027) or []))"},{"line_number":51,"context_line":"        exc \u003d set(_get_id(e) for e in (profile.get(\u0027exclude\u0027) or []))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_ac01903b","line":48,"updated":"2016-01-26 16:04:42.000000000","message":"seems like we need some warning here about not being able to find an ID/name","commit_id":"93a5c77cdfab450533d67d888c89accc0647620c"},{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"fe865812e2064684744ff839351bc8a381b0b6ef","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        def _get_id(value):"},{"line_number":46,"context_line":"            # Here we normalize on plugin IDs, by converting any names."},{"line_number":47,"context_line":"            # If we cant convert it then we just return it, this is OK."},{"line_number":48,"context_line":"            return extman.get_plugin_id(value) or value"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        inc \u003d set(_get_id(i) for i in (profile.get(\u0027include\u0027) or []))"},{"line_number":51,"context_line":"        exc \u003d set(_get_id(e) for e in (profile.get(\u0027exclude\u0027) or []))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_a6020cb3","line":48,"in_reply_to":"9a68dd71_ac01903b","updated":"2016-01-26 16:35:02.000000000","message":"the value could be an ID so it wont match any names but is still valid, this is OK.","commit_id":"93a5c77cdfab450533d67d888c89accc0647620c"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"74d07f8d602bedc81364ef23f726d49fbb554eb1","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            # If we cant convert it then we just return it, this is OK."},{"line_number":48,"context_line":"            return extman.get_plugin_id(value) or value"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        inc \u003d set(_get_id(i) for i in (profile.get(\u0027include\u0027) or []))"},{"line_number":51,"context_line":"        exc \u003d set(_get_id(e) for e in (profile.get(\u0027exclude\u0027) or []))"},{"line_number":52,"context_line":"        filtered \u003d inc or list(extman.plugins_by_id.keys())"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a5de9d1_6c261d6a","line":50,"range":{"start_line":50,"start_character":39,"end_line":50,"end_character":61},"updated":"2016-01-28 07:43:15.000000000","message":"nit:\n\n    profile.get(\u0027include\u0027, [])\n\nsaves one level of parens","commit_id":"93a5c77cdfab450533d67d888c89accc0647620c"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"74d07f8d602bedc81364ef23f726d49fbb554eb1","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            for node, tests in six.iteritems(extman.blacklist):"},{"line_number":58,"context_line":"                filtered.extend([t[\u0027id\u0027] for t in tests])"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return set(f for f in filtered if f not in exc)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _load_builtins(self, filtering):"},{"line_number":63,"context_line":"        \u0027\u0027\u0027loads up out builtin functions, so they can be filtered.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a5de9d1_ecdbed19","line":60,"updated":"2016-01-28 07:43:15.000000000","message":"nit: I had to spend some time looking at this logic, maybe this is more readable (or is it just me?)\n\n    if inc:\n        filtered \u003d inc\n    else:\n        filtered \u003d set(extman.plugins_by_id.keys())\n        filtered.update(builtins)\n        for tests in extman.blacklist.values():\n            filtered.update(t[\u0027id\u0027] for t in tests)\n\n    return filtered - exc","commit_id":"93a5c77cdfab450533d67d888c89accc0647620c"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"b255e1a3f84d90ef20be256b5f400cbc9d1cf45f","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# These IDs are for bandit built in tests"},{"line_number":30,"context_line":"builtins \u003d ["},{"line_number":31,"context_line":"    \u0027B001\u0027  # Built in blacklist test"},{"line_number":32,"context_line":"    ]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_cfe34332","line":31,"range":{"start_line":31,"start_character":14,"end_line":31,"end_character":22},"updated":"2016-01-29 06:47:20.000000000","message":"Built-in","commit_id":"590c8f9973609daf3597ee4b264eea195e41da63"},{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"87c0edad7f63c39f3ac65b0116517ef8faca47f4","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# These IDs are for bandit built in tests"},{"line_number":30,"context_line":"builtins \u003d ["},{"line_number":31,"context_line":"    \u0027B001\u0027  # Built in blacklist test"},{"line_number":32,"context_line":"    ]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_c0a6ad52","line":31,"range":{"start_line":31,"start_character":14,"end_line":31,"end_character":22},"in_reply_to":"7a5de9d1_cfe34332","updated":"2016-01-29 09:30:55.000000000","message":"Done","commit_id":"590c8f9973609daf3597ee4b264eea195e41da63"}],"tests/unit/core/test_test_set.py":[{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"b255e1a3f84d90ef20be256b5f400cbc9d1cf45f","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        ts \u003d test_set.BanditTestSet(mock.MagicMock())"},{"line_number":116,"context_line":"        blacklist \u003d ts.get_tests(\u0027Import\u0027)[0]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        self.assertEqual(len(blacklist._config[\u0027Import\u0027]), 2)"},{"line_number":119,"context_line":"        self.assertEqual(len(blacklist._config[\u0027ImportFrom\u0027]), 2)"},{"line_number":120,"context_line":"        self.assertEqual(len(blacklist._config[\u0027Calls\u0027]), 2)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_effabfbc","line":118,"range":{"start_line":118,"start_character":13,"end_line":118,"end_character":24},"updated":"2016-01-29 06:47:20.000000000","message":"All of the assertEqual() should be expected, actual","commit_id":"590c8f9973609daf3597ee4b264eea195e41da63"},{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"87c0edad7f63c39f3ac65b0116517ef8faca47f4","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        ts \u003d test_set.BanditTestSet(mock.MagicMock())"},{"line_number":116,"context_line":"        blacklist \u003d ts.get_tests(\u0027Import\u0027)[0]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        self.assertEqual(len(blacklist._config[\u0027Import\u0027]), 2)"},{"line_number":119,"context_line":"        self.assertEqual(len(blacklist._config[\u0027ImportFrom\u0027]), 2)"},{"line_number":120,"context_line":"        self.assertEqual(len(blacklist._config[\u0027Calls\u0027]), 2)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_00ada530","line":118,"range":{"start_line":118,"start_character":13,"end_line":118,"end_character":24},"in_reply_to":"7a5de9d1_effabfbc","updated":"2016-01-29 09:30:55.000000000","message":"Well spotted, fixed","commit_id":"590c8f9973609daf3597ee4b264eea195e41da63"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"b255e1a3f84d90ef20be256b5f400cbc9d1cf45f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        profile \u003d {\u0027exclude\u0027: [\u0027B401\u0027, \u0027B302\u0027]}"},{"line_number":142,"context_line":"        ts \u003d test_set.BanditTestSet(mock.MagicMock(), profile)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        # if there is no blacklist data for a node type then we wont add a"},{"line_number":145,"context_line":"        # blacklist test to it, as this would be pointless."},{"line_number":146,"context_line":"        self.assertEqual(len(ts.get_tests(\u0027Import\u0027)), 0)"},{"line_number":147,"context_line":"        self.assertEqual(len(ts.get_tests(\u0027ImportFrom\u0027)), 0)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_cf68238a","line":144,"range":{"start_line":144,"start_character":64,"end_line":144,"end_character":68},"updated":"2016-01-29 06:47:20.000000000","message":"won\u0027t","commit_id":"590c8f9973609daf3597ee4b264eea195e41da63"},{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"87c0edad7f63c39f3ac65b0116517ef8faca47f4","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        profile \u003d {\u0027exclude\u0027: [\u0027B401\u0027, \u0027B302\u0027]}"},{"line_number":142,"context_line":"        ts \u003d test_set.BanditTestSet(mock.MagicMock(), profile)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        # if there is no blacklist data for a node type then we wont add a"},{"line_number":145,"context_line":"        # blacklist test to it, as this would be pointless."},{"line_number":146,"context_line":"        self.assertEqual(len(ts.get_tests(\u0027Import\u0027)), 0)"},{"line_number":147,"context_line":"        self.assertEqual(len(ts.get_tests(\u0027ImportFrom\u0027)), 0)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_a0ab711c","line":144,"range":{"start_line":144,"start_character":64,"end_line":144,"end_character":68},"in_reply_to":"7a5de9d1_cf68238a","updated":"2016-01-29 09:30:55.000000000","message":"Done","commit_id":"590c8f9973609daf3597ee4b264eea195e41da63"}]}
