@@ -73,7 +73,7 @@ def defaults() -> CommandLineArguments:
7373 only = None ,
7474 config_file = "" ,
7575 output_dir = Path ("wheelhouse" ),
76- package_dir = Path ("." ),
76+ package_dir = Path (),
7777 print_build_identifiers = False ,
7878 debug_traceback = False ,
7979 enable = [],
@@ -184,7 +184,7 @@ class ListFormat(OptionFormat):
184184
185185 def __init__ (self , sep : str , quote : Callable [[str ], str ] | None = None ) -> None :
186186 self .sep = sep
187- self .quote = quote if quote else lambda s : s
187+ self .quote = quote or ( lambda s : s )
188188
189189 def format_list (self , value : SettingList ) -> str :
190190 return self .sep .join (self .quote (str (v )) for v in value )
@@ -265,10 +265,12 @@ class EnvironmentFormat(OptionFormat):
265265 values may contain variables or command substitutions.
266266 """
267267
268- def format_table (self , table : SettingTable ) -> str :
268+ @staticmethod
269+ def format_table (table : SettingTable ) -> str :
269270 return " " .join (f'{ k } ="{ v } "' for k , v in table .items ())
270271
271- def merge_values (self , before : str , after : str ) -> str :
272+ @staticmethod
273+ def merge_values (before : str , after : str ) -> str :
272274 return f"{ before } { after } "
273275
274276
@@ -630,8 +632,7 @@ def globals(self) -> GlobalOptions:
630632 )
631633 try :
632634 enable = {EnableGroup (group ) for group in enable_groups .split ()}
633- for command_line_group in args .enable :
634- enable .add (EnableGroup (command_line_group ))
635+ enable .update (EnableGroup (command_line_group ) for command_line_group in args .enable )
635636 except ValueError as e :
636637 msg = f"Failed to parse enable group. { e } . Valid group names are: { ', ' .join (g .value for g in EnableGroup )} "
637638 raise errors .ConfigurationError (msg ) from e
@@ -737,9 +738,9 @@ def build_options(self, identifier: str | None) -> BuildOptions:
737738 environment .add (env_var_name , self .env [env_var_name ], prepend = True )
738739
739740 if dependency_versions == "pinned" :
740- dependency_constraints : None | (
741- DependencyConstraints
742- ) = DependencyConstraints . with_defaults ()
741+ dependency_constraints : DependencyConstraints | None = (
742+ DependencyConstraints . with_defaults ()
743+ )
743744 elif dependency_versions == "latest" :
744745 dependency_constraints = None
745746 else :
@@ -932,13 +933,15 @@ def option_summary(
932933
933934 return result
934935
935- def indent_if_multiline (self , value : str , indent : str ) -> str :
936+ @staticmethod
937+ def indent_if_multiline (value : str , indent : str ) -> str :
936938 if "\n " in value :
937939 return "\n " + textwrap .indent (value .strip (), indent )
938940 else :
939941 return value
940942
941- def option_summary_value (self , option_value : Any ) -> str :
943+ @staticmethod
944+ def option_summary_value (option_value : Any ) -> str :
942945 if hasattr (option_value , "options_summary" ):
943946 option_value = option_value .options_summary ()
944947
0 commit comments