PEP8 cleanups

This commit is contained in:
Roberto Rosario
2015-06-24 17:11:24 -04:00
parent dd9b196110
commit 48df3dcafa
20 changed files with 24 additions and 82 deletions

View File

@@ -8,20 +8,7 @@ class MultiItemForm(forms.Form):
def __init__(self, *args, **kwargs):
actions = kwargs.pop('actions', [])
super(MultiItemForm, self).__init__(*args, **kwargs)
choices = []
group = []
for action in actions:
if not action[0]:
if group:
choices.append((link_spacer['text'], group))
group = []
else:
group.append(action)
if choices:
self.fields['action'].choices = choices
else:
self.fields['action'].choices = group
self.fields['action'].choices = actions
action = forms.ChoiceField(label=_('Actions'), required=False)