@@ -189,14 +189,14 @@ def _print_verbose_dict_attr(internal_attr, pattern="*", indentation=(" " * 4)):
189189 sub items. These need to be iterated over, and we need to escape existing
190190 characters that would normally be used to color strings.
191191 """
192- for name , val in internal_attr .items ():
192+ for name , vals in internal_attr .items ():
193193 if pattern and not fnmatch .fnmatch (name , pattern ):
194194 continue
195195
196- if isinstance (val , dict ):
196+ if isinstance (vals , dict ):
197197 color_name = ramble .util .colors .section_title (name )
198198 color .cprint (f"{ color_name } :" )
199- for sub_name , sub_val in val .items ():
199+ for sub_name , sub_val in vals .items ():
200200 # Avoid showing duplicate names for variables
201201 if isinstance (sub_val , WorkloadVariable ) and sub_name == sub_val .name :
202202 to_print = f"{ indentation } { sub_val } "
@@ -209,8 +209,24 @@ def _print_verbose_dict_attr(internal_attr, pattern="*", indentation=(" " * 4)):
209209 escaped_sub_val = sub_val .replace ("@" , "@@" )
210210 color .cprint (f"{ indentation } { color_sub_name } : { escaped_sub_val } " )
211211 color .cprint ("" )
212+ elif isinstance (vals , set ):
213+ color_name = ramble .util .colors .section_title (name )
214+ color .cprint (f"{ color_name } :" )
215+ for sub_name in vals :
216+ # Avoid showing duplicate names for variables
217+ color_sub_name = ramble .util .colors .nested_1 (sub_name )
218+ to_print = f"{ indentation } { color_sub_name } "
219+ try :
220+ color .cprint (to_print )
221+ except color .ColorParseError :
222+ escaped_sub_name = ramble .util .colors .nested_1 (sub_name .replace ("@" , "@@" ))
223+ color .cprint (f"{ indentation } { escaped_sub_name } " )
224+ color .cprint ("" )
225+ elif isinstance (vals , list ):
226+ for val in vals :
227+ color .cprint (f"{ val .as_str ()} " )
212228 else :
213- color .cprint (f"{ str (val )} " )
229+ color .cprint (f"{ str (vals )} " )
214230
215231
216232# Attributes that need special print functions
0 commit comments