jet-admin / jet-bridge

Consider using a dictionary comprehension PYL-R1717
Performance
Major
6 months ago4 years old
171            )
172
173        if isinstance(attrs['headers'], dict):
174            attrs['headers'] = dict([[key, str(value)] for key, value in attrs['headers'].items()])175
176        return attrs
177
 9            return []
10        # value = list(filter(lambda x: x != '', value.split(',')))
11        value = value.split(',')
12        return dict([['param_{}'.format(i), x] for i, x in enumerate(value)])13
14    def to_representation_item(self, value):
15        return list(value)