)]}'
{"glance/api/v3/artifacts.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"9898f85f304e7de8422e540ab4deb2266757fde0","unresolved":false,"context_lines":[{"line_number":709,"context_line":"                if \u0027.\u0027 in value:"},{"line_number":710,"context_line":"                    name, value \u003d value.split(\u0027.\u0027, 1)"},{"line_number":711,"context_line":"                    name \u003d filter + \u0027.\u0027 + name"},{"line_number":712,"context_line":"                    value \u003d self._bring_to_type(str_type, value)"},{"line_number":713,"context_line":"                else:"},{"line_number":714,"context_line":"                    name \u003d filter + \u0027.\u0027 + value"},{"line_number":715,"context_line":"                    value \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_939e2455","line":712,"updated":"2015-08-18 09:32:57.000000000","message":"It is not recommended to use one variable for different purposes.\nI would recommend to use name, value to store parts of the filter and one additional variable that contain resulting filter name and value. It is easier to read and can prevent from errors in code.","commit_id":"e5bdcdb21fde5e939f9ea21a428b65ea84f91522"},{"author":{"_account_id":8127,"name":"Alexander Tivelkov","email":"locher@yandex.ru","username":"ativelkov"},"change_message_id":"966fe26f7caa217e2ef172416b615d2f020d3648","unresolved":false,"context_lines":[{"line_number":709,"context_line":"                if \u0027.\u0027 in value:"},{"line_number":710,"context_line":"                    name, value \u003d value.split(\u0027.\u0027, 1)"},{"line_number":711,"context_line":"                    name \u003d filter + \u0027.\u0027 + name"},{"line_number":712,"context_line":"                    value \u003d self._bring_to_type(str_type, value)"},{"line_number":713,"context_line":"                else:"},{"line_number":714,"context_line":"                    name \u003d filter + \u0027.\u0027 + value"},{"line_number":715,"context_line":"                    value \u003d None"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_f9dbc119","line":712,"in_reply_to":"fa1b9901_939e2455","updated":"2015-08-18 10:14:18.000000000","message":"Agree. However, as \u0027name\u0027 and \u0027value\u0027 are used for the same purpose in different execution branch I\u0027d prefer to rename the variables which store the parts: they have different purpose indeed.","commit_id":"e5bdcdb21fde5e939f9ea21a428b65ea84f91522"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"c82f35e826c14fed713a8ef1485adfaf64bc2168","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                if isinstance(prop_type.properties, dict):"},{"line_number":711,"context_line":"                    if key not in prop_type.properties:"},{"line_number":712,"context_line":"                        raise webob.exc.HTTPBadRequest(\u0027Unexpected filter \u0027"},{"line_number":713,"context_line":"                                                       \u0027property\u0027)"},{"line_number":714,"context_line":"                    prop_type \u003d prop_type.properties[key]"},{"line_number":715,"context_line":"                else:"},{"line_number":716,"context_line":"                    prop_type \u003d prop_type.properties"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_b7c55f5c","line":713,"updated":"2015-08-27 10:04:29.000000000","message":"Not reason for -1 but\nwe can avoid checking of properties twice if we will use\nprop_type \u003d prop.type.properties.get(key)\nif prop_type is None:\n    raise","commit_id":"8dd6ef816750c8db1b0778cbb2265f933a9805ec"},{"author":{"_account_id":8127,"name":"Alexander Tivelkov","email":"locher@yandex.ru","username":"ativelkov"},"change_message_id":"f528d664d2c9118fd3320dd8da843db6f1f7dadc","unresolved":false,"context_lines":[{"line_number":710,"context_line":"                if isinstance(prop_type.properties, dict):"},{"line_number":711,"context_line":"                    if key not in prop_type.properties:"},{"line_number":712,"context_line":"                        raise webob.exc.HTTPBadRequest(\u0027Unexpected filter \u0027"},{"line_number":713,"context_line":"                                                       \u0027property\u0027)"},{"line_number":714,"context_line":"                    prop_type \u003d prop_type.properties[key]"},{"line_number":715,"context_line":"                else:"},{"line_number":716,"context_line":"                    prop_type \u003d prop_type.properties"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_89d560ba","line":713,"in_reply_to":"da20952f_b7c55f5c","updated":"2015-08-28 09:52:21.000000000","message":"Done","commit_id":"8dd6ef816750c8db1b0778cbb2265f933a9805ec"}],"glance/db/sqlalchemy/artifacts.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"c82f35e826c14fed713a8ef1485adfaf64bc2168","unresolved":false,"context_lines":[{"line_number":533,"context_line":"                cond.append("},{"line_number":534,"context_line":"                    models.ArtifactProperty.position \u003d\u003d db_prop_position)"},{"line_number":535,"context_line":"            if db_prop_op \u003d\u003d \u0027IN\u0027:"},{"line_number":536,"context_line":"                if (db_prop_position is not None and"},{"line_number":537,"context_line":"                        db_prop_position is not \u0027any\u0027):"},{"line_number":538,"context_line":"                    msg \u003d _LE(\"Cannot use this parameter with \""},{"line_number":539,"context_line":"                              \"the operator IN\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_542ba1eb","line":536,"updated":"2015-08-27 10:04:29.000000000","message":"It seems you can replace this with \nif db_prop_position \u003d\u003d \u0027any\u0027:\n    cond\nelse:\n    raise","commit_id":"8dd6ef816750c8db1b0778cbb2265f933a9805ec"},{"author":{"_account_id":8127,"name":"Alexander Tivelkov","email":"locher@yandex.ru","username":"ativelkov"},"change_message_id":"f528d664d2c9118fd3320dd8da843db6f1f7dadc","unresolved":false,"context_lines":[{"line_number":533,"context_line":"                cond.append("},{"line_number":534,"context_line":"                    models.ArtifactProperty.position \u003d\u003d db_prop_position)"},{"line_number":535,"context_line":"            if db_prop_op \u003d\u003d \u0027IN\u0027:"},{"line_number":536,"context_line":"                if (db_prop_position is not None and"},{"line_number":537,"context_line":"                        db_prop_position is not \u0027any\u0027):"},{"line_number":538,"context_line":"                    msg \u003d _LE(\"Cannot use this parameter with \""},{"line_number":539,"context_line":"                              \"the operator IN\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_a97aa4ef","line":536,"in_reply_to":"da20952f_542ba1eb","updated":"2015-08-28 09:52:21.000000000","message":"Agree.","commit_id":"8dd6ef816750c8db1b0778cbb2265f933a9805ec"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"c82f35e826c14fed713a8ef1485adfaf64bc2168","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                              \"the operator IN\")"},{"line_number":540,"context_line":"                    LOG.error(msg)"},{"line_number":541,"context_line":"                    raise exception.ArtifactInvalidPropertyParameter(op\u003d\u0027IN\u0027)"},{"line_number":542,"context_line":"                cond \u003d [result,"},{"line_number":543,"context_line":"                        models.ArtifactProperty.position \u003e\u003d 0]"},{"line_number":544,"context_line":"        else:"},{"line_number":545,"context_line":"            msg \u003d _LE(\"Operator %s is not supported\") % db_prop_op"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_94e5b9a9","line":542,"updated":"2015-08-27 10:04:29.000000000","message":"So we will be here if and only if do_prop_position is \u0027any\u0027.\nSo you can replace this with cond.append(models.ArtifactProperty...]","commit_id":"8dd6ef816750c8db1b0778cbb2265f933a9805ec"},{"author":{"_account_id":8127,"name":"Alexander Tivelkov","email":"locher@yandex.ru","username":"ativelkov"},"change_message_id":"f528d664d2c9118fd3320dd8da843db6f1f7dadc","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                              \"the operator IN\")"},{"line_number":540,"context_line":"                    LOG.error(msg)"},{"line_number":541,"context_line":"                    raise exception.ArtifactInvalidPropertyParameter(op\u003d\u0027IN\u0027)"},{"line_number":542,"context_line":"                cond \u003d [result,"},{"line_number":543,"context_line":"                        models.ArtifactProperty.position \u003e\u003d 0]"},{"line_number":544,"context_line":"        else:"},{"line_number":545,"context_line":"            msg \u003d _LE(\"Operator %s is not supported\") % db_prop_op"}],"source_content_type":"text/x-python","patch_set":11,"id":"da20952f_695b2c88","line":542,"in_reply_to":"da20952f_94e5b9a9","updated":"2015-08-28 09:52:21.000000000","message":"Done","commit_id":"8dd6ef816750c8db1b0778cbb2265f933a9805ec"}]}
