@@ -171,7 +171,7 @@ def _validate_choices(self, value):
171
171
172
172
choice_list = self .choices
173
173
if isinstance (choice_list [0 ], (list , tuple )):
174
- choice_list = [k for k , v in choice_list ]
174
+ choice_list = [k for k , _ in choice_list ]
175
175
176
176
# Choices which are other types of Documents
177
177
if isinstance (value , (Document , EmbeddedDocument )):
@@ -311,7 +311,7 @@ def to_python(self, value):
311
311
value_dict [k ] = self .to_python (v )
312
312
313
313
if is_list : # Convert back to a list
314
- return [v for k , v in sorted (value_dict .items (),
314
+ return [v for _ , v in sorted (value_dict .items (),
315
315
key = operator .itemgetter (0 ))]
316
316
return value_dict
317
317
@@ -378,7 +378,7 @@ def to_mongo(self, value):
378
378
value_dict [k ] = self .to_mongo (v )
379
379
380
380
if is_list : # Convert back to a list
381
- return [v for k , v in sorted (value_dict .items (),
381
+ return [v for _ , v in sorted (value_dict .items (),
382
382
key = operator .itemgetter (0 ))]
383
383
return value_dict
384
384
0 commit comments