@@ -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 = [
492492option .lstrip ("-" )
493493for option in unsafe_options
494494 ]
495495for 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 ):
497497if option .startswith (unsafe_option ) or option == bare_option :
498498raise UnsafeOptionError (
499499f"{ 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
11931193return 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
11981198outlist = []
11991199if isinstance (arg_list , (list , tuple )):
12001200for arg in arg_list :
1201- outlist .extend (cls .__unpack_args (arg ))
1201+ outlist .extend (cls ._unpack_args (arg ))
12021202else :
12031203outlist .append (str (arg_list ))
12041204
@@ -1283,7 +1283,7 @@ def _call_process(
12831283# Prepare the argument list
12841284
12851285opt_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
12881288if insert_after_this_arg is None :
12891289args_list = opt_args + ext_args
0 commit comments