@@ -358,14 +358,14 @@ def get_list_value(attr_key):
358358 # Helper to check if attribute is explicitly set (not inherited)
359359 def has_explicit_attribute (attr_key ):
360360 return attr_key in tag_entry .attributes
361-
361+
362362 # Helper to get boolean attribute value (preserving string "True"/"true" if present)
363363 def get_bool_attribute (attr_key ):
364364 if attr_key not in tag_entry .attributes :
365365 return False
366366 value = tag_entry .attributes [attr_key ]
367367 # If it's stored as string "True" or "true", keep it as string for XML compatibility
368- if isinstance (value , str ) and value .lower () in (' true' , ' false' ):
368+ if isinstance (value , str ) and value .lower () in (" true" , " false" ):
369369 return value
370370 # Otherwise return as boolean
371371 return bool (value )
@@ -471,7 +471,7 @@ def get_list_value(attr_key):
471471 if placeholder_entry .has_attribute (HedKey .TakesValue ):
472472 value = placeholder_entry .attributes [HedKey .TakesValue ]
473473 # If it's stored as string "True" or "true", keep it as string for XML compatibility
474- if isinstance (value , str ) and value .lower () in (' true' , ' false' ):
474+ if isinstance (value , str ) and value .lower () in (" true" , " false" ):
475475 placeholder_attrs ["takesValue" ] = value
476476 else :
477477 placeholder_attrs ["takesValue" ] = True
@@ -626,7 +626,13 @@ def _add_unit_modifier_data(self, entry, entry_data):
626626 entry_data ["SIUnitSymbolModifier" ] = si_symbol
627627
628628 # Add any other attributes that aren't in the known list
629- known_modifier_attrs = {HedKey .ConversionFactor , HedKey .SIUnitModifier , HedKey .SIUnitSymbolModifier , HedKey .HedID , HedKey .InLibrary }
629+ known_modifier_attrs = {
630+ HedKey .ConversionFactor ,
631+ HedKey .SIUnitModifier ,
632+ HedKey .SIUnitSymbolModifier ,
633+ HedKey .HedID ,
634+ HedKey .InLibrary ,
635+ }
630636 for attr_name , attr_value in entry .attributes .items ():
631637 if attr_name not in known_modifier_attrs and not self ._attribute_disallowed (attr_name ):
632638 # Convert comma-separated strings to lists for multi-value attributes
0 commit comments