mirror of
https://github.com/django/django.git
synced 2025-12-02 00:01:29 +00:00
Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
Thanks Collin Anderson for the review.
This commit is contained in:
parent
caf5cd7ba7
commit
b2aad7b836
37 changed files with 123 additions and 122 deletions
|
|
@ -574,7 +574,7 @@ class Query(object):
|
|||
return
|
||||
orig_opts = self.get_meta()
|
||||
seen = {}
|
||||
must_include = {orig_opts.concrete_model: set([orig_opts.pk])}
|
||||
must_include = {orig_opts.concrete_model: {orig_opts.pk}}
|
||||
for field_name in field_names:
|
||||
parts = field_name.split(LOOKUP_SEP)
|
||||
cur_model = self.model._meta.concrete_model
|
||||
|
|
@ -2024,7 +2024,7 @@ def add_to_dict(data, key, value):
|
|||
if key in data:
|
||||
data[key].add(value)
|
||||
else:
|
||||
data[key] = set([value])
|
||||
data[key] = {value}
|
||||
|
||||
|
||||
def is_reverse_o2o(field):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue