)]}'
{"karbor/db/sqlalchemy/api.py":[{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"d0d2b204b880413c929916797f9f28ca640fb0cc","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"    result \u003d model_query("},{"line_number":1337,"context_line":"        context,"},{"line_number":1338,"context_line":"        models.CheckpointRecord,"},{"line_number":1339,"context_line":"        session\u003dsession).\\"},{"line_number":1340,"context_line":"        filter_by(id\u003dcheckpoint_record_id).\\"},{"line_number":1341,"context_line":"        first()"},{"line_number":1342,"context_line":"    if not result:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_14f7ab8b","line":1339,"range":{"start_line":1339,"start_character":25,"end_line":1339,"end_character":26},"updated":"2016-09-13 02:31:24.000000000","message":"It would be better not to use the \u0027\\\u0027. You can reorganize your codes referencing other codes.","commit_id":"3b7ee0bd6f64a4189a816c15c250acb8eba1d08e"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"d0d2b204b880413c929916797f9f28ca640fb0cc","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"        context,"},{"line_number":1338,"context_line":"        models.CheckpointRecord,"},{"line_number":1339,"context_line":"        session\u003dsession).\\"},{"line_number":1340,"context_line":"        filter_by(id\u003dcheckpoint_record_id).\\"},{"line_number":1341,"context_line":"        first()"},{"line_number":1342,"context_line":"    if not result:"},{"line_number":1343,"context_line":"        raise exception.CheckpointRecordNotFound(id\u003dcheckpoint_record_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_941e5b6e","line":1340,"range":{"start_line":1340,"start_character":43,"end_line":1340,"end_character":44},"updated":"2016-09-13 02:31:24.000000000","message":"ditto","commit_id":"3b7ee0bd6f64a4189a816c15c250acb8eba1d08e"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"d0d2b204b880413c929916797f9f28ca640fb0cc","unresolved":false,"context_lines":[{"line_number":1349,"context_line":"def checkpoint_record_update(context, checkpoint_record_id, values):"},{"line_number":1350,"context_line":"    session \u003d get_session()"},{"line_number":1351,"context_line":"    with session.begin():"},{"line_number":1352,"context_line":"        checkpoint_record_ref \u003d _checkpoint_record_get(context,"},{"line_number":1353,"context_line":"                                                       checkpoint_record_id,"},{"line_number":1354,"context_line":"                                                       session\u003dsession)"},{"line_number":1355,"context_line":"        checkpoint_record_ref.update(values)"},{"line_number":1356,"context_line":"        return checkpoint_record_ref"},{"line_number":1357,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_8f056612","line":1354,"range":{"start_line":1352,"start_character":55,"end_line":1354,"end_character":71},"updated":"2016-09-13 02:31:24.000000000","message":"move them to one line","commit_id":"3b7ee0bd6f64a4189a816c15c250acb8eba1d08e"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"d0d2b204b880413c929916797f9f28ca640fb0cc","unresolved":false,"context_lines":[{"line_number":1396,"context_line":"                    function for more information"},{"line_number":1397,"context_line":"    :returns: list of matching checkpoint records"},{"line_number":1398,"context_line":"    \"\"\""},{"line_number":1399,"context_line":"    if filters and not \\"},{"line_number":1400,"context_line":"            is_valid_model_filters(models.CheckpointRecord, filters):"},{"line_number":1401,"context_line":"        return []"},{"line_number":1402,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_4fec3ef3","line":1399,"range":{"start_line":1399,"start_character":23,"end_line":1399,"end_character":24},"updated":"2016-09-13 02:31:24.000000000","message":"don\u0027t user \u0027\\\u0027. you can use \u0027()\u0027 to reorganize codes.","commit_id":"3b7ee0bd6f64a4189a816c15c250acb8eba1d08e"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"d0d2b204b880413c929916797f9f28ca640fb0cc","unresolved":false,"context_lines":[{"line_number":1438,"context_line":"                    function for more information"},{"line_number":1439,"context_line":"    :returns: list of matching restores"},{"line_number":1440,"context_line":"    \"\"\""},{"line_number":1441,"context_line":"    if filters and not \\"},{"line_number":1442,"context_line":"            is_valid_model_filters(models.CheckpointRecord, filters):"},{"line_number":1443,"context_line":"        return []"},{"line_number":1444,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_af54eafd","line":1441,"range":{"start_line":1441,"start_character":23,"end_line":1441,"end_character":24},"updated":"2016-09-13 02:31:24.000000000","message":"don\u0027t use \u0027\\\u0027.","commit_id":"3b7ee0bd6f64a4189a816c15c250acb8eba1d08e"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"d0d2b204b880413c929916797f9f28ca640fb0cc","unresolved":false,"context_lines":[{"line_number":1447,"context_line":"        authorize_project_context(context, project_id)"},{"line_number":1448,"context_line":"        # Add in the project filter without modifying the given filters"},{"line_number":1449,"context_line":"        filters \u003d filters.copy() if filters else {}"},{"line_number":1450,"context_line":"        filters[\u0027project_id\u0027] \u003d project_id"},{"line_number":1451,"context_line":"        # Generate the query"},{"line_number":1452,"context_line":"        query \u003d _generate_paginate_query(context, session, marker, limit,"},{"line_number":1453,"context_line":"                                         sort_keys, sort_dirs, filters,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_6f2d8245","line":1450,"range":{"start_line":1450,"start_character":8,"end_line":1450,"end_character":42},"updated":"2016-09-13 02:31:24.000000000","message":"It is not good to add a filter impliedly. You can add this filter in api.","commit_id":"3b7ee0bd6f64a4189a816c15c250acb8eba1d08e"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"7cbd436215dd994a433a50a9c2848a86d44d1ea9","unresolved":false,"context_lines":[{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":""},{"line_number":1414,"context_line":"@require_context"},{"line_number":1415,"context_line":"def checkpoint_record_get_all_by_project(context, project_id, marker, limit,"},{"line_number":1416,"context_line":"                                         sort_keys\u003dNone, sort_dirs\u003dNone,"},{"line_number":1417,"context_line":"                                         filters\u003dNone, offset\u003dNone):"},{"line_number":1418,"context_line":"    \"\"\"Retrieves all checkpoint records in a project."}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_7bc03f7d","line":1415,"range":{"start_line":1415,"start_character":4,"end_line":1415,"end_character":40},"updated":"2016-09-23 03:50:55.000000000","message":"this function is almost like the \u0027checkpoint_record_get_all\u0027, just add a filter. it would be better to refactor them. you can see the codes like \u0027scheduled_operation_get_all_by_filters_sort\u0027 for reference.","commit_id":"120f8c984aef25e112fd4e59a082b8b1d9cac4bb"},{"author":{"_account_id":23068,"name":"Wang Hui","email":"wanghui71@huawei.com","username":"krejwang"},"change_message_id":"516b9542b28d91ffa6b57223f6c694c09b872a50","unresolved":false,"context_lines":[{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":""},{"line_number":1329,"context_line":"@require_context"},{"line_number":1330,"context_line":"def checkpoint_record_get(context, checkpoint_record_id):"},{"line_number":1331,"context_line":"    return _checkpoint_record_get(context, checkpoint_record_id)"},{"line_number":1332,"context_line":""},{"line_number":1333,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_f43491fc","line":1330,"range":{"start_line":1330,"start_character":55,"end_line":1330,"end_character":57},"updated":"2016-11-14 07:19:05.000000000","message":"I think here should add \u0027session\u003dNone\u0027, and in the next line it should add \u0027session\u003dsession\u0027.","commit_id":"59e13c7ba47bb28fa2ec5fd2ac9dbdd8f5c76847"},{"author":{"_account_id":17192,"name":"xiangxinyong","email":"xiangxinyong@huawei.com","username":"xianxinyong"},"change_message_id":"c531c14c5cc344a5ed149ba90f0c11bd6837560a","unresolved":false,"context_lines":[{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":""},{"line_number":1329,"context_line":"@require_context"},{"line_number":1330,"context_line":"def checkpoint_record_get(context, checkpoint_record_id):"},{"line_number":1331,"context_line":"    return _checkpoint_record_get(context, checkpoint_record_id)"},{"line_number":1332,"context_line":""},{"line_number":1333,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_c73601b4","line":1330,"range":{"start_line":1330,"start_character":55,"end_line":1330,"end_character":57},"in_reply_to":"9a629dbe_f43491fc","updated":"2016-11-15 01:06:04.000000000","message":"Hello wanghui, Thanks your review.\nBut the Line 1335 express the default \"session\" value is None\nand the users can pass other value into the function. \nSo if the line 1330 and 1335 both have \"session\" parameter,\nthis is wrong. None just express the default value.","commit_id":"59e13c7ba47bb28fa2ec5fd2ac9dbdd8f5c76847"}],"karbor/tests/unit/db/test_models.py":[{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"d0d2b204b880413c929916797f9f28ca640fb0cc","unresolved":false,"context_lines":[{"line_number":674,"context_line":""},{"line_number":675,"context_line":"    def test_checkpoint_record_create(self):"},{"line_number":676,"context_line":"        checkpoint_record \u003d db.checkpoint_record_create("},{"line_number":677,"context_line":"            self.ctxt,"},{"line_number":678,"context_line":"            self.fake_checkpoint_record)"},{"line_number":679,"context_line":"        self.assertTrue(uuidutils.is_uuid_like(checkpoint_record[\u0027id\u0027]))"},{"line_number":680,"context_line":"        self.assertEqual(\u0027available\u0027, checkpoint_record.checkpoint_status)"},{"line_number":681,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_54ecd3f2","line":678,"range":{"start_line":677,"start_character":0,"end_line":678,"end_character":39},"updated":"2016-09-13 02:31:24.000000000","message":"It would be better to move them in one line.","commit_id":"3b7ee0bd6f64a4189a816c15c250acb8eba1d08e"}]}
