)]}'
{"openstack_dashboard/dashboards/project/stacks/forms.py":[{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"772fbcf9e9437909ad0b5a06e44097904ec82a16","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                                        widget\u003dforms.Select(attrs\u003d{"},{"line_number":98,"context_line":"                                            \u0027class\u0027: \u0027switchable\u0027,"},{"line_number":99,"context_line":"                                            \u0027data-slug\u0027: \u0027envsource\u0027}),"},{"line_number":100,"context_line":"                                        required\u003dFalse)"},{"line_number":101,"context_line":"    environment_upload \u003d forms.FileField("},{"line_number":102,"context_line":"        label\u003d_(\u0027Environment File\u0027),"},{"line_number":103,"context_line":"        help_text\u003d_(\u0027A local environment to upload.\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BBf4%3D","line":100,"updated":"2014-01-30 22:03:27.000000000","message":"Surprised flake didn\u0027t ding you on this, but PEP8 says that if you put method call parameters on multiple lines like this, they should line up, so choices should be right under label. That said, if it passes, then by all means leave it.\n\nIt is a pretty dense line though, consider pulling the values for each parameter into variables above the call and just passing in the references.","commit_id":"cceb298dea0cadf75f7fdebef86b35e15a624914"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"772fbcf9e9437909ad0b5a06e44097904ec82a16","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                                      \u0027class\u0027: \u0027switched\u0027,"},{"line_number":122,"context_line":"                                      \u0027data-switch-on\u0027: \u0027envsource\u0027,"},{"line_number":123,"context_line":"                                      \u0027data-envsource-raw\u0027:"},{"line_number":124,"context_line":"_(\u0027Environment Data\u0027)}),"},{"line_number":125,"context_line":"        required\u003dFalse)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BBfA%3D","line":124,"updated":"2014-01-30 22:03:27.000000000","message":"Same here, consider a separate variable for the attrs contents so you don\u0027t have so much data crammed onto the right side of the screen.","commit_id":"cceb298dea0cadf75f7fdebef86b35e15a624914"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"772fbcf9e9437909ad0b5a06e44097904ec82a16","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        return cleaned"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def clean_uploaded_files(self, prefix, cleaned):"},{"line_number":157,"context_line":"        upload_str \u003d prefix + \"_upload\""},{"line_number":158,"context_line":"        data_str \u003d prefix + \"_data\""},{"line_number":159,"context_line":"        url \u003d cleaned.get(prefix + \u0027_url\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BBek%3D","line":156,"updated":"2014-01-30 22:03:27.000000000","message":"This should have docstrings; it\u0027s unclear what cleaned should contain.\n\nEdit: You\u0027re also changing its contents in this call, which should definitely be communicated to the caller in a docstring.","commit_id":"cceb298dea0cadf75f7fdebef86b35e15a624914"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"772fbcf9e9437909ad0b5a06e44097904ec82a16","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        # Uploaded file handler"},{"line_number":165,"context_line":"        if has_upload and not url:"},{"line_number":166,"context_line":"            log_template_name \u003d files[upload_str].name"},{"line_number":167,"context_line":"            LOG.info(\u0027got upload %s\u0027 % log_template_name)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"            tpl \u003d files[upload_str].read()"},{"line_number":170,"context_line":"            if tpl.startswith(\u0027{\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BBec%3D","line":167,"updated":"2014-01-30 22:03:27.000000000","message":"Should we reduce this back to debug instead of info?","commit_id":"cceb298dea0cadf75f7fdebef86b35e15a624914"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"772fbcf9e9437909ad0b5a06e44097904ec82a16","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            msg \u003d msg % prefix"},{"line_number":184,"context_line":"            raise forms.ValidationError(msg)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        elif(prefix \u003d\u003d \u0027template\u0027):"},{"line_number":187,"context_line":"            # Check for raw template input - blank environment allowed"},{"line_number":188,"context_line":"            if not url and not data:"},{"line_number":189,"context_line":"                msg \u003d _(\u0027You must specify a template via one of the \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BBds%3D","line":186,"updated":"2014-01-30 22:03:27.000000000","message":"Remove the (), none of the other clauses have them.","commit_id":"cceb298dea0cadf75f7fdebef86b35e15a624914"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"d6a099fcdddd939e64dff537fc3a7b23b062505b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                                        widget\u003dforms.Select(attrs\u003dattributes))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    attributes[\u0027class\u0027] \u003d _(\u0027switched\u0027)"},{"line_number":72,"context_line":"    attributes[\u0027data-source-file\u0027] \u003d _(\u0027Template File\u0027)"},{"line_number":73,"context_line":"    template_upload \u003d forms.FileField("},{"line_number":74,"context_line":"        label\u003d_(\u0027Template File\u0027),"},{"line_number":75,"context_line":"        help_text\u003d_(\u0027A local template to upload.\u0027),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F98tI%3D","line":72,"updated":"2014-01-31 19:08:59.000000000","message":"This is slightly awkward. Why set them later separate from the static dict definition when attributes is first declared? Unless ChoiceField is doing some sort of weird copy thing, it\u0027s likely still affected by these additions.","commit_id":"56cda3a3e1e172075d19a66108ef97345cb7b371"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"d6a099fcdddd939e64dff537fc3a7b23b062505b","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    environment_data \u003d forms.CharField("},{"line_number":122,"context_line":"        label\u003d_(\u0027Environment Data\u0027),"},{"line_number":123,"context_line":"        help_text\u003d_(\u0027The raw contents of the environment file.\u0027),"},{"line_number":124,"context_line":"        widget\u003dforms.widgets.Textarea(attrs\u003dattributes),"},{"line_number":125,"context_line":"        required\u003dFalse)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F98qw%3D","line":124,"updated":"2014-01-31 19:08:59.000000000","message":"Ah, ok, I\u0027m guessing the forms objects do some sort of point-in-time thing, in which case you\u0027re doing a reusable bag sort of approach.\n\nIf you\u0027re sure the forms objects aren\u0027t storing a handle to the attributes dict, this is wonky, but not dangerous. If you\u0027re not sure, then you\u0027re screwing up your data passed to each one.","commit_id":"56cda3a3e1e172075d19a66108ef97345cb7b371"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"d6a099fcdddd939e64dff537fc3a7b23b062505b","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        Keyword arguments:"},{"line_number":164,"context_line":"        prefix -- the prefix (template or environment) of the form fields"},{"line_number":165,"context_line":"        cleaned -- the \u0027cleaned\u0027 dict returned by the superclass\u0027 clean()"},{"line_number":166,"context_line":"        \"\"\""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        upload_str \u003d prefix + \"_upload\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F98qg%3D","line":165,"updated":"2014-01-31 19:08:59.000000000","message":"There\u0027s a format for this:\n\n:param prefix: description of what it does\n:type  prefix: string  (generally, the data type).","commit_id":"56cda3a3e1e172075d19a66108ef97345cb7b371"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"9f2f6335c3aaab6e7a894559869a95964a3d1d0e","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def create_upload_form_attributes(prefix, input_type, name):"},{"line_number":57,"context_line":"    attributes \u003d {\u0027class\u0027: \u0027switched\u0027, \u0027data-switch-on\u0027: prefix + \u0027source\u0027}"},{"line_number":58,"context_line":"    attributes[\u0027data-\u0027 + prefix + \u0027source-\u0027 + input_type] \u003d _(name)"},{"line_number":59,"context_line":"    return attributes"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F98LM%3D","line":57,"updated":"2014-01-31 21:17:53.000000000","message":"Missing docstring.","commit_id":"170571a5a36fdb96c4f81964d90b04758bdeb1a0"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"9f2f6335c3aaab6e7a894559869a95964a3d1d0e","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def create_upload_form_attributes(prefix, input_type, name):"},{"line_number":57,"context_line":"    attributes \u003d {\u0027class\u0027: \u0027switched\u0027, \u0027data-switch-on\u0027: prefix + \u0027source\u0027}"},{"line_number":58,"context_line":"    attributes[\u0027data-\u0027 + prefix + \u0027source-\u0027 + input_type] \u003d _(name)"},{"line_number":59,"context_line":"    return attributes"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F98LY%3D","line":58,"updated":"2014-01-31 21:17:53.000000000","message":"_(name) doesn\u0027t work. The translations have to be done on literal text and not variables. It has to be converted before passing it into this call.","commit_id":"170571a5a36fdb96c4f81964d90b04758bdeb1a0"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"9f2f6335c3aaab6e7a894559869a95964a3d1d0e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    choices \u003d [(\u0027url\u0027, _(\u0027URL\u0027)),"},{"line_number":70,"context_line":"               (\u0027file\u0027, _(\u0027File\u0027)),"},{"line_number":71,"context_line":"               (\u0027raw\u0027, _(\u0027Direct Input\u0027))]"},{"line_number":72,"context_line":"    attributes \u003d {\u0027class\u0027: \u0027switchable\u0027, \u0027data-slug\u0027: \u0027templatesource\u0027}"},{"line_number":73,"context_line":"    template_source \u003d forms.ChoiceField(label\u003d_(\u0027Template Source\u0027),"},{"line_number":74,"context_line":"                                        choices\u003dchoices,"},{"line_number":75,"context_line":"                                        widget\u003dforms.Select(attrs\u003dattributes))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F98LE%3D","line":72,"updated":"2014-01-31 21:17:53.000000000","message":"Kinda weird this is the only one that doesn\u0027t use create_upload_form_attributes. What makes this one different?","commit_id":"170571a5a36fdb96c4f81964d90b04758bdeb1a0"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"9f2f6335c3aaab6e7a894559869a95964a3d1d0e","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Keyword arguments:"},{"line_number":181,"context_line":"        prefix -- the prefix (template or environment) of the form fields"},{"line_number":182,"context_line":"        cleaned -- the \u0027cleaned\u0027 dict returned by the superclass\u0027 clean()"},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        upload_str \u003d prefix + \"_upload\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F98LA%3D","line":182,"updated":"2014-01-31 21:17:53.000000000","message":"These still need to be fixed with the proper docstring format (see my comment in the last patch).","commit_id":"170571a5a36fdb96c4f81964d90b04758bdeb1a0"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"6d20040b856c6e62c583e8d366bc2852fb2d43b0","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    :type prefix: str"},{"line_number":60,"context_line":"    :param prefix: prefix (environment, template) of field"},{"line_number":61,"context_line":"    :type input_type: str"},{"line_number":62,"context_line":"    :param prefix: field type (file, raw, url)"},{"line_number":63,"context_line":"    :type name: str"},{"line_number":64,"context_line":"    :param name: translated text label to display to user"},{"line_number":65,"context_line":"    :rtype: dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2FlAA%3D","line":62,"updated":"2014-02-25 20:50:10.000000000","message":"Should be \":param name\" here?","commit_id":"7f9d6be913f1a461679ea1925676bc5c3f52c043"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"6d20040b856c6e62c583e8d366bc2852fb2d43b0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    :return: an attribute set to pass to form build"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    attributes \u003d {\u0027class\u0027: \u0027switched\u0027, \u0027data-switch-on\u0027: prefix + \u0027source\u0027}"},{"line_number":69,"context_line":"    attributes[\u0027data-\u0027 + prefix + \u0027source-\u0027 + input_type] \u003d _(name)"},{"line_number":70,"context_line":"    return attributes"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2Fk%2Fc%3D","line":69,"updated":"2014-02-25 20:50:10.000000000","message":"name does not need to be enclosed in _() here. The value passed is already translatable string","commit_id":"7f9d6be913f1a461679ea1925676bc5c3f52c043"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"6d20040b856c6e62c583e8d366bc2852fb2d43b0","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        # URL handler"},{"line_number":223,"context_line":"        elif url and (has_upload or data):"},{"line_number":224,"context_line":"            msg \u003d _(\u0027Please specify a %s using only one source method.\u0027)"},{"line_number":225,"context_line":"            msg \u003d msg % prefix"},{"line_number":226,"context_line":"            raise forms.ValidationError(msg)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        elif prefix \u003d\u003d \u0027template\u0027:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAU3%2F%2Fk7M%3D","line":225,"updated":"2014-02-25 20:50:10.000000000","message":"The displayed prefix would not be translatable.","commit_id":"7f9d6be913f1a461679ea1925676bc5c3f52c043"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"8a3fbae96ee44ce4742d951e2be594883d95ae68","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        files \u003d self.request.FILES"},{"line_number":163,"context_line":"        self.clean_uploaded_files(\u0027template\u0027, _(\u0027template\u0027), cleaned, files)"},{"line_number":164,"context_line":"        self.clean_uploaded_files(\u0027environment\u0027, _(\u0027template\u0027), cleaned, files)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        # Validate the template and get back the params."},{"line_number":167,"context_line":"        kwargs \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAVn%2F%2FeBg%3D","line":164,"updated":"2014-03-05 22:12:13.000000000","message":"Should the field label passed here be _(\"Template\") and _(\"Environment\") ?","commit_id":"da30ba791d8493f2ab3903953581dc9b5a6a0378"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"6ebdb526c2079153d06f35970378ec08b271960d","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        self.clean_uploaded_files(\u0027environment\u0027,"},{"line_number":165,"context_line":"            _(\u0027environment\u0027),"},{"line_number":166,"context_line":"            cleaned,"},{"line_number":167,"context_line":"            files)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # Validate the template and get back the params."},{"line_number":170,"context_line":"        kwargs \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2FQi0%3D","line":167,"updated":"2014-03-07 08:05:32.000000000","message":"Nit: it is unusual indentation.\nIf we have the first parameter in the first line of the method call, the subsequent parameters should be aligned to the first parameter.\n\n  self.clean_upload_files(\u0027environment\u0027,\n                          _(\u0027environment\u0027),","commit_id":"11eebb8aa3fbf02bb3cd48e0f8975d33b6765c9b"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"6ebdb526c2079153d06f35970378ec08b271960d","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        # Uploaded file handler"},{"line_number":212,"context_line":"        if has_upload and not url:"},{"line_number":213,"context_line":"            log_template_name \u003d files[upload_str].name"},{"line_number":214,"context_line":"            LOG.info(\u0027got upload %s\u0027 % log_template_name)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"            tpl \u003d files[upload_str].read()"},{"line_number":217,"context_line":"            if tpl.startswith(\u0027{\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVn%2F%2FQiI%3D","line":214,"updated":"2014-03-07 08:05:32.000000000","message":"Nit: it is better to be capitalized.\n\nNit2: Please use a comma instead of %. It defers string substitution.","commit_id":"11eebb8aa3fbf02bb3cd48e0f8975d33b6765c9b"}],"openstack_dashboard/dashboards/project/stacks/tests.py":[{"author":{"_account_id":7386,"name":"Tzu-Mainn Chen","email":"tzumainn@redhat.com","username":"tzumainn"},"change_message_id":"227abae7c1f914594df75d6be5654759899b9a8e","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        self.assertRedirectsNoFollow(res, INDEX_URL)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    @test.create_stubs({api.heat: (\u0027stack_create\u0027, \u0027template_validate\u0027)})"},{"line_number":160,"context_line":"    def test_launch_stackwith_environment(self):"},{"line_number":161,"context_line":"        template \u003d self.stack_templates.first()"},{"line_number":162,"context_line":"        environment \u003d self.stack_environments.first()"},{"line_number":163,"context_line":"        stack \u003d self.stacks.first()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUX%2F%2B1AY%3D","line":160,"updated":"2014-02-18 18:58:39.000000000","message":"should this be test_launch_stack_with_environment?","commit_id":"786566ffd83455d85b0cec7592d1735c28afb527"}],"openstack_dashboard/dashboards/project/stacks/views.py":[{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"9f2f6335c3aaab6e7a894559869a95964a3d1d0e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    def load_kwargs(self, initial):"},{"line_number":116,"context_line":"        # load the \"passed through\" data from template form"},{"line_number":117,"context_line":"        for prefix in [\u0027template\u0027, \u0027environment\u0027]:"},{"line_number":118,"context_line":"            for suffix in [\u0027_data\u0027, \u0027_url\u0027]:"},{"line_number":119,"context_line":"                key \u003d prefix + suffix"},{"line_number":120,"context_line":"                if key in self.kwargs:"},{"line_number":121,"context_line":"                    initial[key] \u003d self.kwargs[key]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F98Kg%3D","line":118,"updated":"2014-01-31 21:17:53.000000000","message":"Nit: These should be tuples instead of lists as they are immutable (it\u0027s a trivial optimization).","commit_id":"170571a5a36fdb96c4f81964d90b04758bdeb1a0"}]}
