@@ -135,7 +135,7 @@ def __init__(
135135
136136 # Check that default value is valid
137137 if default is not None and choices is not None and default not in choices :
138- choices_str = ", " .join (( f"'{ choice } '" for choice in choices ) )
138+ choices_str = ", " .join (f"'{ choice } '" for choice in choices )
139139 raise AnodError (
140140 f"{ self .origin } : default value '{ default } ' "
141141 f"should be in ({ choices_str } )."
@@ -162,7 +162,7 @@ def value(self, value: QualifierValue | None) -> QualifierValue:
162162 )
163163
164164 if self .choices is not None and value not in self .choices :
165- choices_str = ", " .join (( f"'{ choice } '" for choice in self .choices ) )
165+ choices_str = ", " .join (f"'{ choice } '" for choice in self .choices )
166166 raise AnodError (
167167 f"{ self .origin } : Invalid value for qualifier { self .name } : '{ value } ' "
168168 f"not in ({ choices_str } )"
@@ -276,9 +276,9 @@ def __init__(
276276 if default is not None and choices is not None :
277277 wrong_values = default - set (choices )
278278 if wrong_values :
279- choices_str = ", " .join (( f"'{ choice } '" for choice in choices ) )
279+ choices_str = ", " .join (f"'{ choice } '" for choice in choices )
280280 wrong_values_str = ", " .join (
281- ( f"'{ value } '" for value in sorted (wrong_values ) )
281+ f"'{ value } '" for value in sorted (wrong_values )
282282 )
283283 raise AnodError (
284284 f"{ self .origin } : In '{ self .name } ', default value(s) "
@@ -314,7 +314,7 @@ def value(self, value: QualifierValue | None) -> QualifierValue:
314314 )
315315 else :
316316 try :
317- result = all (( isinstance (el , str ) for el in value ) )
317+ result = all (isinstance (el , str ) for el in value )
318318 if not result :
319319 raise AnodError (
320320 f"{ self .origin } : Invalid value for qualifier { self .name } : "
@@ -336,9 +336,9 @@ def value(self, value: QualifierValue | None) -> QualifierValue:
336336 wrong_values = value_set - set (self .choices )
337337
338338 if wrong_values :
339- choices_str = ", " .join (( f"'{ choice } '" for choice in self .choices ) )
339+ choices_str = ", " .join (f"'{ choice } '" for choice in self .choices )
340340 wrong_values_str = ", " .join (
341- ( f"'{ value } '" for value in sorted (wrong_values ) )
341+ f"'{ value } '" for value in sorted (wrong_values )
342342 )
343343 raise AnodError (
344344 f"{ self .origin } : Invalid value(s) for qualifier { self .name } : "
@@ -359,7 +359,7 @@ def repr(self, value: QualifierValue, hash_pool: list[str] | None) -> str:
359359 list_repr = []
360360 if not self .repr_omit_key :
361361 list_repr .append (self .repr_name )
362- list_repr .extend (( str (v ) for v in sorted (value ) ))
362+ list_repr .extend (str (v ) for v in sorted (value ))
363363
364364 # And join them with a dash.
365365 str_repr = "-" .join (list_repr )
0 commit comments