In the line if PY2 and isinstance(filenames, bytes) and sys.py3kwarning:, the addition of and sys.py3kwarning makes it so flake8 can't read config files. sys.py3kwarning seems to only be True if you pass -3 to the python interpreter, and this is not set by default in flake8.