@@ -161,7 +161,7 @@ def unsatisfied(
161161 "TypeError - Too many values provided to list option." ,
162162 )
163163 return {config_path : self }
164- if not all ([ isinstance (element , self .element_type ) for element in value ] ):
164+ if not all (isinstance (element , self .element_type ) for element in value ):
165165 vollog .log (
166166 constants .LOGLEVEL_V ,
167167 "TypeError - At least one element in the list is not of the correct type." ,
@@ -181,7 +181,7 @@ def __init__(self, choices: List[str], *args, **kwargs) -> None:
181181 """
182182 super ().__init__ (* args , ** kwargs )
183183 if not isinstance (choices , list ) or any (
184- [ not isinstance (choice , str ) for choice in choices ]
184+ not isinstance (choice , str ) for choice in choices
185185 ):
186186 raise TypeError ("ChoiceRequirement takes a list of strings as choices" )
187187 self .choices = choices
@@ -410,11 +410,9 @@ def construct(
410410 args = {"context" : context , "config_path" : config_path , "name" : name }
411411
412412 if any (
413- [
414- subreq .unsatisfied (context , config_path )
415- for subreq in self .requirements .values ()
416- if not subreq .optional
417- ]
413+ subreq .unsatisfied (context , config_path )
414+ for subreq in self .requirements .values ()
415+ if not subreq .optional
418416 ):
419417 return None
420418
@@ -485,11 +483,9 @@ def construct(
485483 args = {"context" : context , "config_path" : config_path , "name" : name }
486484
487485 if any (
488- [
489- subreq .unsatisfied (context , config_path )
490- for subreq in self .requirements .values ()
491- if not subreq .optional
492- ]
486+ subreq .unsatisfied (context , config_path )
487+ for subreq in self .requirements .values ()
488+ if not subreq .optional
493489 ):
494490 return None
495491
@@ -710,11 +706,9 @@ def construct(
710706 args = {"context" : context , "config_path" : config_path , "name" : name }
711707
712708 if any (
713- [
714- subreq .unsatisfied (context , config_path )
715- for subreq in self .requirements .values ()
716- if not subreq .optional
717- ]
709+ subreq .unsatisfied (context , config_path )
710+ for subreq in self .requirements .values ()
711+ if not subreq .optional
718712 ):
719713 return None
720714
0 commit comments