)]}'
{"openstack_dashboard/dashboards/project/instances/workflows/create_instance.py":[{"author":{"_account_id":7020,"name":"Joe Hakim Rahme","email":"jhakimra@redhat.com","username":"rahmu"},"change_message_id":"55032b7d9f064bf5d8b5e5aa24931e98aabf915a","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            if ("},{"line_number":384,"context_line":"                context.get(\u0027image_id\u0027) \u003d\u003d image.id"},{"line_number":385,"context_line":"                and not context.get(\u0027volume_size\u0027)"},{"line_number":386,"context_line":"            ):"},{"line_number":387,"context_line":"                context[\u0027volume_size\u0027] \u003d image.volume_size"},{"line_number":388,"context_line":"        if choices:"},{"line_number":389,"context_line":"            choices.sort(key\u003dlambda c: c[1].name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BedE%3D","line":386,"updated":"2014-01-25 11:08:20.000000000","message":"Why would you split this on multiple lines? It can fit on one line and still remain \u003c 80 chars:\n\n    if context.get(\u0027image_id\u0027) \u003d\u003d image.id and not context.get(\u0027volume_size\u0027):\n        ...","commit_id":"4fc19927cb989e343fdd1e6c92cd74f501e3208b"},{"author":{"_account_id":7020,"name":"Joe Hakim Rahme","email":"jhakimra@redhat.com","username":"rahmu"},"change_message_id":"88eb265ebeddb46ee66aee0d9f8d97945128af31","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            if ("},{"line_number":384,"context_line":"                context.get(\u0027image_id\u0027) \u003d\u003d image.id"},{"line_number":385,"context_line":"                and not context.get(\u0027volume_size\u0027)"},{"line_number":386,"context_line":"            ):"},{"line_number":387,"context_line":"                context[\u0027volume_size\u0027] \u003d image.volume_size"},{"line_number":388,"context_line":"        if choices:"},{"line_number":389,"context_line":"            choices.sort(key\u003dlambda c: c[1].name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BaBc%3D","line":386,"in_reply_to":"AAAAUH%2F%2BaHs%3D","updated":"2014-01-27 09:26:02.000000000","message":"Fair enough, I had missed the indentation somehow.\n\nI still think that the way you\u0027re splitting the line is awkward. Instead of using the unnecessary parens to create implicit continuation, PEP8 suggests using a backslash. It also suggests splitting the line *after* the operator, so your line would be:\n\n    if context.get(\u0027image_id\u0027) \u003d\u003d image.id and \\\n        not context.get(\u0027volume_size\u0027):\n        ...","commit_id":"4fc19927cb989e343fdd1e6c92cd74f501e3208b"},{"author":{"_account_id":8674,"name":"Yves-Gwenael Bourhis","email":"ygbourhis@gmail.com","username":"yves"},"change_message_id":"72e780deb7258c03114b1b2b155d0eddae30656f","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            if ("},{"line_number":384,"context_line":"                context.get(\u0027image_id\u0027) \u003d\u003d image.id"},{"line_number":385,"context_line":"                and not context.get(\u0027volume_size\u0027)"},{"line_number":386,"context_line":"            ):"},{"line_number":387,"context_line":"                context[\u0027volume_size\u0027] \u003d image.volume_size"},{"line_number":388,"context_line":"        if choices:"},{"line_number":389,"context_line":"            choices.sort(key\u003dlambda c: c[1].name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BaHs%3D","line":386,"in_reply_to":"AAAAUH%2F%2BedE%3D","updated":"2014-01-27 09:13:09.000000000","message":"Hi Joe, it does exceed the 80 chars because this \"if\" clause is already indented by 12 chars (3 indents), If I copy paste your example above:\n\n  yves@paradox ~/openstack/horizon $ ./run_tests.sh -p\n  Checking environment.\n  Environment is up to date.\n  Running flake8 ...\n  ./openstack_dashboard/dashboards/project/instances/workflows /create_instance.py:383:80: E501 line too long (86 \u003e 79 characters)","commit_id":"4fc19927cb989e343fdd1e6c92cd74f501e3208b"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"6ebfa6a27254a0d5e14a0583348e4c8799bcb746","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                            break  # Not necessary to continue the tests."},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"                    volume_size \u003d cleaned_data.get(\u0027volume_size\u0027, \u00270\u0027)"},{"line_number":242,"context_line":"                    if volume_size and source_type \u003d\u003d \u0027volume_image_id\u0027:"},{"line_number":243,"context_line":"                        if not volume_size.isdigit():"},{"line_number":244,"context_line":"                            msg \u003d _("},{"line_number":245,"context_line":"                                \u0027The Volume size has to be an integer value\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUX%2F%2Bp2o%3D","line":242,"updated":"2014-02-20 00:09:39.000000000","message":"It would be better to just change the volume_size field to be an IntegerField for this case and let django handle the input validation.","commit_id":"b8376591429ea92cbc4589de100ebb5ee472f2d3"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"0e591b1c413e07f12aef1462561101d92ebb528f","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                            break  # Not necessary to continue the tests."},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"                    volume_size \u003d cleaned_data.get(\u0027volume_size\u0027, \u00270\u0027)"},{"line_number":242,"context_line":"                    if volume_size and source_type \u003d\u003d \u0027volume_image_id\u0027:"},{"line_number":243,"context_line":"                        if not volume_size.isdigit():"},{"line_number":244,"context_line":"                            msg \u003d _("},{"line_number":245,"context_line":"                                \u0027The Volume size has to be an integer value\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUX%2F%2BoJA%3D","line":242,"in_reply_to":"AAAAUX%2F%2Bp2o%3D","updated":"2014-02-20 05:32:27.000000000","message":"+1, and the help_text of volume_size refers to integer value, CharField is not consistent.","commit_id":"b8376591429ea92cbc4589de100ebb5ee472f2d3"},{"author":{"_account_id":7020,"name":"Joe Hakim Rahme","email":"jhakimra@redhat.com","username":"rahmu"},"change_message_id":"1f97621d70604ed826ce979aaa4c7cdfcc7b2000","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            if ("},{"line_number":394,"context_line":"                context.get(\u0027image_id\u0027) \u003d\u003d image.id"},{"line_number":395,"context_line":"                and not context.get(\u0027volume_size\u0027)"},{"line_number":396,"context_line":"            ):"},{"line_number":397,"context_line":"                context[\u0027volume_size\u0027] \u003d image.volume_size"},{"line_number":398,"context_line":"        if choices:"},{"line_number":399,"context_line":"            choices.sort(key\u003dlambda c: c[1].name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9Xac%3D","line":396,"updated":"2014-02-07 12:31:26.000000000","message":"I still find this stylistically offensive:\n\n+ You\u0027re uselessly relying on parenthesis\u0027 implicit line continuation instead of using a backslash.\n\n+ PEP 8 recommends breaking the line after the binary operator, not before.\n\n+ That\u0027s a poor and confusing way of testing the existence of \u0027volume\u0027 in context.\n\nI would rewrite it like this:\n\nif context.get(\u0027image_id\u0027) \u003d\u003d image.id and \\\n    \u0027volume_size\u0027 not in context:\n     ...","commit_id":"b8376591429ea92cbc4589de100ebb5ee472f2d3"}]}
