Can PyCharm understand name shadowing in

I'm working with a big legacy code base and it presents something like this in lots of places: packages have a file with this kind of imports:

from SomeThing import SomeThing

and the file structure is something like this:


with a SomeThing class defined inside

So, I have client code doing:

import somelib

something = somelib.SomeThing()

The code works, of course, because SomeThing is a class. Yet, PyCharm is resolving SomeThing to the module ( instead. So there's no navigation, there are warnings about SomeThing not being callable, etc.

Is there anything I can do to have PyCharm see this a Python does?
1 comment
Comment actions Permalink
This is a bug in PyCharm 2.5.2 which is fixed in PyCharm 2.6 Early Access Preview:

Please sign in to leave a comment.