)]}'
{"neutron_lib/db/utils.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7998479089a9cda7081b6f979457d90355a97dc8","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    \"\"\"Extract sort keys from sorts and ensure they are valid for the model."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    :param sorts: list of (key, direction) tuples"},{"line_number":23,"context_line":"    :param model: a DB model"},{"line_number":24,"context_line":"    \"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    sort_keys \u003d [s[0] for s in sorts]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_713273a8","line":23,"range":{"start_line":23,"start_character":18,"end_line":23,"end_character":20},"updated":"2016-03-18 15:59:14.000000000","message":"I think that \"DB model\" is good enough","commit_id":"a5dc86152e09935a1a2ef55828f85f42cec90add"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c0daf7d9169d45aef236a71d54e87b4040511aed","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    \"\"\"Extract sort keys from sorts and ensure they are valid for the model."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    :param sorts: list of (key, direction) tuples"},{"line_number":23,"context_line":"    :param model: a DB model"},{"line_number":24,"context_line":"    \"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    sort_keys \u003d [s[0] for s in sorts]"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_76ad32e8","line":23,"range":{"start_line":23,"start_character":18,"end_line":23,"end_character":20},"in_reply_to":"1af94dfe_713273a8","updated":"2016-03-19 01:41:57.000000000","message":"Actually I think I\u0027ll be a little more specific, since this must be a class and not an instance.","commit_id":"a5dc86152e09935a1a2ef55828f85f42cec90add"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7998479089a9cda7081b6f979457d90355a97dc8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    :param sorts: list of (key, direction) tuples"},{"line_number":49,"context_line":"    :param page_reverse: True if sort direction is reversed"},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":"    if page_reverse:"},{"line_number":52,"context_line":"        sort_dirs \u003d [\u0027desc\u0027 if s[1] else \u0027asc\u0027 for s in sorts]"},{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        sort_dirs \u003d [\u0027asc\u0027 if s[1] else \u0027desc\u0027 for s in sorts]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    return sort_dirs"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_5176573e","line":54,"range":{"start_line":51,"start_character":0,"end_line":54,"end_character":62},"updated":"2016-03-18 15:59:14.000000000","message":"sort_dirs \u003d [\u0027asc\u0027 if s[1] else \u0027desc\u0027 for s in sorts]\nif page_reverse:\n    sort_dirs \u003d [\u0027desc\u0027 if s[1] else \u0027asc\u0027 for s in sorts]","commit_id":"a5dc86152e09935a1a2ef55828f85f42cec90add"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c0daf7d9169d45aef236a71d54e87b4040511aed","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    :param sorts: list of (key, direction) tuples"},{"line_number":49,"context_line":"    :param page_reverse: True if sort direction is reversed"},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":"    if page_reverse:"},{"line_number":52,"context_line":"        sort_dirs \u003d [\u0027desc\u0027 if s[1] else \u0027asc\u0027 for s in sorts]"},{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        sort_dirs \u003d [\u0027asc\u0027 if s[1] else \u0027desc\u0027 for s in sorts]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    return sort_dirs"}],"source_content_type":"text/x-python","patch_set":2,"id":"1af94dfe_f687825e","line":54,"range":{"start_line":51,"start_character":0,"end_line":54,"end_character":62},"in_reply_to":"1af94dfe_5176573e","updated":"2016-03-19 01:41:57.000000000","message":"But then if page_reverse it True then the list is built twice. That seems inefficient to me. I\u0027ll update to get rid of the temporary local variable.","commit_id":"a5dc86152e09935a1a2ef55828f85f42cec90add"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5c7fdf0cdf7a180281f9acfb1fdfe99a55373435","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    :param sorts: list of (key, direction) tuples"},{"line_number":49,"context_line":"    :param page_reverse: True if sort direction is reversed"},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":"    if page_reverse:"},{"line_number":52,"context_line":"        return [\u0027desc\u0027 if s[1] else \u0027asc\u0027 for s in sorts]"},{"line_number":53,"context_line":"    return [\u0027asc\u0027 if s[1] else \u0027desc\u0027 for s in sorts]"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_1431130c","line":51,"updated":"2016-03-21 13:25:56.000000000","message":"Maybe not as clear, but this could be:\nreturn [\u0027asc\u0027 if s[1] ^ page_reverse else \u0027desc\u0027 for s in sorts]","commit_id":"b76a35a233408f404706c1659840453d76c5996e"}],"neutron_lib/tests/unit/db/test_utils.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"41cc72a58588e0f929bc3af64a860a26af0cc515","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def test_get_and_validate_sort_keys(self):"},{"line_number":51,"context_line":"        sorts \u003d [(\u0027name\u0027, False), (\u0027status\u0027, True)]"},{"line_number":52,"context_line":"        self. assertEqual([\u0027name\u0027, \u0027status\u0027],"},{"line_number":53,"context_line":"                          utils.get_and_validate_sort_keys(sorts, FakePort))"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_get_and_validate_sort_keys_bad_key_fails(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_c30aae25","line":52,"range":{"start_line":52,"start_character":13,"end_line":52,"end_character":14},"updated":"2016-03-18 12:22:56.000000000","message":"typo space. Here and L57, L62. Do these still work?","commit_id":"385d9cee2a4439af42b4e83fb9745596bf0fb2bd"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0f5ab3e786b5fc7b9e3cbc4b38648eb370c50099","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def test_get_and_validate_sort_keys(self):"},{"line_number":51,"context_line":"        sorts \u003d [(\u0027name\u0027, False), (\u0027status\u0027, True)]"},{"line_number":52,"context_line":"        self. assertEqual([\u0027name\u0027, \u0027status\u0027],"},{"line_number":53,"context_line":"                          utils.get_and_validate_sort_keys(sorts, FakePort))"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_get_and_validate_sort_keys_bad_key_fails(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1af94dfe_3de567a7","line":52,"range":{"start_line":52,"start_character":13,"end_line":52,"end_character":14},"in_reply_to":"1af94dfe_c30aae25","updated":"2016-03-18 13:52:07.000000000","message":"Oddly enough they do work. Thanks for catching.","commit_id":"385d9cee2a4439af42b4e83fb9745596bf0fb2bd"}]}
