1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Removed unnecessary parens in various code.

This commit is contained in:
Mariusz Felisiak
2017-09-14 03:20:29 +02:00
committed by Tim Graham
parent ee4043f735
commit 0ec0e5029c
8 changed files with 10 additions and 10 deletions

View File

@@ -1141,7 +1141,7 @@ class ModelChoiceIterator:
yield self.choice(obj)
def __len__(self):
return (len(self.queryset) + (1 if self.field.empty_label is not None else 0))
return len(self.queryset) + (1 if self.field.empty_label is not None else 0)
def choice(self, obj):
return (self.field.prepare_value(obj), self.field.label_from_instance(obj))