@@ -488,12 +488,12 @@ def check_unsafe_options(cls, options: List[str], unsafe_options: List[str]) ->
488488 """
489489 # Options can be of the form `foo` or `--foo bar` `--foo=bar`,
490490 # so we need to check if they start with "--foo" or if they are equal to "foo".
491- bare_options = [
491+ bare_unsafe_options = [
492492 option .lstrip ("-" )
493493 for option in unsafe_options
494494 ]
495495 for option in options :
496- for unsafe_option , bare_option in zip (unsafe_options , bare_options ):
496+ for unsafe_option , bare_option in zip (unsafe_options , bare_unsafe_options ):
497497 if option .startswith (unsafe_option ) or option == bare_option :
498498 raise UnsafeOptionError (
499499 f"{ unsafe_option } is not allowed, use `allow_unsafe_options=True` to allow it."
@@ -1193,12 +1193,12 @@ def transform_kwargs(self, split_single_char_options: bool = True, **kwargs: Any
11931193 return args
11941194
11951195 @classmethod
1196- def __unpack_args (cls , arg_list : Sequence [str ]) -> List [str ]:
1196+ def _unpack_args (cls , arg_list : Sequence [str ]) -> List [str ]:
11971197
11981198 outlist = []
11991199 if isinstance (arg_list , (list , tuple )):
12001200 for arg in arg_list :
1201- outlist .extend (cls .__unpack_args (arg ))
1201+ outlist .extend (cls ._unpack_args (arg ))
12021202 else :
12031203 outlist .append (str (arg_list ))
12041204
@@ -1283,7 +1283,7 @@ def _call_process(
12831283 # Prepare the argument list
12841284
12851285 opt_args = self .transform_kwargs (** opts_kwargs )
1286- ext_args = self .__unpack_args ([a for a in args if a is not None ])
1286+ ext_args = self ._unpack_args ([a for a in args if a is not None ])
12871287
12881288 if insert_after_this_arg is None :
12891289 args_list = opt_args + ext_args
0 commit comments