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