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:
committed by
Mariusz Felisiak
parent
80482e9249
commit
8b3f1c35dd
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user