"import as" can cause spurious "imported but unused" warnings
Bug #1162031 reported by
Bryan Silverthorn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
New
|
Wishlist
|
Unassigned |
Bug Description
Pyflakes will generate a spurious "imported but unused" warning for the following code:
import selenium as se
import selenium.webdriver
se.webdriver.
Note that Pyflakes will, correctly, *not* generate such a warning for the following:
import selenium
import selenium.webdriver
se = selenium
se.webdriver.
Changed in pyflakes: | |
importance: | Undecided → Wishlist |
To post a comment you must log in.
The "imported but unused" is not triggered on "import ... as ...".
Actually, it is triggered by the second import line, not the first one.
I agree this is slightly confusing because of issue #1153355.
But it is not a bug.