)]}'
{"heat_dashboard/content/stacks/forms.py":[{"author":{"_account_id":27427,"name":"David Peacock","email":"dpeacock@redhat.com","username":"davidjpeacock"},"change_message_id":"a1bc5f6a49015cd87193cdede629755bbed4c64e","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            log_template_name \u003d files[upload_str].name"},{"line_number":204,"context_line":"            LOG.info(\u0027got upload %s\u0027, log_template_name)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"            try:"},{"line_number":207,"context_line":"                tpl \u003d files[upload_str].read().decode(\u0027utf-8\u0027)"},{"line_number":208,"context_line":"                if tpl.startswith(\u0027{\u0027):"},{"line_number":209,"context_line":"                    json.loads(tpl)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_593a5ae6","line":206,"updated":"2019-12-03 14:58:55.000000000","message":"I see what you\u0027re doing here, and like the idea.  However, since we\u0027re changing things I\u0027d like to see an improvement to the readability and ongoing maintainability of this code.\n\ntpl is not a particularly friendly variable name, and since there\u0027s a refactor going on inside this patch I\u0027d prefer to see this corrected too.  As it stands the code is a little terse to follow.\n\nCheers,\nDavid","commit_id":"129b55e2b8d3f7f9235b859a0bbf29547e3d2fd7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"21010a499311d993c6e6becb3c3593b410fc64ac","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            log_template_name \u003d files[upload_str].name"},{"line_number":204,"context_line":"            LOG.info(\u0027got upload %s\u0027, log_template_name)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"            try:"},{"line_number":207,"context_line":"                tpl \u003d files[upload_str].read().decode(\u0027utf-8\u0027)"},{"line_number":208,"context_line":"                if tpl.startswith(\u0027{\u0027):"},{"line_number":209,"context_line":"                    json.loads(tpl)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_77eb93a3","line":206,"in_reply_to":"3fa7e38b_593a5ae6","updated":"2019-12-04 04:11:33.000000000","message":"This is a backport to a stable branch, so this is not a good place to do refactoring. You can propose an improvement to the master branch if you want.","commit_id":"129b55e2b8d3f7f9235b859a0bbf29547e3d2fd7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3d0d7b606f3f772aa36ae8dab0efb2a7ee242027","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            log_template_name \u003d files[upload_str].name"},{"line_number":204,"context_line":"            LOG.info(\u0027got upload %s\u0027, log_template_name)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"            try:"},{"line_number":207,"context_line":"                tpl \u003d files[upload_str].read().decode(\u0027utf-8\u0027)"},{"line_number":208,"context_line":"                if tpl.startswith(\u0027{\u0027):"},{"line_number":209,"context_line":"                    json.loads(tpl)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_babd7204","line":206,"in_reply_to":"3fa7e38b_77eb93a3","updated":"2019-12-04 04:20:24.000000000","message":"Looking thru this file, \"tpl\" is used somewhere else. It is apparent that these logics handle template data, so I think it is okay to use \"tpl\" as a local variable inside a function/method.","commit_id":"129b55e2b8d3f7f9235b859a0bbf29547e3d2fd7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"21010a499311d993c6e6becb3c3593b410fc64ac","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            except Exception as e:"},{"line_number":212,"context_line":"                msg \u003d _(\u0027There was a problem parsing the\u0027"},{"line_number":213,"context_line":"                        \u0027 %(prefix)s: %(error)s\u0027)"},{"line_number":214,"context_line":"                msg \u003d msg % {\u0027prefix\u0027: prefix, \u0027error\u0027: six.text_type(e)}"},{"line_number":215,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        # URL handler"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_973baf37","line":214,"range":{"start_line":214,"start_character":56,"end_line":214,"end_character":72},"updated":"2019-12-04 04:11:33.000000000","message":"text_type() is unnecessary as %s handles string conversion properly (but this should go to the master branch first too).","commit_id":"129b55e2b8d3f7f9235b859a0bbf29547e3d2fd7"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3d0d7b606f3f772aa36ae8dab0efb2a7ee242027","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            except Exception as e:"},{"line_number":212,"context_line":"                msg \u003d _(\u0027There was a problem parsing the\u0027"},{"line_number":213,"context_line":"                        \u0027 %(prefix)s: %(error)s\u0027)"},{"line_number":214,"context_line":"                msg \u003d msg % {\u0027prefix\u0027: prefix, \u0027error\u0027: six.text_type(e)}"},{"line_number":215,"context_line":"                raise forms.ValidationError(msg)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        # URL handler"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_5abc7e05","line":214,"range":{"start_line":214,"start_character":56,"end_line":214,"end_character":72},"in_reply_to":"3fa7e38b_973baf37","updated":"2019-12-04 04:20:24.000000000","message":"It is minor enough.","commit_id":"129b55e2b8d3f7f9235b859a0bbf29547e3d2fd7"}]}
