Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit c525bfe

Browse files
committed
#133: Fixed an error in python2.6.
1 parent a0dcb0c commit c525bfe

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/pep257.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,6 @@ class ConfigurationParser(object):
741741
742742
"""
743743

744-
BOOLEAN_OPTIONS = ('explain', 'source', 'debug', 'verbose', 'count')
745744
CONFIG_FILE_OPTIONS = ('convention', 'select', 'ignore', 'add-select',
746745
'add-ignore', 'match', 'match-dir')
747746
MUTUALLY_EXCLUSIVE_OPTIONS = ('ignore', 'select', 'convention')
@@ -927,7 +926,7 @@ def _read_configuration_file(self, path):
927926
continue
928927

929928
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))
931930
continue
932931

933932
normalized_opt = opt.replace('-', '_')
@@ -946,7 +945,7 @@ def _read_configuration_file(self, path):
946945

947946
if options is not None:
948947
if not self._validate_options(options):
949-
raise IllegalConfiguration('in file: {}'.format(path))
948+
raise IllegalConfiguration('in file: {0}'.format(path))
950949

951950
return options, should_inherit
952951

@@ -979,11 +978,11 @@ def _parse_args(self, args=None, values=None):
979978
options, arguments = self._parser.parse_args(args, values)
980979
return self._fix_set_options(options), arguments
981980

982-
@classmethod
983-
def _create_run_config(cls, options):
981+
@staticmethod
982+
def _create_run_config(options):
984983
"""Create a `RunConfiguration` object from `options`."""
985984
values = dict([(opt, getattr(options, opt)) for opt in
986-
cls.BOOLEAN_OPTIONS])
985+
RunConfiguration._fields])
987986
return RunConfiguration(**values)
988987

989988
@classmethod

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ pep8ignore =
1818
norecursedirs = docs .tox
1919

2020
[pep257]
21-
verbose = true
21+
inherit = false

0 commit comments

Comments
 (0)