PEP8: fixed ' = ' → '=' on parameters

'unexpected spaces around keyword / parameter equals'
This commit is contained in:
Théophile Bastian 2016-07-09 20:19:37 +01:00
parent 7de11f2285
commit c7a3656ded
18 changed files with 496 additions and 379 deletions

View file

@ -9,7 +9,8 @@ class BaseBdaFormSet(BaseInlineFormSet):
"""Checks that no two articles have the same title."""
super(BaseBdaFormSet, self).clean()
if any(self.errors):
# Don't bother validating the formset unless each form is valid on its own
# Don't bother validating the formset unless each form is valid on
# its own
return
spectacles = []
for i in range(0, self.total_form_count()):
@ -32,10 +33,9 @@ class SpectacleModelChoiceField(forms.ModelChoiceField):
obj.location, obj.price)
class ResellForm(forms.Form):
count = forms.ChoiceField(choices = (("1","1"),("2","2"),))
count = forms.ChoiceField(choices=(("1", "1"), ("2", "2"),))
spectacle = SpectacleModelChoiceField(queryset=Spectacle.objects.none())
def __init__(self, participant, *args, **kwargs):
super(ResellForm, self).__init__(*args, **kwargs)
self.fields['spectacle'].queryset = participant.attributions.all().distinct()