File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ def resolve_variants_options(
365
365
** needs_config .filter_data
366
366
) # Add needs_filter_data to filter context
367
367
need_context .update (
368
- ** { tag : True for tag in tags }
368
+ ** dict . fromkeys ( tags , True )
369
369
) # Add sphinx tags to filter context
370
370
location = (need ["docname" ], need ["lineno" ]) if need ["docname" ] else None
371
371
Original file line number Diff line number Diff line change @@ -73,8 +73,7 @@ def generate_needs_schema(
73
73
}
74
74
75
75
for name in exclude_properties :
76
- if name in properties :
77
- del properties [name ]
76
+ properties .pop (name , None )
78
77
79
78
return {
80
79
"$schema" : "http://json-schema.org/draft-07/schema#" ,
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ def _copy_filtered(
337
337
) -> NeedsAndPartsListView :
338
338
"""Create a new view with only the needs/parts with the given ids."""
339
339
if self ._selected_ids is None :
340
- selected_ids = { n : None for n in ids }
340
+ selected_ids = dict . fromkeys ( ids )
341
341
else :
342
342
selected_ids = {n : None for n in ids if n in self ._selected_ids }
343
343
return NeedsAndPartsListView (_indexes = self ._indexes , _selected_ids = selected_ids )
You can’t perform that action at this time.
0 commit comments