mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Removed uneeded generator expressions and list comprehensions.
This commit is contained in:
parent
b1a2ad6925
commit
1933e56eca
9 changed files with 16 additions and 16 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue