)]}'
{"nova/network/linux_net.py":[{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"d72e161726d46d2912b47decb6068ed881991f97","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        return (start, end)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    def _modify_rules_get_filter(self, criterion, new_filter):"},{"line_number":391,"context_line":"        if criterion:"},{"line_number":392,"context_line":"            regex \u003d re.compile(criterion)"},{"line_number":393,"context_line":"            temp_filter \u003d [line for line in new_filter if regex.search(line)]"},{"line_number":394,"context_line":"            for rule_str in temp_filter:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_64961096","line":391,"range":{"start_line":391,"start_character":8,"end_line":391,"end_character":21},"updated":"2016-08-26 06:05:28.000000000","message":"I would reverse checks for criteria here: filter out all NOT interesting cases and do the meat in the function body, like:\n\n  if not criterion:\n    return filter_top, filter_bottom\n\n  regex \u003d re.compile(criterion)\n  temp_filter \u003d …\n  [and so on]\n\nThat way you can easily get rid of one indentation level.\n\nAlso, I\u0027d go what Kevin has suggested: get rid of unused temp_filter.","commit_id":"7a6eb26bc7d99778989bcb5feebbeaf347511d53"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"c9428b7cc6a0e177fb4ade49d81b1cfb89a736d3","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        top_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":419,"context_line":"            CONF.iptables_top_regex, new_filter)"},{"line_number":420,"context_line":"        bottom_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":421,"context_line":"            CONF.iptables_bottom_regex, new_filter)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        seen_chains \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ac06dbe_583d9fba","line":420,"range":{"start_line":420,"start_character":22,"end_line":420,"end_character":33},"updated":"2016-08-24 15:36:22.000000000","message":"Where is temp_filter used?  It\u0027s not passed to _modify_rules_get_filter(), and the original code appears to only use it as a temporary for computing top_rules and bottom_rules.","commit_id":"7a6eb26bc7d99778989bcb5feebbeaf347511d53"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ffb037396fea612c33504ed017ecea32e740457a","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        top_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":419,"context_line":"            CONF.iptables_top_regex, new_filter)"},{"line_number":420,"context_line":"        bottom_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":421,"context_line":"            CONF.iptables_bottom_regex, new_filter)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        seen_chains \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ac06dbe_d120f3b2","line":420,"range":{"start_line":420,"start_character":22,"end_line":420,"end_character":33},"in_reply_to":"1ac06dbe_327277ae","updated":"2016-08-25 18:25:38.000000000","message":"Try dropping it from this method again.  In previous cases where someone\u0027s seen unusual test failures, it\u0027s turned out to be some other factor than what they thought originally caused the failures.","commit_id":"7a6eb26bc7d99778989bcb5feebbeaf347511d53"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"5e09acf629a58a93b369ebe12dda5af0ab238f91","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        top_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":419,"context_line":"            CONF.iptables_top_regex, new_filter)"},{"line_number":420,"context_line":"        bottom_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":421,"context_line":"            CONF.iptables_bottom_regex, new_filter)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        seen_chains \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ac06dbe_327277ae","line":420,"range":{"start_line":420,"start_character":22,"end_line":420,"end_character":33},"in_reply_to":"1ac06dbe_583d9fba","updated":"2016-08-24 18:34:37.000000000","message":"Nowhere, but 5 unit test has failed, if the temp_filter not exist in caller method. I dont know why.","commit_id":"7a6eb26bc7d99778989bcb5feebbeaf347511d53"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"b16dae42bf666cdb6c9e3743c2ae5f0f274179c4","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        top_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":419,"context_line":"            CONF.iptables_top_regex, new_filter)"},{"line_number":420,"context_line":"        bottom_rules, temp_filter, new_filter \u003d self._modify_rules_get_filter("},{"line_number":421,"context_line":"            CONF.iptables_bottom_regex, new_filter)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        seen_chains \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_bef9fdca","line":420,"range":{"start_line":420,"start_character":22,"end_line":420,"end_character":33},"in_reply_to":"1ac06dbe_d120f3b2","updated":"2016-08-26 09:55:04.000000000","message":"Ok, i removed the got temp_filters.","commit_id":"7a6eb26bc7d99778989bcb5feebbeaf347511d53"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dffad310ce7e58b05d35918a088a3af2afed9bd3","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        bottom_rules \u003d []"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        if CONF.iptables_top_regex:"},{"line_number":411,"context_line":"            regex \u003d re.compile(CONF.iptables_top_regex)"},{"line_number":412,"context_line":"            temp_filter \u003d [line for line in new_filter if regex.search(line)]"},{"line_number":413,"context_line":"            for rule_str in temp_filter:"},{"line_number":414,"context_line":"                new_filter \u003d [s for s in new_filter"},{"line_number":415,"context_line":"                              if s.strip() !\u003d rule_str.strip()]"},{"line_number":416,"context_line":"            top_rules \u003d temp_filter"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        if CONF.iptables_bottom_regex:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_f6e05d2b","side":"PARENT","line":415,"range":{"start_line":411,"start_character":12,"end_line":415,"end_character":63},"updated":"2016-08-30 10:49:49.000000000","message":"Would it not be better to just extract this code?","commit_id":"1423be58b5e3aa26c85296968146e9d6ed59455a"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"d2bfc6fe983ef49559164c0c066158cd0a4e8e9f","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        bottom_rules \u003d []"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        if CONF.iptables_top_regex:"},{"line_number":411,"context_line":"            regex \u003d re.compile(CONF.iptables_top_regex)"},{"line_number":412,"context_line":"            temp_filter \u003d [line for line in new_filter if regex.search(line)]"},{"line_number":413,"context_line":"            for rule_str in temp_filter:"},{"line_number":414,"context_line":"                new_filter \u003d [s for s in new_filter"},{"line_number":415,"context_line":"                              if s.strip() !\u003d rule_str.strip()]"},{"line_number":416,"context_line":"            top_rules \u003d temp_filter"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        if CONF.iptables_bottom_regex:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_5f2b3581","side":"PARENT","line":415,"range":{"start_line":411,"start_character":12,"end_line":415,"end_character":63},"in_reply_to":"fa7ab95a_b657b5c8","updated":"2017-06-22 18:18:13.000000000","message":"Done","commit_id":"1423be58b5e3aa26c85296968146e9d6ed59455a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"90adfcbee2c007996d6c630dc0eb44f1b6adc1c8","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        bottom_rules \u003d []"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        if CONF.iptables_top_regex:"},{"line_number":411,"context_line":"            regex \u003d re.compile(CONF.iptables_top_regex)"},{"line_number":412,"context_line":"            temp_filter \u003d [line for line in new_filter if regex.search(line)]"},{"line_number":413,"context_line":"            for rule_str in temp_filter:"},{"line_number":414,"context_line":"                new_filter \u003d [s for s in new_filter"},{"line_number":415,"context_line":"                              if s.strip() !\u003d rule_str.strip()]"},{"line_number":416,"context_line":"            top_rules \u003d temp_filter"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        if CONF.iptables_bottom_regex:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_b657b5c8","side":"PARENT","line":415,"range":{"start_line":411,"start_character":12,"end_line":415,"end_character":63},"in_reply_to":"fa7ab95a_f6e05d2b","updated":"2016-08-30 10:51:34.000000000","message":"You could call it, _create_rules_from_regex, or something?","commit_id":"1423be58b5e3aa26c85296968146e9d6ed59455a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"90adfcbee2c007996d6c630dc0eb44f1b6adc1c8","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        end \u003d lines[start:].index(\u0027COMMIT\u0027) + start + 2"},{"line_number":388,"context_line":"        return (start, end)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    def _modify_rules_get_filter(self, criterion, new_filter):"},{"line_number":391,"context_line":"        if not criterion:"},{"line_number":392,"context_line":"            return [], new_filter"},{"line_number":393,"context_line":"        regex \u003d re.compile(criterion)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa7ab95a_f6fcddb9","line":390,"range":{"start_line":390,"start_character":33,"end_line":390,"end_character":37},"updated":"2016-08-30 10:51:34.000000000","message":"Nit: There is no use of self, so it would be nicer if its a static or class method maybe?","commit_id":"5458077bbf24a08abc62b275d302175f20ccffdb"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"2602c894bd2834be4109417f02b65da75a31a9bc","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        end \u003d lines[start:].index(\u0027COMMIT\u0027) + start + 2"},{"line_number":388,"context_line":"        return (start, end)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    def _modify_rules_get_filter(self, criterion, new_filter):"},{"line_number":391,"context_line":"        if not criterion:"},{"line_number":392,"context_line":"            return [], new_filter"},{"line_number":393,"context_line":"        regex \u003d re.compile(criterion)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a74a57a_b5ce61b2","line":390,"range":{"start_line":390,"start_character":4,"end_line":390,"end_character":62},"updated":"2016-11-30 16:44:58.000000000","message":"Agreed on John suggestion on making this class/static.","commit_id":"7f013159e7d53a4e08bbb059331b772918facad5"},{"author":{"_account_id":21239,"name":"Alex Szarka","email":"szarka@inf.u-szeged.hu","username":"xavvior"},"change_message_id":"cb75461520e7fc649476b9c7f97a9e9a13fd6ef4","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        end \u003d lines[start:].index(\u0027COMMIT\u0027) + start + 2"},{"line_number":388,"context_line":"        return (start, end)"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    def _modify_rules_get_filter(self, criterion, new_filter):"},{"line_number":391,"context_line":"        if not criterion:"},{"line_number":392,"context_line":"            return [], new_filter"},{"line_number":393,"context_line":"        regex \u003d re.compile(criterion)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f201791_3f22b9a5","line":390,"range":{"start_line":390,"start_character":4,"end_line":390,"end_character":62},"in_reply_to":"5a74a57a_b5ce61b2","updated":"2017-06-22 18:18:06.000000000","message":"Done","commit_id":"7f013159e7d53a4e08bbb059331b772918facad5"}]}
