@@ -93,7 +93,7 @@ def set_columns(cols=None):
9393 pass
9494
9595 if cols is not None :
96- os .environ ['COLUMNS' ] = "%s" % cols
96+ os .environ ['COLUMNS' ] = str ( cols )
9797
9898
9999def what_str_list_tuple (name ):
@@ -825,8 +825,8 @@ def get_env_options(self):
825825 self .environment_arguments .append ("%s=%s" % (lo , val ))
826826 else :
827827 # interpretation of values: 0/no/false means: don't set it
828- if ( "%s" % val ).lower () not in ("0" , "no" , "false" ,):
829- self .environment_arguments .append ("%s" % lo )
828+ if str ( val ).lower () not in ("0" , "no" , "false" ,):
829+ self .environment_arguments .append (str ( lo ) )
830830 else :
831831 self .log .debug ("Environment variable %s is not set" % env_opt_name )
832832
@@ -1034,7 +1034,7 @@ def main_options(self):
10341034 # make_init is deprecated
10351035 if hasattr (self , 'make_init' ):
10361036 self .log .debug ('main_options: make_init is deprecated. Rename function to main_options.' )
1037- getattr ( self , ' make_init' ) ()
1037+ self . make_init ()
10381038 else :
10391039 # function names which end with _options and do not start with main or _
10401040 reg_main_options = re .compile ("^(?!_|main).*_options$" )
@@ -1192,7 +1192,7 @@ def add_group_parser(self, opt_dict, description, prefix=None, otherdefaults=Non
11921192 for extra_detail in details [4 :]:
11931193 if isinstance (extra_detail , (list , tuple ,)):
11941194 # choices
1195- nameds ['choices' ] = ["%s" % x for x in extra_detail ] # force to strings
1195+ nameds ['choices' ] = [str ( x ) for x in extra_detail ] # force to strings
11961196 hlp += ' (choices: %s)' % ', ' .join (nameds ['choices' ])
11971197 elif isinstance (extra_detail , str ) and len (extra_detail ) == 1 :
11981198 args .insert (0 , "-%s" % extra_detail )
0 commit comments