diff options
author | Ian Lee <IanLee1521@gmail.com> | 2016-07-24 19:48:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-24 19:48:01 -0700 |
commit | 1e710127635f7374923ef59db937fc391e7436bd (patch) | |
tree | d99bb3e895bb0f79d17d7e9ff6c9690a9b586850 | |
parent | 0babee523197a3a2f6d8dd9e0f5ab2f6166b0ce5 (diff) | |
parent | d4b8f49b66ca725ce7f32c438c98d17c4e6f2316 (diff) | |
download | pep8-1e710127635f7374923ef59db937fc391e7436bd.tar.gz |
Merge pull request #562 from sigmavirus24/bug/561
Stop checking for string option type
-rwxr-xr-x | pycodestyle.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 3ee688b..ea367f7 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -2149,13 +2149,12 @@ def read_config(options, args, arglist, parser): opt_type = option_list[normalized_opt] if opt_type in ('int', 'count'): value = config.getint(pep8_section, opt) - elif opt_type == 'string': + elif opt_type in ('store_true', 'store_false'): + value = config.getboolean(pep8_section, opt) + else: value = config.get(pep8_section, opt) if normalized_opt == 'exclude': value = normalize_paths(value, local_dir) - else: - assert opt_type in ('store_true', 'store_false') - value = config.getboolean(pep8_section, opt) setattr(new_options, normalized_opt, value) # Third, overwrite with the command-line options |