@@ -741,7 +741,6 @@ class ConfigurationParser(object):
741
741
742
742
"""
743
743
744
- BOOLEAN_OPTIONS = ('explain' , 'source' , 'debug' , 'verbose' , 'count' )
745
744
CONFIG_FILE_OPTIONS = ('convention' , 'select' , 'ignore' , 'add-select' ,
746
745
'add-ignore' , 'match' , 'match-dir' )
747
746
MUTUALLY_EXCLUSIVE_OPTIONS = ('ignore' , 'select' , 'convention' )
@@ -927,7 +926,7 @@ def _read_configuration_file(self, path):
927
926
continue
928
927
929
928
if opt .replace ('_' , '-' ) not in self .CONFIG_FILE_OPTIONS :
930
- log .warning ("Unknown option '{}' ignored" .format (opt ))
929
+ log .warning ("Unknown option '{0 }' ignored" .format (opt ))
931
930
continue
932
931
933
932
normalized_opt = opt .replace ('-' , '_' )
@@ -946,7 +945,7 @@ def _read_configuration_file(self, path):
946
945
947
946
if options is not None :
948
947
if not self ._validate_options (options ):
949
- raise IllegalConfiguration ('in file: {}' .format (path ))
948
+ raise IllegalConfiguration ('in file: {0 }' .format (path ))
950
949
951
950
return options , should_inherit
952
951
@@ -979,11 +978,11 @@ def _parse_args(self, args=None, values=None):
979
978
options , arguments = self ._parser .parse_args (args , values )
980
979
return self ._fix_set_options (options ), arguments
981
980
982
- @classmethod
983
- def _create_run_config (cls , options ):
981
+ @staticmethod
982
+ def _create_run_config (options ):
984
983
"""Create a `RunConfiguration` object from `options`."""
985
984
values = dict ([(opt , getattr (options , opt )) for opt in
986
- cls . BOOLEAN_OPTIONS ])
985
+ RunConfiguration . _fields ])
987
986
return RunConfiguration (** values )
988
987
989
988
@classmethod
0 commit comments