)]}'
{"neutron/hacking/checks.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4224722ca6494ddcc750ec643982f07562f2342d","unresolved":false,"context_lines":[{"line_number":211,"context_line":"def check_assertempty(logical_line, filename):"},{"line_number":212,"context_line":"    if \u0027neutron/tests/\u0027 in filename:"},{"line_number":213,"context_line":"        msg \u003d (\"N330: Use assertEqual(*empty*, observed) instead of \""},{"line_number":214,"context_line":"               \"assertEqual(observed, *empty*). *empty* contiains \""},{"line_number":215,"context_line":"               \"{}, [], (), set(), \u0027\u0027, \\\"\\\"\")"},{"line_number":216,"context_line":"        empties \u003d r\"(\\[\\s*\\]|\\{\\s*\\}|\\(\\s*\\)|set\\(\\s*\\)|\u0027\\s*\u0027|\\\"\\s*\\\")\""},{"line_number":217,"context_line":"        reg \u003d r\"assertEqual\\(([^,]*,\\s*)+?%s\\)\\s*$\" % empties"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_43cf6a56","line":214,"range":{"start_line":214,"start_character":56,"end_line":214,"end_character":65},"updated":"2015-12-31 09:44:16.000000000","message":"typo","commit_id":"528657980896cf1657766192e1081f3d3751edea"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5873ee4222ad28e0a38e5d070f95d068af57c652","unresolved":false,"context_lines":[{"line_number":211,"context_line":"def check_assertempty(logical_line, filename):"},{"line_number":212,"context_line":"    if \u0027neutron/tests/\u0027 in filename:"},{"line_number":213,"context_line":"        msg \u003d (\"N330: Use assertEqual(*empty*, observed) instead of \""},{"line_number":214,"context_line":"               \"assertEqual(observed, *empty*). *empty* contiains \""},{"line_number":215,"context_line":"               \"{}, [], (), set(), \u0027\u0027, \\\"\\\"\")"},{"line_number":216,"context_line":"        empties \u003d r\"(\\[\\s*\\]|\\{\\s*\\}|\\(\\s*\\)|set\\(\\s*\\)|\u0027\\s*\u0027|\\\"\\s*\\\")\""},{"line_number":217,"context_line":"        reg \u003d r\"assertEqual\\(([^,]*,\\s*)+?%s\\)\\s*$\" % empties"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_8f733215","line":214,"range":{"start_line":214,"start_character":56,"end_line":214,"end_character":65},"in_reply_to":"fa69d971_43cf6a56","updated":"2016-01-02 02:54:03.000000000","message":"Done","commit_id":"528657980896cf1657766192e1081f3d3751edea"}],"neutron/tests/functional/agent/linux/test_iptables_firewall.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"6104cbb4927c6e0e4a3c5db0d30d90f9b7150a8a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            self.FAKE_SECURITY_GROUP_ID, sg_rules)"},{"line_number":124,"context_line":"        self.firewall.prepare_port_filter(self.src_port_desc)"},{"line_number":125,"context_line":"        # after one prepare call, another apply should be a NOOP"},{"line_number":126,"context_line":"        self.assertEmpty(self.firewall.iptables._apply())"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        orig_sg_rules \u003d copy.copy(sg_rules)"},{"line_number":129,"context_line":"        for proto in (\u0027tcp\u0027, \u0027udp\u0027, \u0027icmp\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_50f23707","line":126,"updated":"2015-12-21 17:18:01.000000000","message":"These assertions aren\u0027t the same. One is ensuring that the result is an empty list while the other is only checking that the length is 0. We are losing a type check.","commit_id":"3f53a3ae0e4a31be3d8cd042ee87e62623c8d3ca"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"ec18a46a193abcb74e4832163e0d9f0cbef6b843","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            self.FAKE_SECURITY_GROUP_ID, sg_rules)"},{"line_number":124,"context_line":"        self.firewall.prepare_port_filter(self.src_port_desc)"},{"line_number":125,"context_line":"        # after one prepare call, another apply should be a NOOP"},{"line_number":126,"context_line":"        self.assertEmpty(self.firewall.iptables._apply())"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        orig_sg_rules \u003d copy.copy(sg_rules)"},{"line_number":129,"context_line":"        for proto in (\u0027tcp\u0027, \u0027udp\u0027, \u0027icmp\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a7e1126_f8a69a0d","line":126,"in_reply_to":"3a7e1126_50f23707","updated":"2015-12-22 03:23:47.000000000","message":"Seems you\u0027re suggesting that we should have different empty assertions, like:\n    assertEmptyList, assertEmptyString, assertEmptyDict ...?\nIf so, I can do that, otherwise, I have no idea what to do.\n\nBTW, shall we also need keep assertEmpty, for cases they don\u0027t need a type check?","commit_id":"3f53a3ae0e4a31be3d8cd042ee87e62623c8d3ca"}]}
