mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Removed uneeded generator expressions and list comprehensions.
This commit is contained in:
committed by
Tim Graham
parent
b1a2ad6925
commit
1933e56eca
@@ -156,14 +156,14 @@ class CharFieldTests(SimpleTestCase):
|
||||
self.display = display
|
||||
|
||||
def __iter__(self):
|
||||
return (x for x in [self.value, self.display])
|
||||
return iter((self.value, self.display))
|
||||
|
||||
def __len__(self):
|
||||
return 2
|
||||
|
||||
class Things:
|
||||
def __iter__(self):
|
||||
return (x for x in [ThingItem(1, 2), ThingItem(3, 4)])
|
||||
return iter((ThingItem(1, 2), ThingItem(3, 4)))
|
||||
|
||||
class ThingWithIterableChoices(models.Model):
|
||||
thing = models.CharField(max_length=100, blank=True, choices=Things())
|
||||
|
||||
Reference in New Issue
Block a user