)]}'
{"horizon/hacking/checks.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ed2c3c598e641be5877d092be12d4a738797d227","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5a8bc5a2_9f785cc6","updated":"2016-09-24 11:14:45.000000000","message":"Thanks. Could you add a test for new hacking rules?","commit_id":"2e750a894ead9d3d16a7a61b4525cb5cdc09f508"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ed2c3c598e641be5877d092be12d4a738797d227","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    assertTrue/False(A in B, message) or assertTrue/False(A not in B, message)"},{"line_number":50,"context_line":"    sentences."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    N334"},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    res \u003d (asse_true_false_with_in_or_not_in.search(logical_line) or"},{"line_number":55,"context_line":"           asse_true_false_with_in_or_not_in_spaces.search(logical_line))"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_5f6ed401","line":52,"range":{"start_line":52,"start_character":4,"end_line":52,"end_character":8},"updated":"2016-09-24 11:14:45.000000000","message":"What does \u0027N\u0027 in \u0027N334\u0027 mean?","commit_id":"2e750a894ead9d3d16a7a61b4525cb5cdc09f508"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d52c018212ec073584cbe8072af888347c2d5ab6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    res \u003d (asse_true_false_with_in_or_not_in.search(logical_line) or"},{"line_number":53,"context_line":"           asse_true_false_with_in_or_not_in_spaces.search(logical_line))"},{"line_number":54,"context_line":"    if res:"},{"line_number":55,"context_line":"        yield (0, \"N334: Use assertIn/NotIn(A, B) rather than \""},{"line_number":56,"context_line":"                  \"assertTrue/False(A in/not in B) when checking collection \""},{"line_number":57,"context_line":"                  \"contents.\")"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a8bc5a2_c2f1d296","line":55,"range":{"start_line":55,"start_character":19,"end_line":55,"end_character":23},"updated":"2016-09-27 05:04:52.000000000","message":"Have you read the guideline above (around L.20)?\nL.22 suggests M3xx.","commit_id":"acb4df78d26572cf14cd5e18a3e2c4114ad408b7"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"1f2125444da2c7e5e9c8f5c63aefdcfd3d2b4f43","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"mutable_default_args \u003d re.compile(r\"^\\s*def .+\\((.+\u003d\\{\\}|.+\u003d\\[\\])\")"},{"line_number":32,"context_line":"asse_true_false_with_in_or_not_in \u003d re.compile("},{"line_number":33,"context_line":"    r\"assert(True|False)\\(\""},{"line_number":34,"context_line":"    r\"(\\w|[][.\u0027\\\"])+( not)? in (\\w|[][.\u0027\\\",])+(, .*)?\\)\")"},{"line_number":35,"context_line":"asse_true_false_with_in_or_not_in_spaces \u003d re.compile("},{"line_number":36,"context_line":"    r\"assert(True|False)\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_a1cb3f52","line":33,"updated":"2016-10-06 17:53:43.000000000","message":"Optional. This is definitely a nit pick, but would be nice to see the same pattern as the one below or vice versa.\n\nr\"assert(True|False)\"\nr\"\\(....\"","commit_id":"47fe8765fa8ec6e157be3c9e72365d8f1a8046e4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"1f2125444da2c7e5e9c8f5c63aefdcfd3d2b4f43","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def assert_true_or_false_with_in(logical_line):"},{"line_number":48,"context_line":"    \"\"\"Check for assertTrue/False(A in B), assertTrue/False(A not in B),"},{"line_number":49,"context_line":"    assertTrue/False(A in B, message) or assertTrue/False(A not in B, message)"},{"line_number":50,"context_line":"    sentences."},{"line_number":51,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_41099bdc","line":48,"updated":"2016-10-06 17:53:43.000000000","message":"More readable to list them out:\n\nassertTrue(A in B)\nassertFalse(A in B)\nassertTrue(A not in B)\n...","commit_id":"47fe8765fa8ec6e157be3c9e72365d8f1a8046e4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"1f2125444da2c7e5e9c8f5c63aefdcfd3d2b4f43","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                  \"contents.\")"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def factory(register):"},{"line_number":61,"context_line":"    register(no_mutable_default_args)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a95cdbc_e1baa722","line":60,"updated":"2016-10-06 17:53:43.000000000","message":"May I missed something here. Do we need to register it here as well?","commit_id":"47fe8765fa8ec6e157be3c9e72365d8f1a8046e4"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"597a512124d8f5d0efc5c749a3d6d6e9064195f8","unresolved":false,"context_lines":[{"line_number":47,"context_line":"def assert_true_or_false_with_in(logical_line):"},{"line_number":48,"context_line":"    \"\"\"Check for"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    assertTrue(A in B),"},{"line_number":51,"context_line":"    assertFalse(A in B),"},{"line_number":52,"context_line":"    assertTrue(A in B),"},{"line_number":53,"context_line":"    assertFalse(A not in B),"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_3ccd1f66","line":50,"updated":"2016-10-10 16:06:16.000000000","message":"A small indents before each assert would be nice.","commit_id":"7cae61e97c31be7f6063d181c48c2350753c0b1c"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"597a512124d8f5d0efc5c749a3d6d6e9064195f8","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    res \u003d (asse_true_false_with_in_or_not_in.search(logical_line) or"},{"line_number":62,"context_line":"           asse_true_false_with_in_or_not_in_spaces.search(logical_line))"},{"line_number":63,"context_line":"    if res:"},{"line_number":64,"context_line":"        yield (0, \"M334: Use assertIn(A, B), assertNotIn(A, B) rather than \""},{"line_number":65,"context_line":"                  \"assertTrue(A not in B), assertFalse(A not in B), \""},{"line_number":66,"context_line":"                  \"assertTrue(A in B), assertFalse(A in B) \""},{"line_number":67,"context_line":"                  \"when checking collection contents.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_9ca713a6","line":64,"updated":"2016-10-10 16:06:16.000000000","message":"I think the original message is fine here. Or you can shorten it like: \"Use assertIn or assertNotIn rather than assertTrue or assertFalse when checking collection contents\"","commit_id":"7cae61e97c31be7f6063d181c48c2350753c0b1c"},{"author":{"_account_id":9576,"name":"Thai Tran","email":"tqtran@us.ibm.com","username":"tqtran"},"change_message_id":"a4331c674930bb63b67d831b163beaab26db42f5","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def factory(register):"},{"line_number":71,"context_line":"    register(no_mutable_default_args)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa6399be_ae62cf14","line":71,"updated":"2016-10-10 21:11:10.000000000","message":"still need to register, otherwise pep8 doesnt pick it up.","commit_id":"7cae61e97c31be7f6063d181c48c2350753c0b1c"}],"horizon/test/test_hacking.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d52c018212ec073584cbe8072af888347c2d5ab6","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_assert_true_or_false_with_in_or_not_in(self):"},{"line_number":86,"context_line":"        self.assertEqual(len(list(checks.assert_true_or_false_with_in("},{"line_number":87,"context_line":"            \"self.assertTrue(A in B)\"))), 1)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        self.assertEqual(len(list(checks.assert_true_or_false_with_in("},{"line_number":90,"context_line":"            \"self.assertFalse(A in B)\"))), 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a8bc5a2_a2ccc689","line":87,"updated":"2016-09-27 05:04:52.000000000","message":"The order of the arguments of assertEqual should be \u0027expected\u0027 and then \u0027observed\u0027. It is suggested by testtools.  The existing tests use this order, so new tests should follow it.","commit_id":"acb4df78d26572cf14cd5e18a3e2c4114ad408b7"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"f687e111e5296e8f23b70c628001f575f1355197","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            \"self.assertTrue(A in \u0027some string with spaces\u0027)\"))))"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        self.assertEqual(1, len(list(checks.assert_true_or_false_with_in("},{"line_number":114,"context_line":"            \"self.assertTrue(A in \u0027some string with spaces\u0027)\"))))"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        self.assertEqual(1, len(list(checks.assert_true_or_false_with_in("},{"line_number":117,"context_line":"            \"self.assertTrue(A in [\u00271\u0027, \u00272\u0027, \u00273\u0027])\"))))"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a95cdbc_a2bb9c71","line":114,"updated":"2016-10-05 05:16:00.000000000","message":"Duplicated test","commit_id":"57757b1ad0d235a054e11f31fa6ff5b1f2209855"}]}
