gforcada/flake8-isort

Cannot use same config file as flake8 config file

Martmists-GH opened this issue · 2 comments

I'm trying to use flake8 --config=config.cfg

in config.cfg, I have an [isort] section:

[isort]
line_length=100
indent='    '
multi_line_output=0
length_sort=1
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
import_heading_stdlib=Stdlib
import_heading_thirdparty=External Libraries
import_heading_firstparty=Snekchek

yet I keep getting messages like this:
./setup.py:0:1: I002 no configuration found (.isort.cfg or [isort] in configs)

As you can see in this method we are looking up configuration on different config files, but not the one provided by flake8.

That would be a nice addition, would you have time to hack on this?

In my project, snekchek, I just parse the config file, get the [isort] section, do a bit of additional parsing and then simply pass it all to isort.SortItems(filename, **config_dict)