$ flake8 setup.py
Traceback (most recent call last):
File "/home/xzise/.pyenv/versions/3.5.2/bin/flake8", line 11, in <module>
sys.exit(main())
File "/home/xzise/.pyenv/versions/3.5.2/lib/python3.5/site-packages/flake8/main.py", line 28, in main
flake8_style = get_style_guide(parse_argv=True)
File "/home/xzise/.pyenv/versions/3.5.2/lib/python3.5/site-packages/flake8/engine.py", line 234, in get_style_guide
styleguide = StyleGuide(**kwargs)
File "/home/xzise/.pyenv/versions/3.5.2/lib/python3.5/site-packages/flake8/engine.py", line 154, in __init__
self._styleguide = kwargs.pop('styleguide', NoQAStyleGuide(**kwargs))
File "/home/xzise/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pycodestyle.py", line 1833, in __init__
arglist, parse_argv, config_file, parser)
File "/home/xzise/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pycodestyle.py", line 2120, in process_options
options = read_config(options, args, arglist, parser)
File "/home/xzise/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pycodestyle.py", line 2076, in read_config
assert opt_type in ('store_true', 'store_false')
AssertionError
When using Flake8 2.6.2 together with pycodestyle 2.0.0 and zheller/flake8-quotes 0.7.0 I get the following AssertionError if
quotesorinline-quotesare defined as parameter:This is because the option's type is
choiceand that isn't actually handled. It should be handled the same asstringas it is handled the same by optparse.So instead of
elif opt_type == 'string':it could just doelif opt_type in ('string', 'choice'):. This will also verify that the choice is actually correct so no additional changes would be required.