Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing import warnings when importing fully-qualified modules #137

Open
pyflakes-bot opened this Issue Feb 11, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@pyflakes-bot
Copy link

pyflakes-bot commented Feb 11, 2015

Original report by gward (@gward?) on Launchpad:


Importing modules using fully-qualified paths appears to confuse pyflakes. Example 1:

$ cat pyflakes-missed-unused-import.py
import somepackage.mod1
import somepackage.mod2

def do_something():
    somepackage.mod1.do_something()

$ pyflakes pyflakes-missed-unused-import.py

Expected output: an "unused import" warning about somepackage.mod2.

Actual output: no errors or warnings.

Example 2:

$ cat pyflakes-missed-missing-import.py
import somepackage.mod2

def do_something():
    somepackage.mod1.do_something()

$ pyflakes pyflakes-missed-missing-import.py

Expected output: a "missing import" error about somepackage.mod1 and an "unused import" warning about somepackage.mod2.

Actual output: no errors or warnings.

@pyflakes-bot

This comment has been minimized.

Copy link
Author

pyflakes-bot commented May 27, 2015

Original comment by bitglue (@bitglue?) on Launchpad:


Indeed, this is an issue. Fixing it will require some substantial rework of Pyflakes' data model, because currently it doesn't know anything about attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.