PyCQA / flake8-import-order

Flake8 plugin that checks import order against various Python Style Guides
GNU Lesser General Public License v3.0
278 stars 72 forks source link

flake8-import-order 0.14.1 broke import order detection #117

Closed thebigmunch closed 7 years ago

thebigmunch commented 7 years ago

Given the following test.py:

import test2
import test
from test2 import test2_m
from test import test_m

(test, test2, test_m, test2_m)

flake8 --import-order-style <style> test.py (where I've tested for cryptography, google, and smarkets as style) on 0.14 gives the expected output:

test.py:2:1: I100 Import statements are in the wrong order. import test should be before import test2
test.py:4:1: I100 Import statements are in the wrong order. from test should be before from test2

The same commands on 0.14.1 give no warnings.

pgjones commented 7 years ago

This is strange, I can reproduce this - but not if I add your file to the tests in the test suite. I'll investigate...

pgjones commented 7 years ago

This is a good spot, thanks. It turns out without the tree argument flake8 has no idea how to invoke the plugin and so it doesn't (I think it should probably warn/error so I'll look into that). The tree was also useful anyway, so I've just restored it.

So master should now work, could you test and confirm?

thebigmunch commented 7 years ago

Confirmed working here. Thanks for the quick turnaround.

pgjones commented 7 years ago

Thanks, will release.