)]}'
{"nova/api/openstack/compute/plugins/v3/servers.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"97c1c4f737d4047eb13c0a8b36e8063db28ce131","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                # it will use one of the available IP address from the network"},{"line_number":331,"context_line":"                address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":332,"context_line":"                if address is not None and not (utils.is_valid_ipv4(address) \\"},{"line_number":333,"context_line":"                    or utils.is_valid_ipv6(address)):"},{"line_number":334,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % address"},{"line_number":335,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B2Sw%3D","line":333,"updated":"2014-02-18 16:37:32.000000000","message":"1. The backslash is unnecessary due to the use of parentheses; please eliminate the backslash.\n\n2. Please add extra indentation to the second line of the condition to visually distinguish it from the code that follows.","commit_id":"a981d895927d9632715a249ce5d7e09c9fc1fa12"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"ce778f59c6bc02b0164323390865a453666d2aec","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                # it will use one of the available IP address from the network"},{"line_number":331,"context_line":"                address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":332,"context_line":"                if address is not None and not (utils.is_valid_ipv4(address) \\"},{"line_number":333,"context_line":"                    or utils.is_valid_ipv6(address)):"},{"line_number":334,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % address"},{"line_number":335,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F5co%3D","line":333,"in_reply_to":"AAAAUX%2F%2B2Sw%3D","updated":"2014-02-24 07:43:39.000000000","message":"Done","commit_id":"a981d895927d9632715a249ce5d7e09c9fc1fa12"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0eaa4f35f1bf996234840b84b322743a2e3c3e5e","unresolved":false,"context_lines":[{"line_number":331,"context_line":"                address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":332,"context_line":"                if address is not None and not ("},{"line_number":333,"context_line":"                    utils.is_valid_ipv4(address) or utils.is_valid_ipv6("},{"line_number":334,"context_line":"                        address)):"},{"line_number":335,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % address"},{"line_number":336,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAU3%2F%2Fyg0%3D","line":334,"updated":"2014-02-24 19:28:55.000000000","message":"You should be able to rephrase this \"if\" as:\n\n    if address is not None and not (utils.is_valid_ipv4(address) or\n                                    utils.is_valid_ipv6(address)):\n\nThis might be a bit nicer to read.  (femtonit)","commit_id":"a78a81a900eac7cbc8493b67031dae0f9e57bfed"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d3c3629a6c848dfc2e238762877c4752e0bbbdc1","unresolved":false,"context_lines":[{"line_number":331,"context_line":"                address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":332,"context_line":"                if address is not None and not ("},{"line_number":333,"context_line":"                    utils.is_valid_ipv4(address) or utils.is_valid_ipv6("},{"line_number":334,"context_line":"                        address)):"},{"line_number":335,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % address"},{"line_number":336,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAU3%2F%2Fji4%3D","line":334,"in_reply_to":"AAAAU3%2F%2FvaU%3D","updated":"2014-02-25 23:36:18.000000000","message":"\u003e\u003e\u003e len(\"\"\"                if address is not None and not (utils.is_valid_ipv4(address) or\"\"\")\n    79\n\nSo it *just* fits, but I won\u0027t fault you for that :)","commit_id":"a78a81a900eac7cbc8493b67031dae0f9e57bfed"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"d1a33607a324b7198f56a3196f66695ae0842032","unresolved":false,"context_lines":[{"line_number":331,"context_line":"                address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":332,"context_line":"                if address is not None and not ("},{"line_number":333,"context_line":"                    utils.is_valid_ipv4(address) or utils.is_valid_ipv6("},{"line_number":334,"context_line":"                        address)):"},{"line_number":335,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % address"},{"line_number":336,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAU3%2F%2FvaU%3D","line":334,"in_reply_to":"AAAAU3%2F%2Fyg0%3D","updated":"2014-02-25 01:07:58.000000000","message":"thanks for your suggestion, bu if write as:\n\u0027if address is not None and not (utils.is_valid_ipv4(address) or\u0027\nit will exceed 80 in a line.","commit_id":"a78a81a900eac7cbc8493b67031dae0f9e57bfed"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"97c1c4f737d4047eb13c0a8b36e8063db28ce131","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                #it will use one of the available IP address from the network"},{"line_number":689,"context_line":"                address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":690,"context_line":"                if address is not None and not (utils.is_valid_ipv4(address) \\"},{"line_number":691,"context_line":"                    or utils.is_valid_ipv6(address)):"},{"line_number":692,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % address"},{"line_number":693,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":694,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B2SE%3D","line":691,"updated":"2014-02-18 16:37:32.000000000","message":"Again, the backslash is unnecessary, and the second line of the condition should be more deeply indented for visual distinction from the following code.","commit_id":"a981d895927d9632715a249ce5d7e09c9fc1fa12"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"ce778f59c6bc02b0164323390865a453666d2aec","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                #it will use one of the available IP address from the network"},{"line_number":689,"context_line":"                address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":690,"context_line":"                if address is not None and not (utils.is_valid_ipv4(address) \\"},{"line_number":691,"context_line":"                    or utils.is_valid_ipv6(address)):"},{"line_number":692,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % address"},{"line_number":693,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":694,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F5cM%3D","line":691,"in_reply_to":"AAAAUX%2F%2B2SE%3D","updated":"2014-02-24 07:43:39.000000000","message":"Done","commit_id":"a981d895927d9632715a249ce5d7e09c9fc1fa12"}],"nova/network/manager.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"97c1c4f737d4047eb13c0a8b36e8063db28ce131","unresolved":false,"context_lines":[{"line_number":1339,"context_line":"            # it actually belongs to the network"},{"line_number":1340,"context_line":"            if address is not None:"},{"line_number":1341,"context_line":"                if not utils.is_valid_ipv4(address) or \\"},{"line_number":1342,"context_line":"                        not utils.is_valid_ipv6(address):"},{"line_number":1343,"context_line":"                    raise exception.FixedIpInvalid(address\u003daddress)"},{"line_number":1344,"context_line":""},{"line_number":1345,"context_line":"                fixed_ip_ref \u003d fixed_ip_obj.FixedIP.get_by_address("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B2R0%3D","line":1342,"updated":"2014-02-18 16:37:32.000000000","message":"Please use parentheses to eliminate the backslash.","commit_id":"a981d895927d9632715a249ce5d7e09c9fc1fa12"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"ce778f59c6bc02b0164323390865a453666d2aec","unresolved":false,"context_lines":[{"line_number":1339,"context_line":"            # it actually belongs to the network"},{"line_number":1340,"context_line":"            if address is not None:"},{"line_number":1341,"context_line":"                if not utils.is_valid_ipv4(address) or \\"},{"line_number":1342,"context_line":"                        not utils.is_valid_ipv6(address):"},{"line_number":1343,"context_line":"                    raise exception.FixedIpInvalid(address\u003daddress)"},{"line_number":1344,"context_line":""},{"line_number":1345,"context_line":"                fixed_ip_ref \u003d fixed_ip_obj.FixedIP.get_by_address("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F5cI%3D","line":1342,"in_reply_to":"AAAAUX%2F%2B2R0%3D","updated":"2014-02-24 07:43:39.000000000","message":"Done","commit_id":"a981d895927d9632715a249ce5d7e09c9fc1fa12"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0eaa4f35f1bf996234840b84b322743a2e3c3e5e","unresolved":false,"context_lines":[{"line_number":1339,"context_line":"            # it actually belongs to the network"},{"line_number":1340,"context_line":"            if address is not None:"},{"line_number":1341,"context_line":"                if not (utils.is_valid_ipv4(address) or"},{"line_number":1342,"context_line":"                            utils.is_valid_ipv6(address)):"},{"line_number":1343,"context_line":"                    raise exception.FixedIpInvalid(address\u003daddress)"},{"line_number":1344,"context_line":""},{"line_number":1345,"context_line":"                fixed_ip_ref \u003d fixed_ip_obj.FixedIP.get_by_address("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAU3%2F%2FyeQ%3D","line":1342,"updated":"2014-02-24 19:28:55.000000000","message":"With the change you introduced here, the second line of the condition is indented a little more than needed for the visual differentiation I requested.  You could phrase this as:\n\n    if not (utils.is_valid_ipv4(address) or\n            utils.is_valid_ipv6(address)):\n\nWhat I\u0027m trying to avoid is code that looks like this:\n\n    if (not utils.is_valid_ipv4(address) or\n        not utils.is_valid_ipv6(address)):\n        raise exception.FixedIpInvalid(address\u003daddress)\n\nNotice how, in this example, the code is at the same indentation level as the second line of the condition, and it\u0027s hard to visually distinguish between the expression fragment and the code?\n\n(femtonit)","commit_id":"a78a81a900eac7cbc8493b67031dae0f9e57bfed"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"d1a33607a324b7198f56a3196f66695ae0842032","unresolved":false,"context_lines":[{"line_number":1339,"context_line":"            # it actually belongs to the network"},{"line_number":1340,"context_line":"            if address is not None:"},{"line_number":1341,"context_line":"                if not (utils.is_valid_ipv4(address) or"},{"line_number":1342,"context_line":"                            utils.is_valid_ipv6(address)):"},{"line_number":1343,"context_line":"                    raise exception.FixedIpInvalid(address\u003daddress)"},{"line_number":1344,"context_line":""},{"line_number":1345,"context_line":"                fixed_ip_ref \u003d fixed_ip_obj.FixedIP.get_by_address("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAU3%2F%2FvZc%3D","line":1342,"in_reply_to":"AAAAU3%2F%2FyeQ%3D","updated":"2014-02-25 01:07:58.000000000","message":"thanks for your suggestion, I agree with you!","commit_id":"a78a81a900eac7cbc8493b67031dae0f9e57bfed"}]}
