1.2.0: F811 when importing os/os.path
Bug #1578051 reported by
Florian Bruhin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Fix Released
|
Undecided
|
John Vandenberg |
Bug Description
Since pyflakes 1.2.0, running it over this file:
import os.path
import os
assert os
produces:
x.py:2: redefinition of unused 'os' from line 1
Switching the order of the imports works around the issue, but I think this shouldn't be an error.
To post a comment you must log in.
Very likely to be a bug in my patch, which was supposed to have zero effect, except for improving the error messages, but it looks like this scenario wasnt covered in the tests (the inverse scenario was covered, as you've found).
https:/ /github. com/pyflakes/ pyflakes/ commit/ aec68a7847d8dbd 1371242f42f9302 103a68178f