alecthomas / importmagic

A Python library for finding unresolved symbols in Python code, and the corresponding imports
BSD 2-Clause "Simplified" License
120 stars 20 forks source link

ImportMagic incorrectly classifying some packages as local #30

Closed ChillarAnand closed 8 years ago

ChillarAnand commented 8 years ago

Original issue: https://github.com/jorgenschaefer/elpy/issues/822

importmagic does not respect PEP8 ordering of imports, but instead mixes up all types of imports (local, third-party, standard library) into one list:

import logging
import time
from mymod import AnUncommonName

instead of

import logging
import time

from mymod import AnUncommonName

and

import logging
import mymod
import time

instead of

import logging
import time

import mymod

That's a regression to earlier behavior.

alecthomas commented 8 years ago

Have you tried deleting and recreating the index?

ChillarAnand commented 8 years ago

Yes, after recreating index also, it is giving same results.

alecthomas commented 8 years ago

What version of importmagic is this with?

ChillarAnand commented 8 years ago

Using latest version 0.1.5

alecthomas commented 8 years ago

I just pushed 0.1.7, give it a try.