)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"1bf2e5e67531ec3d6ea7215d566d4ed97ca8e311","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Béla Vancsics \u003cvancsics@inf.u-szeged.hu\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-07 15:07:22 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reduced the code complexity"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"I extracted some of the functionalities into helper functions"},{"line_number":10,"context_line":"to reduce the length and complexity of build_query."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a30ddce_8cd595ba","line":7,"updated":"2017-03-09 06:52:46.000000000","message":"I believe the term \"refactored\" is used to describe such changes.","commit_id":"3bdad887832b3ee8d97aa3b8fe30c3d0055e9e19"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"1bf2e5e67531ec3d6ea7215d566d4ed97ca8e311","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reduced the code complexity"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"I extracted some of the functionalities into helper functions"},{"line_number":10,"context_line":"to reduce the length and complexity of build_query."},{"line_number":11,"context_line":"Additionally it became more readable as well, without"},{"line_number":12,"context_line":"changing its functionality."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a30ddce_9724beaf","line":9,"range":{"start_line":9,"start_character":24,"end_line":9,"end_character":39},"updated":"2017-03-09 06:52:46.000000000","message":"A nit: functionality is a set of functions, functionalities is not a real word yet.","commit_id":"3bdad887832b3ee8d97aa3b8fe30c3d0055e9e19"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"fd15f4dc68957a5a2268886071b4a890cde39c50","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reduced the code complexity"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"I extracted some of the functionalities into helper functions"},{"line_number":10,"context_line":"to reduce the length and complexity of build_query (in"},{"line_number":11,"context_line":"watcher/datasource/ceilometer.py)."},{"line_number":12,"context_line":"Additionally it became more readable as well, without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a1ced50_8afcf93f","line":9,"range":{"start_line":9,"start_character":24,"end_line":9,"end_character":39},"updated":"2017-03-17 07:13:45.000000000","message":"AFAIK not a real word yet.","commit_id":"fd55d28d425484aa23dc070730c505f750af3d40"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"62a0a5eef9c59c75d118f91bcea83776b9fad6a4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reduced the code complexity"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"I extracted some of the functionalities into helper functions"},{"line_number":10,"context_line":"to reduce the length and complexity of build_query (in"},{"line_number":11,"context_line":"watcher/datasource/ceilometer.py)."},{"line_number":12,"context_line":"Additionally it became more readable as well, without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a1ced50_cf821a94","line":9,"range":{"start_line":9,"start_character":24,"end_line":9,"end_character":39},"in_reply_to":"1a1ced50_6f9ce5c0","updated":"2017-03-21 06:49:16.000000000","message":"I stand corrected, it is a real word indeed. However, I still believe that since it is a mass noun it should not be used in its plural form here. Please see this discussion: http://english.stackexchange.com/questions/196590/functionality-vs-functionalities-are-both-correct-and-idiomatic","commit_id":"fd55d28d425484aa23dc070730c505f750af3d40"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c58f86eddd5d28814b4e5420b64323d911286c22","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reduced the code complexity"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"I extracted some of the functionalities into helper functions"},{"line_number":10,"context_line":"to reduce the length and complexity of build_query (in"},{"line_number":11,"context_line":"watcher/datasource/ceilometer.py)."},{"line_number":12,"context_line":"Additionally it became more readable as well, without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1a1ced50_6f9ce5c0","line":9,"range":{"start_line":9,"start_character":24,"end_line":9,"end_character":39},"in_reply_to":"1a1ced50_8afcf93f","updated":"2017-03-20 14:31:32.000000000","message":"It\u0027s the singular form of functionality (see https://www.merriam-webster.com/dictionary/functionality) so that\u0027s actually a real word","commit_id":"fd55d28d425484aa23dc070730c505f750af3d40"}],"watcher/datasource/ceilometer.py":[{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"bce7f083af05bada6dd9d7e10b35740008dcea0e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.osc \u003d osc if osc else clients.OpenStackClients()"},{"line_number":33,"context_line":"        self.ceilometer \u003d self.osc.ceilometer()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _query_append(self, user_id, tenant_id, resource_id,"},{"line_number":36,"context_line":"                      user_ids, tenant_ids, resource_ids):"},{"line_number":37,"context_line":"        user_ids \u003d user_ids or []"},{"line_number":38,"context_line":"        tenant_ids \u003d tenant_ids or []"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_a214a4e8","line":35,"updated":"2017-03-06 12:13:29.000000000","message":"This could be either staticmethod or an inner definition in build_query method.","commit_id":"d74cf9d6bc9ee9f7d05830f4fe0fd0ad1f505756"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"bce7f083af05bada6dd9d7e10b35740008dcea0e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        tenant_ids \u003d tenant_ids or []"},{"line_number":39,"context_line":"        resource_ids \u003d resource_ids or []"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        query \u003d []"},{"line_number":42,"context_line":"        if user_id:"},{"line_number":43,"context_line":"            user_ids \u003d [user_id]"},{"line_number":44,"context_line":"        for u_id in user_ids:"},{"line_number":45,"context_line":"            query.append({\"field\": \"user_id\", \"op\": \"eq\", \"value\": u_id})"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        if tenant_id:"},{"line_number":48,"context_line":"            tenant_ids \u003d [tenant_id]"},{"line_number":49,"context_line":"        for t_id in tenant_ids:"},{"line_number":50,"context_line":"            query.append({\"field\": \"project_id\", \"op\": \"eq\", \"value\": t_id})"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if resource_id:"},{"line_number":53,"context_line":"            resource_ids \u003d [resource_id]"},{"line_number":54,"context_line":"        for r_id in resource_ids:"},{"line_number":55,"context_line":"            query.append({\"field\": \"resource_id\", \"op\": \"eq\", \"value\": r_id})"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        return query"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_e23cdc94","line":55,"range":{"start_line":41,"start_character":0,"end_line":55,"end_character":77},"updated":"2017-03-06 12:13:29.000000000","message":"These three code pieces look almost identical, why not to move them to a  generic helper function as well?","commit_id":"d74cf9d6bc9ee9f7d05830f4fe0fd0ad1f505756"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"bce7f083af05bada6dd9d7e10b35740008dcea0e","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        return query"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def timestamps(self, start_time, end_time):"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        def _timestamp(_time):"},{"line_number":62,"context_line":"            if _time:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba2be162_a243c4ad","line":59,"updated":"2017-03-06 12:13:29.000000000","message":"Looks like a candidate to become either a static method, or to be defined inside build_query. Also are there any plans to reuse it someplace else? If yes then probably it should be grouped together with some other utils, if no then it probably is better to start the name with an underscore.","commit_id":"d74cf9d6bc9ee9f7d05830f4fe0fd0ad1f505756"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"1bf2e5e67531ec3d6ea7215d566d4ed97ca8e311","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                      user_ids, tenant_ids, resource_ids):"},{"line_number":38,"context_line":"        query \u003d []"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        def query_append(query, _id, _ids, field):"},{"line_number":41,"context_line":"            if _id:"},{"line_number":42,"context_line":"                _ids \u003d [_id]"},{"line_number":43,"context_line":"            for x_id in _ids:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_0c7445fb","line":40,"range":{"start_line":40,"start_character":25,"end_line":40,"end_character":30},"updated":"2017-03-09 06:52:46.000000000","message":"Also it looks like you don\u0027t really need to explicitly pass query since it is defined in the enclosing scope.","commit_id":"3bdad887832b3ee8d97aa3b8fe30c3d0055e9e19"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"5a7453e57c81454d13bf5688a8b490445518c1c7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                      user_ids, tenant_ids, resource_ids):"},{"line_number":38,"context_line":"        query \u003d []"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        def query_append(query, _id, _ids, field):"},{"line_number":41,"context_line":"            if _id:"},{"line_number":42,"context_line":"                _ids \u003d [_id]"},{"line_number":43,"context_line":"            for x_id in _ids:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_cff26c9a","line":40,"range":{"start_line":40,"start_character":12,"end_line":40,"end_character":24},"updated":"2017-03-07 16:10:18.000000000","message":"nit: can you rename this function so we don\u0027t confuse it with the enclosing one or the other way around?\n\nIMHO, the enclosing static method should be renamed to something like \"format_query()\"","commit_id":"3bdad887832b3ee8d97aa3b8fe30c3d0055e9e19"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"cc6513b7cc88d145c3deb5712de3215f08f3257f","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                      user_ids, tenant_ids, resource_ids):"},{"line_number":38,"context_line":"        query \u003d []"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        def query_append(query, _id, _ids, field):"},{"line_number":41,"context_line":"            if _id:"},{"line_number":42,"context_line":"                _ids \u003d [_id]"},{"line_number":43,"context_line":"            for x_id in _ids:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_8caf5593","line":40,"range":{"start_line":40,"start_character":12,"end_line":40,"end_character":24},"in_reply_to":"9a30ddce_cff26c9a","updated":"2017-03-09 06:21:14.000000000","message":"+1","commit_id":"3bdad887832b3ee8d97aa3b8fe30c3d0055e9e19"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"cc6513b7cc88d145c3deb5712de3215f08f3257f","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _timestamps(self, start_time, end_time):"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        def _timestamp(_time):"},{"line_number":55,"context_line":"            if _time:"},{"line_number":56,"context_line":"                if isinstance(_time, datetime.datetime):"},{"line_number":57,"context_line":"                    return _time.isoformat()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_6c9a2165","line":54,"range":{"start_line":54,"start_character":12,"end_line":54,"end_character":22},"updated":"2017-03-09 06:21:14.000000000","message":"i would suggest to rename this function too.","commit_id":"3bdad887832b3ee8d97aa3b8fe30c3d0055e9e19"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"8c41ffec490f9e7a4bf0cdfc6b353d997e2ac521","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        start_timestamp \u003d _format_timestamp(start_time)"},{"line_number":62,"context_line":"        end_timestamp \u003d _format_timestamp(end_time)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        if (start_timestamp and end_timestamp and"},{"line_number":65,"context_line":"                timeutils.parse_isotime(start_timestamp) \u003e"},{"line_number":66,"context_line":"                timeutils.parse_isotime(end_timestamp)):"},{"line_number":67,"context_line":"            raise exception.Invalid("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_97867e11","line":64,"updated":"2017-03-09 07:00:18.000000000","message":"Also I strongly suggest to explicitly check against None. Or you could introduce a very subtle bug otherwise.","commit_id":"f529fd09195b1dacd57be02ab2648f682936d2bc"},{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"503a1b7591ad7669e3df8536e0cfb3f9cf404072","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        start_timestamp \u003d _format_timestamp(start_time)"},{"line_number":62,"context_line":"        end_timestamp \u003d _format_timestamp(end_time)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        if (start_timestamp and end_timestamp and"},{"line_number":65,"context_line":"                timeutils.parse_isotime(start_timestamp) \u003e"},{"line_number":66,"context_line":"                timeutils.parse_isotime(end_timestamp)):"},{"line_number":67,"context_line":"            raise exception.Invalid("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_f74fbaba","line":64,"in_reply_to":"9a30ddce_97867e11","updated":"2017-03-09 07:14:56.000000000","message":"+1","commit_id":"f529fd09195b1dacd57be02ab2648f682936d2bc"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"fd15f4dc68957a5a2268886071b4a890cde39c50","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                     user_ids, tenant_ids, resource_ids):"},{"line_number":38,"context_line":"        query \u003d []"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        def query_append(query, _id, _ids, field):"},{"line_number":41,"context_line":"            if _id:"},{"line_number":42,"context_line":"                _ids \u003d [_id]"},{"line_number":43,"context_line":"            for x_id in _ids:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_8a4eb9bf","line":40,"updated":"2017-03-17 07:13:45.000000000","message":"Do you really need to pass query as an argument here? The function looks like a simple enough and local enough helper to just reference the query in the enclosing scope. What do you think?","commit_id":"fd55d28d425484aa23dc070730c505f750af3d40"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"c58f86eddd5d28814b4e5420b64323d911286c22","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                     user_ids, tenant_ids, resource_ids):"},{"line_number":38,"context_line":"        query \u003d []"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        def query_append(query, _id, _ids, field):"},{"line_number":41,"context_line":"            if _id:"},{"line_number":42,"context_line":"                _ids \u003d [_id]"},{"line_number":43,"context_line":"            for x_id in _ids:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_6fd14557","line":40,"in_reply_to":"1a1ced50_8a4eb9bf","updated":"2017-03-20 14:31:32.000000000","message":"I personally tend to prefer having nested functions with self-contained scopes. But that\u0027s just a matter of taste, I don\u0027t mind either way.","commit_id":"fd55d28d425484aa23dc070730c505f750af3d40"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"0b100a0862fabec121e3ad44c5aded8c4f7e6ce7","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        return query"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _timestamps(self, start_time, end_time):"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        def _format_timestamp(_time):"},{"line_number":55,"context_line":"            if _time:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f013ff3_39cc0dbb","line":52,"range":{"start_line":52,"start_character":8,"end_line":52,"end_character":9},"updated":"2017-05-17 01:25:03.000000000","message":"Could you remove underscore for consistency?","commit_id":"fd55d28d425484aa23dc070730c505f750af3d40"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"0b100a0862fabec121e3ad44c5aded8c4f7e6ce7","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _timestamps(self, start_time, end_time):"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        def _format_timestamp(_time):"},{"line_number":55,"context_line":"            if _time:"},{"line_number":56,"context_line":"                if isinstance(_time, datetime.datetime):"},{"line_number":57,"context_line":"                    return _time.isoformat()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f013ff3_793735b2","line":54,"range":{"start_line":54,"start_character":12,"end_line":54,"end_character":13},"updated":"2017-05-17 01:25:03.000000000","message":"Could you remove underscore for consistency?","commit_id":"fd55d28d425484aa23dc070730c505f750af3d40"}]}
