mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.
This commit is contained in:
parent
edee5a8de6
commit
2c69824e5a
63 changed files with 145 additions and 150 deletions
|
@ -496,7 +496,7 @@ class AlterUniqueTogether(FieldRelatedOptionOperation):
|
|||
|
||||
def __init__(self, name, unique_together):
|
||||
unique_together = normalize_together(unique_together)
|
||||
self.unique_together = set(tuple(cons) for cons in unique_together)
|
||||
self.unique_together = {tuple(cons) for cons in unique_together}
|
||||
super().__init__(name)
|
||||
|
||||
def deconstruct(self):
|
||||
|
@ -550,7 +550,7 @@ class AlterIndexTogether(FieldRelatedOptionOperation):
|
|||
|
||||
def __init__(self, name, index_together):
|
||||
index_together = normalize_together(index_together)
|
||||
self.index_together = set(tuple(cons) for cons in index_together)
|
||||
self.index_together = {tuple(cons) for cons in index_together}
|
||||
super().__init__(name)
|
||||
|
||||
def deconstruct(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue