File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,13 @@ def unpack_element_list_structure(
6161 f"but we got { item !r} "
6262 )
6363 name , fields = list (item .items ())[0 ]
64- # Allow a shorthand usage: `- use: element_name` in examples.
65- # If the value is not a dict but the key is 'use', treat it as
66- # a reference to an existing element name and wrap it in a
67- # PlaceholderName so downstream code can resolve it.
64+ # In addition to the existing shorthand `- element_name`
65+ # (a plain string reference), also allow the alternative
66+ # reference syntax `- use: element_name`.
67+ # If the value is not a dict but the key is 'use',
68+ # treat it as a reference to an existing element name
69+ # and wrap it in a PlaceholderName so downstream code
70+ # can resolve it.
6871 if not isinstance (fields , dict ):
6972 if name == "use" and isinstance (fields , str ):
7073 new_list .append (PlaceholderName (fields ))
You can’t perform that action at this time.
0 commit comments