)]}'
{"manila_ui/dashboards/admin/shares/forms.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"bcbc9bfc09d95bbc75f789adbaf7bbd973b38923","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    protocol \u003d forms.ChoiceField("},{"line_number":57,"context_line":"        label\u003d_(\"Share Protocol\"), required\u003dTrue,"},{"line_number":58,"context_line":"        choices\u003d((\u0027NFS\u0027, \u0027NFS\u0027), (\u0027CIFS\u0027, \u0027CIFS\u0027), (\u0027GlusterFS\u0027, \u0027GlusterFS\u0027),"},{"line_number":59,"context_line":"                 (\u0027HDFS\u0027, \u0027HDFS\u0027), (\u0027CEPHFS\u0027, \u0027CEPHFS\u0027)))"},{"line_number":60,"context_line":"    share_type \u003d forms.ChoiceField(label\u003d_(\"Share Type\"), required\u003dTrue)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    driver_options \u003d forms.CharField("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_06e07695","line":59,"range":{"start_line":59,"start_character":37,"end_line":59,"end_character":43},"updated":"2016-05-04 16:28:26.000000000","message":"Shouldn\u0027t this be \u0027CephFS\u0027 ?","commit_id":"d4b4bd7075da0eddcb578cb09bc41cbc19444c27"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"12d68a74da3dd44d1c13e6fa6fa6094f59694b3f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    protocol \u003d forms.ChoiceField("},{"line_number":57,"context_line":"        label\u003d_(\"Share Protocol\"), required\u003dTrue,"},{"line_number":58,"context_line":"        choices\u003d((\u0027NFS\u0027, \u0027NFS\u0027), (\u0027CIFS\u0027, \u0027CIFS\u0027), (\u0027GlusterFS\u0027, \u0027GlusterFS\u0027),"},{"line_number":59,"context_line":"                 (\u0027HDFS\u0027, \u0027HDFS\u0027), (\u0027CEPHFS\u0027, \u0027CEPHFS\u0027)))"},{"line_number":60,"context_line":"    share_type \u003d forms.ChoiceField(label\u003d_(\"Share Type\"), required\u003dTrue)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    driver_options \u003d forms.CharField("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_9db5f07f","line":59,"range":{"start_line":59,"start_character":37,"end_line":59,"end_character":43},"in_reply_to":"1a122d0e_06e07695","updated":"2016-05-04 17:07:04.000000000","message":"Done","commit_id":"d4b4bd7075da0eddcb578cb09bc41cbc19444c27"}],"manila_ui/dashboards/project/shares/shares/forms.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"bcbc9bfc09d95bbc75f789adbaf7bbd973b38923","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def __init__(self, request, *args, **kwargs):"},{"line_number":53,"context_line":"        super(CreateForm, self).__init__(request, *args, **kwargs)"},{"line_number":54,"context_line":"        share_protos \u003d (\u0027NFS\u0027, \u0027CIFS\u0027, \u0027GlusterFS\u0027, \u0027HDFS\u0027, \u0027CEPHFS\u0027)"},{"line_number":55,"context_line":"        share_networks \u003d manila.share_network_list(request)"},{"line_number":56,"context_line":"        share_types \u003d manila.share_type_list(request)"},{"line_number":57,"context_line":"        self.fields[\u0027share_type\u0027].choices \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_46970eeb","line":54,"range":{"start_line":54,"start_character":61,"end_line":54,"end_character":67},"updated":"2016-05-04 16:28:26.000000000","message":"CephFS","commit_id":"d4b4bd7075da0eddcb578cb09bc41cbc19444c27"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"12d68a74da3dd44d1c13e6fa6fa6094f59694b3f","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def __init__(self, request, *args, **kwargs):"},{"line_number":53,"context_line":"        super(CreateForm, self).__init__(request, *args, **kwargs)"},{"line_number":54,"context_line":"        share_protos \u003d (\u0027NFS\u0027, \u0027CIFS\u0027, \u0027GlusterFS\u0027, \u0027HDFS\u0027, \u0027CEPHFS\u0027)"},{"line_number":55,"context_line":"        share_networks \u003d manila.share_network_list(request)"},{"line_number":56,"context_line":"        share_types \u003d manila.share_type_list(request)"},{"line_number":57,"context_line":"        self.fields[\u0027share_type\u0027].choices \u003d ("}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_5d623817","line":54,"range":{"start_line":54,"start_character":61,"end_line":54,"end_character":67},"in_reply_to":"1a122d0e_46970eeb","updated":"2016-05-04 17:07:04.000000000","message":"Done","commit_id":"d4b4bd7075da0eddcb578cb09bc41cbc19444c27"}],"manila_ui/dashboards/project/shares/shares/views.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"bcbc9bfc09d95bbc75f789adbaf7bbd973b38923","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            if len(export_location[\"path\"]) \u003e size:"},{"line_number":65,"context_line":"                size \u003d len(export_location[\"path\"])"},{"line_number":66,"context_line":"        return size"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_66620a18","line":65,"range":{"start_line":65,"start_character":23,"end_line":65,"end_character":50},"updated":"2016-05-04 16:28:26.000000000","message":"You could refactor this to only invoke \u0027len(export_location[\"path\"]\u0027 once.","commit_id":"d4b4bd7075da0eddcb578cb09bc41cbc19444c27"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"12d68a74da3dd44d1c13e6fa6fa6094f59694b3f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            if len(export_location[\"path\"]) \u003e size:"},{"line_number":65,"context_line":"                size \u003d len(export_location[\"path\"])"},{"line_number":66,"context_line":"        return size"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_3d33fc14","line":65,"range":{"start_line":65,"start_character":23,"end_line":65,"end_character":50},"in_reply_to":"1a122d0e_66620a18","updated":"2016-05-04 17:07:04.000000000","message":"Done","commit_id":"d4b4bd7075da0eddcb578cb09bc41cbc19444c27"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"b2d720696cf532b276fb88774b9bbed0ac1a9841","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_50dcdf17","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"updated":"2016-05-04 17:14:32.000000000","message":"Wouldn\u0027t this be simpler?\n\n    size \u003d 40\n    for export_location in export_locations:\n        size \u003d max(size, len(export_location[\"path\"])","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"00d58e032c06459d2ed7a99e82e491bf98d81756","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_ebe75a3e","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"1a122d0e_147d1b1c","updated":"2016-05-06 10:42:25.000000000","message":"Or even more pythonic with a one-liner:\n    size \u003d max(40, *[len(el[\u0027path\u0027]) for el in export_locations])\nSeriously though, there is probably not that much difference between these implementations.","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"e2ecd67dff17f42739a64d35e6d4f099e5766121","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_872bba94","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"1a122d0e_147d1b1c","updated":"2016-05-05 12:36:29.000000000","message":"it is more pythonic :)","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"6a8f7cda6d7c267501bb207266da4cc1071663fd","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_f83a1bcc","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"1a122d0e_50dcdf17","updated":"2016-05-05 05:05:21.000000000","message":"+1","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"c70b871f0755e309bc710e0694652fd5d0aec4cf","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_147d1b1c","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"1a122d0e_f83a1bcc","updated":"2016-05-05 10:02:35.000000000","message":"Simpler in which way?\n\nIt is 2,5 times slower than existing one. And both are easy-to-read. Don\u0027t see reason to use proposed variant instead of existing.","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"332cdcddb3711b5a1ec2aae77ce564ad95349f21","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_f05f420c","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"dab17558_7eadea30","updated":"2016-05-06 14:03:43.000000000","message":"Agree with Alexey, my suggestion was about readability not speed.  No sense arguing over a minor difference here.","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":6938,"name":"Alexey Ovchinnikov","email":"aovchinnikov@mirantis.com","username":"aovchinnikov"},"change_message_id":"05d77d63ffd7846d01ccdf711ecfbfe162a4afd6","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_7eadea30","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"dab17558_abca724d","updated":"2016-05-06 11:29:34.000000000","message":"Hmm, well, you can replace (x, *[...]) with ([x] + [...]), this might improve the timing by a few microseconds (but for what?). \nI firmly believe that this is not an issue of speed, but rather of code readability. In my opinion the original one reads easily, the others slightly less so. So still not that much difference.","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"b9e6896d20d5e85ddaefaf6f2515a1f87b285572","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_ec55a2c6","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"dab17558_d93182ee","updated":"2016-05-06 17:03:14.000000000","message":":-)  There will be far more important things to argue about!","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"2801f5a1a74fc60e3ba8cafda860fbe1f61318c2","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_abca724d","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"dab17558_ebe75a3e","updated":"2016-05-06 10:52:14.000000000","message":"This one is slower too. But a little bit faster than Clinton\u0027s variant.\n\nHere is average results:\n\n0.00193381309509 (Valeriy\u0027s variant)\n0.00451397895813 (Clinton\u0027s variant)\n0.00390410423279 (Alexey\u0027s variant)","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"d69a287205d6083a5a05656070dab12cf44cf510","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def _calculate_size_of_longest_export_location(self, export_locations):"},{"line_number":62,"context_line":"        size \u003d 40"},{"line_number":63,"context_line":"        for export_location in export_locations:"},{"line_number":64,"context_line":"            current_size \u003d len(export_location[\"path\"])"},{"line_number":65,"context_line":"            if current_size \u003e size:"},{"line_number":66,"context_line":"                size \u003d current_size"},{"line_number":67,"context_line":"        return size"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def get_context_data(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dab17558_d93182ee","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":35},"in_reply_to":"dab17558_f05f420c","updated":"2016-05-06 16:34:49.000000000","message":"I disagree with CK. I just read the \"arguing\" and I think it was awesome. :)  OK so perhaps it isn\u0027t worth a -1 or code change, but nice job on trying to reduce code, be pythonic, improve performance. For such a trivial matter the above discussion was a good read. Who could have guessed Valeriy would win.  :)","commit_id":"61023d866a579b16639ff9d17f946d3e5e1a5ee6"}]}
