)]}'
{"horizon/forms/base.py":[{"author":{"_account_id":5280,"name":"Nicolas Simonds","email":"nic@metacloud.com","username":"nicolas.simonds"},"change_message_id":"cfab08de5ac7672a21578d293a676ee1a8309f57","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        self.warnings \u003d self.error_class([message])"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _clean_fields(self):"},{"line_number":58,"context_line":"        for name, field in self.fields.items():"},{"line_number":59,"context_line":"            # value_from_datadict() gets the data from the data dictionaries."},{"line_number":60,"context_line":"            # Each widget type knows how to retrieve its own data, because some"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAW3%2F%2FPn4%3D","line":57,"updated":"2014-04-15 20:12:14.000000000","message":"Adding a docstring that explains that this method is identical to django.forms.forms.BaseForm._clean_fields() except for the added whitespace trim support might be helpful.","commit_id":"319fd11f487c3674d38b15725938b2681a5f3dbb"},{"author":{"_account_id":5280,"name":"Nicolas Simonds","email":"nic@metacloud.com","username":"nicolas.simonds"},"change_message_id":"518479a99a4c52fcdef7d0829de195703cfe6cd0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        \"\"\"This method makes a pre-process over CharFields to perform a trim"},{"line_number":56,"context_line":"        of their values"},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        for name, field in self.fields.items():"},{"line_number":59,"context_line":"            if isinstance(field, fields.CharField):"},{"line_number":60,"context_line":"                if getattr(self.data, name, None):"},{"line_number":61,"context_line":"                    tmp \u003d self.data[name]"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_1984fad2","line":58,"updated":"2014-06-10 17:09:00.000000000","message":".items() is different between Python 2 and Python 3.  For forward-compatibility, please use six.iteritems() here.","commit_id":"47ddaf65a9c9487d33825688006e8bf124cab9be"},{"author":{"_account_id":9450,"name":"Juan Manuel Ollé","email":"juan.m.olle@intel.com","username":"jmolle"},"change_message_id":"e11af30365b8546990c43323c07eeb236515e762","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        \"\"\"This method makes a pre-process over CharFields to perform a trim"},{"line_number":56,"context_line":"        of their values"},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        for name, field in self.fields.items():"},{"line_number":59,"context_line":"            if isinstance(field, fields.CharField):"},{"line_number":60,"context_line":"                if getattr(self.data, name, None):"},{"line_number":61,"context_line":"                    tmp \u003d self.data[name]"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_1df77df6","line":58,"in_reply_to":"1ae5cdf2_1984fad2","updated":"2014-06-10 20:49:53.000000000","message":"Done","commit_id":"47ddaf65a9c9487d33825688006e8bf124cab9be"},{"author":{"_account_id":5280,"name":"Nicolas Simonds","email":"nic@metacloud.com","username":"nicolas.simonds"},"change_message_id":"518479a99a4c52fcdef7d0829de195703cfe6cd0","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        for name, field in self.fields.items():"},{"line_number":59,"context_line":"            if isinstance(field, fields.CharField):"},{"line_number":60,"context_line":"                if getattr(self.data, name, None):"},{"line_number":61,"context_line":"                    tmp \u003d self.data[name]"},{"line_number":62,"context_line":"                    if isinstance(tmp, basestring):"},{"line_number":63,"context_line":"                        self.data[name] \u003d tmp.strip()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_cf46444f","line":60,"updated":"2014-06-10 17:09:00.000000000","message":"If self.data is a dict-like object, think you mean self.data.get() here.","commit_id":"47ddaf65a9c9487d33825688006e8bf124cab9be"},{"author":{"_account_id":9450,"name":"Juan Manuel Ollé","email":"juan.m.olle@intel.com","username":"jmolle"},"change_message_id":"e11af30365b8546990c43323c07eeb236515e762","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        for name, field in self.fields.items():"},{"line_number":59,"context_line":"            if isinstance(field, fields.CharField):"},{"line_number":60,"context_line":"                if getattr(self.data, name, None):"},{"line_number":61,"context_line":"                    tmp \u003d self.data[name]"},{"line_number":62,"context_line":"                    if isinstance(tmp, basestring):"},{"line_number":63,"context_line":"                        self.data[name] \u003d tmp.strip()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_fd82d1fe","line":60,"in_reply_to":"1ae5cdf2_cf46444f","updated":"2014-06-10 20:49:53.000000000","message":"this is just a check. it is commonly used pattern","commit_id":"47ddaf65a9c9487d33825688006e8bf124cab9be"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"a97e8be3b362eb8dbb6a2675739dc86be7437820","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        for name, field in six.iteritems(self.fields):"},{"line_number":60,"context_line":"            if isinstance(field, fields.CharField):"},{"line_number":61,"context_line":"                if getattr(self.data, name, None):"},{"line_number":62,"context_line":"                    tmp \u003d self.data[name]"},{"line_number":63,"context_line":"                    self.data[name] \u003d tmp.strip()"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_745fa90f","line":61,"updated":"2014-06-11 09:02:51.000000000","message":"Is this for checking if \"self.data[name]\" has a value?\n\nThinking if using \"if self.data[name] is not None\" would make it easier to read.","commit_id":"00b793850a6552fd56c04577f6ddb687059e8275"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"bbb14095cd12d104b868e2ac72c2eedf7ed9a613","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        for name, field in six.iteritems(self.fields):"},{"line_number":60,"context_line":"            if isinstance(field, fields.CharField):"},{"line_number":61,"context_line":"                if getattr(self.data, name, None):"},{"line_number":62,"context_line":"                    tmp \u003d self.data[name]"},{"line_number":63,"context_line":"                    self.data[name] \u003d tmp.strip()"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_e05f6ee3","line":61,"in_reply_to":"1ae5cdf2_745fa90f","updated":"2014-06-11 13:21:40.000000000","message":"The main advantage to using getattr is to avoid the possibility of getting a KeyError exception, is that needed here?","commit_id":"00b793850a6552fd56c04577f6ddb687059e8275"}],"horizon/utils/fields.py":[{"author":{"_account_id":9449,"name":"Verónica Musso","email":"veronica.a.musso@intel.com","username":"vamusso"},"change_message_id":"e91a3e586aa55ea577031402d467d75b85b116c5","unresolved":false,"context_lines":[{"line_number":161,"context_line":"class TrimmedCharField(fields.CharField):"},{"line_number":162,"context_line":"    \"\"\"Extend the django CharField to avoid only white spaces in required"},{"line_number":163,"context_line":"    fields"},{"line_number":164,"context_line":"    \"\"\""},{"line_number":165,"context_line":"    def clean(self, value):"},{"line_number":166,"context_line":"        if value:"},{"line_number":167,"context_line":"            value \u003d value.strip()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BWls%3D","line":164,"updated":"2014-03-27 12:55:47.000000000","message":"When writing the docstring for a class, an extra line should be placed after the closing quotations. For more details, see http://docs.openstack.org/developer/hacking/#docstrings","commit_id":"dac1ad9718cf2933603da260b85e98d67929d034"}],"openstack_dashboard/dashboards/project/images/images/forms.py":[{"author":{"_account_id":10179,"name":"Facundo Farias","email":"facundo.farias@intel.com","username":"ffarias"},"change_message_id":"f76d2499f1a6e598247f4d47b6ed80f2ad914d8b","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class CreateImageForm(forms.SelfHandlingForm):"},{"line_number":43,"context_line":"    name \u003d fields.TrimmedCharField(max_length\u003d\"255\", label\u003d_(\"Name\"),"},{"line_number":44,"context_line":"                                  required\u003dTrue)"},{"line_number":45,"context_line":"    description \u003d forms.CharField(widget\u003dforms.widgets.Textarea("},{"line_number":46,"context_line":"        attrs\u003d{\u0027class\u0027: \u0027modal-body-fixed-width\u0027}),"},{"line_number":47,"context_line":"        label\u003d_(\"Description\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FVgk%3D","line":44,"updated":"2014-03-18 14:57:28.000000000","message":"The required property should by default true, so you don\u0027t need to do it explicitly in here (the same happens on the test, I think).","commit_id":"767125ca3538d4e250778a688bf5232a2e9b99d9"},{"author":{"_account_id":9450,"name":"Juan Manuel Ollé","email":"juan.m.olle@intel.com","username":"jmolle"},"change_message_id":"b90939a2dfe7585f5177c511413c570d6fc28904","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class CreateImageForm(forms.SelfHandlingForm):"},{"line_number":43,"context_line":"    name \u003d fields.TrimmedCharField(max_length\u003d\"255\", label\u003d_(\"Name\"),"},{"line_number":44,"context_line":"                                  required\u003dTrue)"},{"line_number":45,"context_line":"    description \u003d forms.CharField(widget\u003dforms.widgets.Textarea("},{"line_number":46,"context_line":"        attrs\u003d{\u0027class\u0027: \u0027modal-body-fixed-width\u0027}),"},{"line_number":47,"context_line":"        label\u003d_(\"Description\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FVP8%3D","line":44,"in_reply_to":"AAAAWH%2F%2FVVM%3D","updated":"2014-03-18 15:20:06.000000000","message":"Yes, you are right, some forms has it and others not. I will remove it","commit_id":"767125ca3538d4e250778a688bf5232a2e9b99d9"},{"author":{"_account_id":9450,"name":"Juan Manuel Ollé","email":"juan.m.olle@intel.com","username":"jmolle"},"change_message_id":"418f5aa5b10591b89872468644774f4d63f0620d","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class CreateImageForm(forms.SelfHandlingForm):"},{"line_number":43,"context_line":"    name \u003d fields.TrimmedCharField(max_length\u003d\"255\", label\u003d_(\"Name\"),"},{"line_number":44,"context_line":"                                  required\u003dTrue)"},{"line_number":45,"context_line":"    description \u003d forms.CharField(widget\u003dforms.widgets.Textarea("},{"line_number":46,"context_line":"        attrs\u003d{\u0027class\u0027: \u0027modal-body-fixed-width\u0027}),"},{"line_number":47,"context_line":"        label\u003d_(\"Description\"),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2FVVM%3D","line":44,"in_reply_to":"AAAAWH%2F%2FVgk%3D","updated":"2014-03-18 15:11:07.000000000","message":"Yes, but it explicity indicate that this field in requested (self documentation), if you take a look at the old code, it is also indicated.\nIn addition, I like to be consistent and everywhere in the code is explicitly called with required\u003dTrue","commit_id":"767125ca3538d4e250778a688bf5232a2e9b99d9"}]}
