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

Removed unnecessary assignments in various code.

This commit is contained in:
Jon Dufresne
2019-04-24 04:09:29 -07:00
committed by Mariusz Felisiak
parent 80482e9249
commit 8b3f1c35dd
14 changed files with 20 additions and 33 deletions

View File

@@ -134,9 +134,10 @@ class BaseFormSet:
def forms(self):
"""Instantiate forms at first property access."""
# DoS protection is included in total_form_count()
forms = [self._construct_form(i, **self.get_form_kwargs(i))
for i in range(self.total_form_count())]
return forms
return [
self._construct_form(i, **self.get_form_kwargs(i))
for i in range(self.total_form_count())
]
def get_form_kwargs(self, index):
"""