Comment 8 for bug 1648647

Revision history for this message
asmeurer (asmeurer) wrote :

Even a static check would have to make some assumptions about the state of the file system and sys.path when the import happens. That could mean weird errors where pyflakes passes or fails depending on what version of a dependency happens to be installed, but a more realistic problem is that you have to deal with egg .pth files and all that nonsense.

Which isn't to say I necessarily think it can't or shouldn't be done (with some loose assumptions). But I've always felt that import * is "bad" anyway and pyflakes bailing on it isn't a huge deal.

Exception: relative import * imports in __init__.py. I really wish those worked. Maybe limiting this to only relative imports would be acceptable? I know Phil has already stated in other issues that pyflakes reading code from other files in the same module would be acceptable for pyflakes.